Skip to content

Commit

Permalink
ipv6: send unsolicited neighbour advertisements to all-nodes
Browse files Browse the repository at this point in the history
As documented in RFC4861 (Neighbor Discovery for IP version 6) 7.2.6.,
unsolicited neighbour advertisements should be sent to the all-nodes
multicast address.

Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Hannes Frederic Sowa authored and David S. Miller committed Nov 9, 2012
1 parent a66fe16 commit 60713a0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/ipv6/ndisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,15 +535,14 @@ static void ndisc_send_unsol_na(struct net_device *dev)
{
struct inet6_dev *idev;
struct inet6_ifaddr *ifa;
struct in6_addr mcaddr;
struct in6_addr mcaddr = IN6ADDR_LINKLOCAL_ALLNODES_INIT;

idev = in6_dev_get(dev);
if (!idev)
return;

read_lock_bh(&idev->lock);
list_for_each_entry(ifa, &idev->addr_list, if_list) {
addrconf_addr_solict_mult(&ifa->addr, &mcaddr);
ndisc_send_na(dev, NULL, &mcaddr, &ifa->addr,
/*router=*/ !!idev->cnf.forwarding,
/*solicited=*/ false, /*override=*/ true,
Expand Down

0 comments on commit 60713a0

Please sign in to comment.