diff options
author | Patrick McHardy <kaber@trash.net> | 2005-12-05 13:34:51 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-12-05 13:34:51 -0800 |
commit | 0be7fa92ca162bf5e7993c392e6f93909d617bbb (patch) | |
tree | cdb6774f5783e972e2c08084fc99324ce748a116 | |
parent | afe5c6bb034bfa5824f8e7def6a739653e8f4655 (diff) | |
download | linux-3.10-0be7fa92ca162bf5e7993c392e6f93909d617bbb.tar.gz linux-3.10-0be7fa92ca162bf5e7993c392e6f93909d617bbb.tar.bz2 linux-3.10-0be7fa92ca162bf5e7993c392e6f93909d617bbb.zip |
[NETFILTER]: Fix CTA_PROTO_NUM attribute size in ctnetlink
CTA_PROTO_NUM is a u_int8_t.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv4/netfilter/ip_conntrack_netlink.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/netfilter/ip_conntrack_netlink.c b/net/ipv4/netfilter/ip_conntrack_netlink.c index 70402e0ed00..d058ac41bfd 100644 --- a/net/ipv4/netfilter/ip_conntrack_netlink.c +++ b/net/ipv4/netfilter/ip_conntrack_netlink.c @@ -503,7 +503,7 @@ ctnetlink_parse_tuple_ip(struct nfattr *attr, struct ip_conntrack_tuple *tuple) } static const size_t cta_min_proto[CTA_PROTO_MAX] = { - [CTA_PROTO_NUM-1] = sizeof(u_int16_t), + [CTA_PROTO_NUM-1] = sizeof(u_int8_t), [CTA_PROTO_SRC_PORT-1] = sizeof(u_int16_t), [CTA_PROTO_DST_PORT-1] = sizeof(u_int16_t), [CTA_PROTO_ICMP_TYPE-1] = sizeof(u_int8_t), @@ -528,7 +528,7 @@ ctnetlink_parse_tuple_proto(struct nfattr *attr, if (!tb[CTA_PROTO_NUM-1]) return -EINVAL; - tuple->dst.protonum = *(u_int16_t *)NFA_DATA(tb[CTA_PROTO_NUM-1]); + tuple->dst.protonum = *(u_int8_t *)NFA_DATA(tb[CTA_PROTO_NUM-1]); proto = ip_conntrack_proto_find_get(tuple->dst.protonum); |