Skip to content

Commit

Permalink
netfilter: use unsigned variables for packet lengths in ip[6]_queue.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dave Jones authored and Pablo Neira Ayuso committed Jun 5, 2011
1 parent 88ed01d commit d232b8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion net/ipv4/netfilter/ip_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion net/ipv6/netfilter/ip6_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d232b8d

Please sign in to comment.