X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=net%2Fipv4%2Fip_options.c;h=406056edc02ba94f529ad6befb2c0fb934c53099;hb=9a2ded55c40ad17b8b12f87c592a40b2e8593c4d;hp=dbe12da8d8b3960fe7dc796de97eae2546e1528d;hpb=a7c243b544c0e9f6775c2607decaa59d54fb9e11;p=powerpc.git diff --git a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c index dbe12da8d8..406056edc0 100644 --- a/net/ipv4/ip_options.c +++ b/net/ipv4/ip_options.c @@ -11,6 +11,7 @@ * */ +#include #include #include #include @@ -22,6 +23,7 @@ #include #include #include +#include /* * Write options to IP header, record destination address to @@ -207,7 +209,7 @@ int ip_options_echo(struct ip_options * dopt, struct sk_buff * skb) void ip_options_fragment(struct sk_buff * skb) { - unsigned char * optptr = skb->nh.raw; + unsigned char * optptr = skb->nh.raw + sizeof(struct iphdr); struct ip_options * opt = &(IPCB(skb)->opt); int l = opt->optlen; int optlen; @@ -254,7 +256,6 @@ int ip_options_compile(struct ip_options * opt, struct sk_buff * skb) if (!opt) { opt = &(IPCB(skb)->opt); - memset(opt, 0, sizeof(struct ip_options)); iph = skb->nh.raw; opt->optlen = ((struct iphdr *)iph)->ihl*4 - sizeof(struct iphdr); optptr = iph + sizeof(struct iphdr);