浏览代码

netfilter: use unsigned variables for packet lengths in ip[6]_queue.

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>
Dave Jones 14 年之前
父节点
当前提交
d232b8dded
共有 2 个文件被更改,包括 4 次插入2 次删除
  1. 2 1
      net/ipv4/netfilter/ip_queue.c
  2. 2 1
      net/ipv6/netfilter/ip6_queue.c

+ 2 - 1
net/ipv4/netfilter/ip_queue.c

@@ -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;

+ 2 - 1
net/ipv6/netfilter/ip6_queue.c

@@ -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;