exthdrs.c (84a73014d86fd660822a20c032625e3afe99ca58) exthdrs.c (45f6fad84cc305103b28d73482b344d7f5b76f39)
1/*
2 * Extension Header handling for IPv6
3 * Linux INET6 implementation
4 *
5 * Authors:
6 * Pedro Roque <roque@di.fc.ul.pt>
7 * Andi Kleen <ak@muc.de>
8 * Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>

--- 713 unchanged lines hidden (view full) ---

722 if (opt2->hopopt)
723 *((char **)&opt2->hopopt) += dif;
724 if (opt2->dst0opt)
725 *((char **)&opt2->dst0opt) += dif;
726 if (opt2->dst1opt)
727 *((char **)&opt2->dst1opt) += dif;
728 if (opt2->srcrt)
729 *((char **)&opt2->srcrt) += dif;
1/*
2 * Extension Header handling for IPv6
3 * Linux INET6 implementation
4 *
5 * Authors:
6 * Pedro Roque <roque@di.fc.ul.pt>
7 * Andi Kleen <ak@muc.de>
8 * Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>

--- 713 unchanged lines hidden (view full) ---

722 if (opt2->hopopt)
723 *((char **)&opt2->hopopt) += dif;
724 if (opt2->dst0opt)
725 *((char **)&opt2->dst0opt) += dif;
726 if (opt2->dst1opt)
727 *((char **)&opt2->dst1opt) += dif;
728 if (opt2->srcrt)
729 *((char **)&opt2->srcrt) += dif;
730 atomic_set(&opt2->refcnt, 1);
730 }
731 return opt2;
732}
733EXPORT_SYMBOL_GPL(ipv6_dup_options);
734
735static int ipv6_renew_option(void *ohdr,
736 struct ipv6_opt_hdr __user *newopt, int newoptlen,
737 int inherit,

--- 47 unchanged lines hidden (view full) ---

785 return NULL;
786
787 tot_len += sizeof(*opt2);
788 opt2 = sock_kmalloc(sk, tot_len, GFP_ATOMIC);
789 if (!opt2)
790 return ERR_PTR(-ENOBUFS);
791
792 memset(opt2, 0, tot_len);
731 }
732 return opt2;
733}
734EXPORT_SYMBOL_GPL(ipv6_dup_options);
735
736static int ipv6_renew_option(void *ohdr,
737 struct ipv6_opt_hdr __user *newopt, int newoptlen,
738 int inherit,

--- 47 unchanged lines hidden (view full) ---

786 return NULL;
787
788 tot_len += sizeof(*opt2);
789 opt2 = sock_kmalloc(sk, tot_len, GFP_ATOMIC);
790 if (!opt2)
791 return ERR_PTR(-ENOBUFS);
792
793 memset(opt2, 0, tot_len);
793
794 atomic_set(&opt2->refcnt, 1);
794 opt2->tot_len = tot_len;
795 p = (char *)(opt2 + 1);
796
797 err = ipv6_renew_option(opt ? opt->hopopt : NULL, newopt, newoptlen,
798 newtype != IPV6_HOPOPTS,
799 &opt2->hopopt, &p);
800 if (err)
801 goto out;

--- 73 unchanged lines hidden ---
795 opt2->tot_len = tot_len;
796 p = (char *)(opt2 + 1);
797
798 err = ipv6_renew_option(opt ? opt->hopopt : NULL, newopt, newoptlen,
799 newtype != IPV6_HOPOPTS,
800 &opt2->hopopt, &p);
801 if (err)
802 goto out;

--- 73 unchanged lines hidden ---