Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15542
b: refs/heads/master
c: 399c07d
h: refs/heads/master
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo authored and David S. Miller committed Jan 3, 2006
1 parent 3de8708 commit f00ccf6
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f21e68caa0ddffddf98a1e729e734a470957b6ec
refs/heads/master: 399c07def62a77678d633f5b3005431423a424a8
2 changes: 2 additions & 0 deletions trunk/include/net/ipv6.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ extern struct ipv6_txoptions * ipv6_renew_options(struct sock *sk, struct ipv6_t
struct ipv6_txoptions *ipv6_fixup_options(struct ipv6_txoptions *opt_space,
struct ipv6_txoptions *opt);

extern int ipv6_opt_accepted(struct sock *sk, struct sk_buff *skb);

extern int ip6_frag_nqueues;
extern atomic_t ip6_frag_mem;

Expand Down
21 changes: 21 additions & 0 deletions trunk/net/ipv6/af_inet6.c
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,27 @@ int inet6_sk_rebuild_header(struct sock *sk)

EXPORT_SYMBOL_GPL(inet6_sk_rebuild_header);

int ipv6_opt_accepted(struct sock *sk, struct sk_buff *skb)
{
struct ipv6_pinfo *np = inet6_sk(sk);
struct inet6_skb_parm *opt = IP6CB(skb);

if (np->rxopt.all) {
if ((opt->hop && (np->rxopt.bits.hopopts ||
np->rxopt.bits.ohopopts)) ||
((IPV6_FLOWINFO_MASK & *(u32*)skb->nh.raw) &&
np->rxopt.bits.rxflow) ||
(opt->srcrt && (np->rxopt.bits.srcrt ||
np->rxopt.bits.osrcrt)) ||
((opt->dst1 || opt->dst0) &&
(np->rxopt.bits.dstopts || np->rxopt.bits.odstopts)))
return 1;
}
return 0;
}

EXPORT_SYMBOL_GPL(ipv6_opt_accepted);

int
snmp6_mib_init(void *ptr[2], size_t mibsize, size_t mibalign)
{
Expand Down
16 changes: 0 additions & 16 deletions trunk/net/ipv6/tcp_ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -711,22 +711,6 @@ static struct request_sock_ops tcp6_request_sock_ops = {
.send_reset = tcp_v6_send_reset
};

static int ipv6_opt_accepted(struct sock *sk, struct sk_buff *skb)
{
struct ipv6_pinfo *np = inet6_sk(sk);
struct inet6_skb_parm *opt = IP6CB(skb);

if (np->rxopt.all) {
if ((opt->hop && (np->rxopt.bits.hopopts || np->rxopt.bits.ohopopts)) ||
((IPV6_FLOWINFO_MASK & *(u32*)skb->nh.raw) && np->rxopt.bits.rxflow) ||
(opt->srcrt && (np->rxopt.bits.srcrt || np->rxopt.bits.osrcrt)) ||
((opt->dst1 || opt->dst0) && (np->rxopt.bits.dstopts || np->rxopt.bits.odstopts)))
return 1;
}
return 0;
}


static void tcp_v6_send_check(struct sock *sk, int len, struct sk_buff *skb)
{
struct ipv6_pinfo *np = inet6_sk(sk);
Expand Down

0 comments on commit f00ccf6

Please sign in to comment.