ipv6: introduce neighbour discovery ops
This patch introduces neighbour discovery ops callback structure. The idea is to separate the handling for 6LoWPAN into the 6lowpan module. These callback offers 6lowpan different handling, such as 802.15.4 short address handling or RFC6775 (Neighbor Discovery Optimization for IPv6 over 6LoWPANs). Cc: David S. Miller <davem@davemloft.net> Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> Cc: James Morris <jmorris@namei.org> Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> Cc: Patrick McHardy <kaber@trash.net> Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: Alexander Aring <aar@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
4f672235cb
commit
f997c55c1d
@@ -2201,7 +2201,7 @@ static void rt6_do_redirect(struct dst_entry *dst, struct sock *sk, struct sk_bu
|
||||
* first-hop router for the specified ICMP Destination Address.
|
||||
*/
|
||||
|
||||
if (!ndisc_parse_options(msg->opt, optlen, &ndopts)) {
|
||||
if (!ndisc_parse_options(skb->dev, msg->opt, optlen, &ndopts)) {
|
||||
net_dbg_ratelimited("rt6_redirect: invalid ND options\n");
|
||||
return;
|
||||
}
|
||||
@@ -2236,12 +2236,12 @@ static void rt6_do_redirect(struct dst_entry *dst, struct sock *sk, struct sk_bu
|
||||
* We have finally decided to accept it.
|
||||
*/
|
||||
|
||||
neigh_update(neigh, lladdr, NUD_STALE,
|
||||
ndisc_update(skb->dev, neigh, lladdr, NUD_STALE,
|
||||
NEIGH_UPDATE_F_WEAK_OVERRIDE|
|
||||
NEIGH_UPDATE_F_OVERRIDE|
|
||||
(on_link ? 0 : (NEIGH_UPDATE_F_OVERRIDE_ISROUTER|
|
||||
NEIGH_UPDATE_F_ISROUTER))
|
||||
);
|
||||
NEIGH_UPDATE_F_ISROUTER)),
|
||||
NDISC_REDIRECT, &ndopts);
|
||||
|
||||
nrt = ip6_rt_cache_alloc(rt, &msg->dest, NULL);
|
||||
if (!nrt)
|
||||
|
Reference in New Issue
Block a user