netfilter: use unsigned variables for packet lengths in ip[6]_queue.
authorDave Jones <davej@redhat.com>
Sat, 28 May 2011 00:36:51 +0000 (20:36 -0400)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 5 Jun 2011 23:37:16 +0000 (01:37 +0200)
Netlink message lengths can't be negative, so use unsigned variables.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/ipv4/netfilter/ip_queue.c
net/ipv6/netfilter/ip6_queue.c

index d2c1311..f7f9bd7 100644 (file)
@@ -402,7 +402,8 @@ ipq_dev_drop(int ifindex)
 static inline void
 __ipq_rcv_skb(struct sk_buff *skb)
 {
-       int status, type, pid, flags, nlmsglen, skblen;
+       int status, type, pid, flags;
+       unsigned int nlmsglen, skblen;
        struct nlmsghdr *nlh;
 
        skblen = skb->len;
index 413ab07..065fe40 100644 (file)
@@ -403,7 +403,8 @@ ipq_dev_drop(int ifindex)
 static inline void
 __ipq_rcv_skb(struct sk_buff *skb)
 {
-       int status, type, pid, flags, nlmsglen, skblen;
+       int status, type, pid, flags;
+       unsigned int nlmsglen, skblen;
        struct nlmsghdr *nlh;
 
        skblen = skb->len;