|
@@ -1151,10 +1151,6 @@ static void ndisc_router_discovery(struct sk_buff *skb)
|
|
skb->dev->name);
|
|
skb->dev->name);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if (in6_dev->cnf.forwarding || !in6_dev->cnf.accept_ra) {
|
|
|
|
- in6_dev_put(in6_dev);
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
|
|
|
|
if (!ndisc_parse_options(opt, optlen, &ndopts)) {
|
|
if (!ndisc_parse_options(opt, optlen, &ndopts)) {
|
|
in6_dev_put(in6_dev);
|
|
in6_dev_put(in6_dev);
|
|
@@ -1163,6 +1159,10 @@ static void ndisc_router_discovery(struct sk_buff *skb)
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /* skip route and link configuration on routers */
|
|
|
|
+ if (in6_dev->cnf.forwarding || !in6_dev->cnf.accept_ra)
|
|
|
|
+ goto skip_linkparms;
|
|
|
|
+
|
|
#ifdef CONFIG_IPV6_NDISC_NODETYPE
|
|
#ifdef CONFIG_IPV6_NDISC_NODETYPE
|
|
/* skip link-specific parameters from interior routers */
|
|
/* skip link-specific parameters from interior routers */
|
|
if (skb->ndisc_nodetype == NDISC_NODETYPE_NODEFAULT)
|
|
if (skb->ndisc_nodetype == NDISC_NODETYPE_NODEFAULT)
|
|
@@ -1283,9 +1283,7 @@ skip_defrtr:
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-#ifdef CONFIG_IPV6_NDISC_NODETYPE
|
|
|
|
skip_linkparms:
|
|
skip_linkparms:
|
|
-#endif
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
* Process options.
|
|
* Process options.
|
|
@@ -1312,6 +1310,10 @@ skip_linkparms:
|
|
NEIGH_UPDATE_F_ISROUTER);
|
|
NEIGH_UPDATE_F_ISROUTER);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /* skip route and link configuration on routers */
|
|
|
|
+ if (in6_dev->cnf.forwarding || !in6_dev->cnf.accept_ra)
|
|
|
|
+ goto out;
|
|
|
|
+
|
|
#ifdef CONFIG_IPV6_ROUTE_INFO
|
|
#ifdef CONFIG_IPV6_ROUTE_INFO
|
|
if (in6_dev->cnf.accept_ra_rtr_pref && ndopts.nd_opts_ri) {
|
|
if (in6_dev->cnf.accept_ra_rtr_pref && ndopts.nd_opts_ri) {
|
|
struct nd_opt_hdr *p;
|
|
struct nd_opt_hdr *p;
|