summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2013-02-05 10:18:31 +0000
committerRoy Marples <roy@marples.name>2013-02-05 10:18:31 +0000
commit131fc5b92ef987000b8c66f0fc5c2d0df2ac46b8 (patch)
tree29ffb93e6eeb13e67d419c99d3b77f63b110983e
parent44e940cd03e08dd8b73d2ad90e4943899df28dcd (diff)
downloaddhcpcd-131fc5b92ef987000b8c66f0fc5c2d0df2ac46b8.tar.xz
If we have one interface enabled for IPv6 RS, we stupidly process
RAs for all interfaces we control. This patch fixes this and updates the man page to reflect this better.
-rw-r--r--dhcpcd.conf.5.in6
-rw-r--r--ipv6rs.c7
2 files changed, 10 insertions, 3 deletions
diff --git a/dhcpcd.conf.5.in b/dhcpcd.conf.5.in
index 7b75c97b..083b09cb 100644
--- a/dhcpcd.conf.5.in
+++ b/dhcpcd.conf.5.in
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2006-2012 Roy Marples
+.\" Copyright (c) 2006-2013 Roy Marples
.\" All rights reserved
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd October 11, 2012
+.Dd February 5, 2013
.Dt DHCPCD.CONF 5 SMM
.Os
.Sh NAME
@@ -200,7 +200,7 @@ See
.%T "RFC 3927"
.Re
.It Ic noipv6rs
-Disable solicition of IPv6 Router Advertisements.
+Disable solicitation and receipt of IPv6 Router Advertisements.
.It Ic nolink
Don't receive link messages about carrier status.
You should only set this for buggy interface drivers.
diff --git a/ipv6rs.c b/ipv6rs.c
index e2d9a162..8e371a8f 100644
--- a/ipv6rs.c
+++ b/ipv6rs.c
@@ -462,6 +462,13 @@ ipv6rs_handledata(_unused void *arg)
syslog(LOG_ERR, "RA for unexpected interface from %s", sfrom);
return;
}
+ if (!(ifp->options->options & DHCPCD_IPV6RS)) {
+#ifdef DEBUG_RS
+ syslog(LOG_DEBUG, "%s: unexpected RA from %s",
+ ifp->name, sfrom);
+#endif
+ return;
+ }
TAILQ_FOREACH(rap, &ipv6_routers, next) {
if (ifp == rap->iface &&
memcmp(rap->from.s6_addr, from.sin6_addr.s6_addr,