Skip to content

Commit

Permalink
[NETFILTER]: nf_nat_sip: don't drop short packets
Browse files Browse the repository at this point in the history
Don't drop packets shorter than "SIP/2.0", just ignore them. Keep-alives
can validly be shorter for example.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Aug 14, 2007
1 parent aa584ed commit 45241a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/nf_nat_sip.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static unsigned int ip_nat_sip(struct sk_buff **pskb,
dataoff = ip_hdrlen(*pskb) + sizeof(struct udphdr);
datalen = (*pskb)->len - dataoff;
if (datalen < sizeof("SIP/2.0") - 1)
return NF_DROP;
return NF_ACCEPT;

addr_map_init(ct, &map);

Expand Down

0 comments on commit 45241a7

Please sign in to comment.