aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2005-12-14 02:24:28 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-01-03 16:10:51 -0500
commit399c07def62a77678d633f5b3005431423a424a8 (patch)
tree2444dc64ab451366dc81ecdf4c72a57a7d3c5cc0 /net/ipv6
parentf21e68caa0ddffddf98a1e729e734a470957b6ec (diff)
[IPV6]: Export ipv6_opt_accepted
It was already non-TCP specific, will be used by DCCPv6. Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/af_inet6.c21
-rw-r--r--net/ipv6/tcp_ipv6.c16
2 files changed, 21 insertions, 16 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
664EXPORT_SYMBOL_GPL(inet6_sk_rebuild_header); 664EXPORT_SYMBOL_GPL(inet6_sk_rebuild_header);
665 665
666int 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
685EXPORT_SYMBOL_GPL(ipv6_opt_accepted);
686
666int 687int
667snmp6_mib_init(void *ptr[2], size_t mibsize, size_t mibalign) 688snmp6_mib_init(void *ptr[2], size_t mibsize, size_t mibalign)
668{ 689{
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index cb880079daf3..e5c8a669e84e 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -711,22 +711,6 @@ static struct request_sock_ops tcp6_request_sock_ops = {
711 .send_reset = tcp_v6_send_reset 711 .send_reset = tcp_v6_send_reset
712}; 712};
713 713
714static int ipv6_opt_accepted(struct sock *sk, struct sk_buff *skb)
715{
716 struct ipv6_pinfo *np = inet6_sk(sk);
717 struct inet6_skb_parm *opt = IP6CB(skb);
718
719 if (np->rxopt.all) {
720 if ((opt->hop && (np->rxopt.bits.hopopts || np->rxopt.bits.ohopopts)) ||
721 ((IPV6_FLOWINFO_MASK & *(u32*)skb->nh.raw) && np->rxopt.bits.rxflow) ||
722 (opt->srcrt && (np->rxopt.bits.srcrt || np->rxopt.bits.osrcrt)) ||
723 ((opt->dst1 || opt->dst0) && (np->rxopt.bits.dstopts || np->rxopt.bits.odstopts)))
724 return 1;
725 }
726 return 0;
727}
728
729
730static void tcp_v6_send_check(struct sock *sk, int len, struct sk_buff *skb) 714static void tcp_v6_send_check(struct sock *sk, int len, struct sk_buff *skb)
731{ 715{
732 struct ipv6_pinfo *np = inet6_sk(sk); 716 struct ipv6_pinfo *np = inet6_sk(sk);