linux/3.2: show correct name for MIPS 24KEc in /proc/cpuinfo
[openwrt.git] / target / linux / generic / patches-2.6.31 / 300-ipv6_accept_ra_when_forwarding.patch
1 --- a/net/ipv6/ndisc.c
2 +++ b/net/ipv6/ndisc.c
3 @@ -1106,6 +1106,18 @@ errout:
4 rtnl_set_sk_err(net, RTNLGRP_ND_USEROPT, err);
5 }
6
7 +static inline int accept_ra(struct inet6_dev *in6_dev)
8 +{
9 + /*
10 + * If forwarding is enabled, RA are not accepted unless the special
11 + * hybrid mode (accept_ra=2) is enabled.
12 + */
13 + if (in6_dev->cnf.forwarding && in6_dev->cnf.accept_ra < 2)
14 + return 0;
15 +
16 + return in6_dev->cnf.accept_ra;
17 +}
18 +
19 static void ndisc_router_discovery(struct sk_buff *skb)
20 {
21 struct ra_msg *ra_msg = (struct ra_msg *)skb_transport_header(skb);
22 @@ -1151,7 +1163,7 @@ static void ndisc_router_discovery(struc
23 skb->dev->name);
24 return;
25 }
26 - if (in6_dev->cnf.forwarding || !in6_dev->cnf.accept_ra) {
27 + if (!accept_ra(in6_dev)) {
28 in6_dev_put(in6_dev);
29 return;
30 }
This page took 0.047546 seconds and 5 git commands to generate.