diff options
Diffstat (limited to 'net/ipv6/af_inet6.c')
-rw-r--r-- | net/ipv6/af_inet6.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 23675ef1f428..bf17aab9b776 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -663,6 +663,27 @@ int inet6_sk_rebuild_header(struct sock *sk) | |||
663 | 663 | ||
664 | EXPORT_SYMBOL_GPL(inet6_sk_rebuild_header); | 664 | EXPORT_SYMBOL_GPL(inet6_sk_rebuild_header); |
665 | 665 | ||
666 | int ipv6_opt_accepted(struct sock *sk, struct sk_buff *skb) | ||
667 | { | ||
668 | struct ipv6_pinfo *np = inet6_sk(sk); | ||
669 | struct inet6_skb_parm *opt = IP6CB(skb); | ||
670 | |||
671 | if (np->rxopt.all) { | ||
672 | if ((opt->hop && (np->rxopt.bits.hopopts || | ||
673 | np->rxopt.bits.ohopopts)) || | ||
674 | ((IPV6_FLOWINFO_MASK & *(u32*)skb->nh.raw) && | ||
675 | np->rxopt.bits.rxflow) || | ||
676 | (opt->srcrt && (np->rxopt.bits.srcrt || | ||
677 | np->rxopt.bits.osrcrt)) || | ||
678 | ((opt->dst1 || opt->dst0) && | ||
679 | (np->rxopt.bits.dstopts || np->rxopt.bits.odstopts))) | ||
680 | return 1; | ||
681 | } | ||
682 | return 0; | ||
683 | } | ||
684 | |||
685 | EXPORT_SYMBOL_GPL(ipv6_opt_accepted); | ||
686 | |||
666 | int | 687 | int |
667 | snmp6_mib_init(void *ptr[2], size_t mibsize, size_t mibalign) | 688 | snmp6_mib_init(void *ptr[2], size_t mibsize, size_t mibalign) |
668 | { | 689 | { |