Commit d2e7f926 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] Fix for NAT core on nonlinear skbs

The nat core calls skb_ip_make_writable() with a length too short.
Found by nfsim.
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 734c53f3
......@@ -466,7 +466,7 @@ manip_pkt(u_int16_t proto,
struct iphdr *iph;
(*pskb)->nfcache |= NFC_ALTERED;
if (!skb_ip_make_writable(pskb, iphdroff+sizeof(iph)))
if (!skb_ip_make_writable(pskb, iphdroff+sizeof(*iph)))
return 0;
iph = (void *)(*pskb)->data + iphdroff;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment