Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213888
b: refs/heads/master
c: aca071c
h: refs/heads/master
v: v3
  • Loading branch information
Changli Gao authored and David S. Miller committed Aug 20, 2010
1 parent 24e2dda commit 8ccbb29
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3d04ebb6ab2ac9a3bea7644f0d13cdf65002b870
refs/heads/master: aca071c1c1c07bcc0b100b7c58e59790d6be6a69
15 changes: 5 additions & 10 deletions trunk/net/netfilter/xt_hashlimit.c
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@ hashlimit_init_dst(const struct xt_hashlimit_htable *hinfo,
{
__be16 _ports[2], *ports;
u8 nexthdr;
int poff;

memset(dst, 0, sizeof(*dst));

Expand Down Expand Up @@ -492,19 +493,13 @@ hashlimit_init_dst(const struct xt_hashlimit_htable *hinfo,
return 0;
}

switch (nexthdr) {
case IPPROTO_TCP:
case IPPROTO_UDP:
case IPPROTO_UDPLITE:
case IPPROTO_SCTP:
case IPPROTO_DCCP:
ports = skb_header_pointer(skb, protoff, sizeof(_ports),
poff = proto_ports_offset(nexthdr);
if (poff >= 0) {
ports = skb_header_pointer(skb, protoff + poff, sizeof(_ports),
&_ports);
break;
default:
} else {
_ports[0] = _ports[1] = 0;
ports = _ports;
break;
}
if (!ports)
return -1;
Expand Down

0 comments on commit 8ccbb29

Please sign in to comment.