diff options
author | Patrick McHardy <kaber@trash.net> | 2011-12-23 08:01:26 -0500 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2011-12-23 08:36:46 -0500 |
commit | 0af051baa8444b7453235552911a353fc7b9bee7 (patch) | |
tree | 7eb7a0f34679385d2519e4adf6120c6f779a8336 /net/ipv4 | |
parent | 40cfb706cda2bacdecd6e5ab78a21456d28878c7 (diff) |
netfilter: nf_nat: remove obsolete check in nf_nat_mangle_udp_packet()
The packet size check originates from a time when UDP helpers could
accidentally mangle incorrect packets (NEWNAT) and is unnecessary
nowadays since the conntrack helpers invoke the NAT helpers for the
proper packet directly.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/netfilter/nf_nat_helper.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/net/ipv4/netfilter/nf_nat_helper.c b/net/ipv4/netfilter/nf_nat_helper.c index 049e8b7c3188..af65958f6308 100644 --- a/net/ipv4/netfilter/nf_nat_helper.c +++ b/net/ipv4/netfilter/nf_nat_helper.c | |||
@@ -253,12 +253,6 @@ nf_nat_mangle_udp_packet(struct sk_buff *skb, | |||
253 | struct udphdr *udph; | 253 | struct udphdr *udph; |
254 | int datalen, oldlen; | 254 | int datalen, oldlen; |
255 | 255 | ||
256 | /* UDP helpers might accidentally mangle the wrong packet */ | ||
257 | iph = ip_hdr(skb); | ||
258 | if (skb->len < iph->ihl*4 + sizeof(*udph) + | ||
259 | match_offset + match_len) | ||
260 | return 0; | ||
261 | |||
262 | if (!skb_make_writable(skb, skb->len)) | 256 | if (!skb_make_writable(skb, skb->len)) |
263 | return 0; | 257 | return 0; |
264 | 258 | ||