[IPv6] route: Simplify ip6_del_rt()
Provide a simple ip6_del_rt() for the majority of users and an alternative for the exception via netlink. Avoids code obfuscation. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
e9ce1cd3cf
commit
e0a1ad73d3
@ -961,7 +961,7 @@ static void ndisc_recv_na(struct sk_buff *skb)
|
||||
struct rt6_info *rt;
|
||||
rt = rt6_get_dflt_router(saddr, dev);
|
||||
if (rt)
|
||||
ip6_del_rt(rt, NULL, NULL, NULL);
|
||||
ip6_del_rt(rt);
|
||||
}
|
||||
|
||||
out:
|
||||
@ -1114,7 +1114,7 @@ static void ndisc_router_discovery(struct sk_buff *skb)
|
||||
|
||||
if (rt && lifetime == 0) {
|
||||
neigh_clone(neigh);
|
||||
ip6_del_rt(rt, NULL, NULL, NULL);
|
||||
ip6_del_rt(rt);
|
||||
rt = NULL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user