Skip to content

Commit

Permalink
ipv6: Make 'addrconf_rs_timer' send Router Solicitations (and re-arm …
Browse files Browse the repository at this point in the history
…itself) if Router Advertisements are accepted

As of 026359b [ipv6: Send ICMPv6 RSes only when RAs are accepted],
Router Solicitations are sent whenever kernel accepts Router
Advertisements on the interface.

However, this logic isn't reflected in 'addrconf_rs_timer'.

The timer fails to issue subsequent RS messages (and fails to re-arm
itself) if forwarding is enabled and the special hybrid mode is
enabled (accept_ra=2).

Fix the condition determining whether next RS should be sent, by using
'ipv6_accept_ra()'.

Reported-by: Ami Koren <amikoren@yahoo.com>
Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Shmulik Ladkani authored and David S. Miller committed Dec 3, 2012
1 parent 1c85382 commit 9ba2add
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2988,7 +2988,7 @@ static void addrconf_rs_timer(unsigned long data)
if (idev->dead || !(idev->if_flags & IF_READY))
goto out;

if (idev->cnf.forwarding)
if (!ipv6_accept_ra(idev))
goto out;

/* Announcement received after solicitation was sent */
Expand Down

0 comments on commit 9ba2add

Please sign in to comment.