summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2013-01-28 09:47:15 +0000
committerRoy Marples <roy@marples.name>2013-01-28 09:47:15 +0000
commit90eef833b7a116ca62ac72c6a0a9e825b09eacae (patch)
treec67032f1bda0a8c41c2831f28b48cf6c5dac569c
parent7c85e58ae54defadcf8f16caaef09e23fddfe129 (diff)
downloaddhcpcd-90eef833b7a116ca62ac72c6a0a9e825b09eacae.tar.xz
Check the correct interface the RAP came from before overwriting it.
Thanks to Taylor R Campbell.
-rw-r--r--ipv6rs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ipv6rs.c b/ipv6rs.c
index 56fe2510..e2d9a162 100644
--- a/ipv6rs.c
+++ b/ipv6rs.c
@@ -463,7 +463,8 @@ ipv6rs_handledata(_unused void *arg)
return;
}
TAILQ_FOREACH(rap, &ipv6_routers, next) {
- if (memcmp(rap->from.s6_addr, from.sin6_addr.s6_addr,
+ if (ifp == rap->iface &&
+ memcmp(rap->from.s6_addr, from.sin6_addr.s6_addr,
sizeof(rap->from.s6_addr)) == 0)
break;
}