summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2015-11-03 15:59:31 +0000
committermpi <mpi@openbsd.org>2015-11-03 15:59:31 +0000
commitfd8d255a116d684122fa7367c9b5f36f1008318e (patch)
treea40623b007c62bcb339ecc3e1918793370057371
parentDetach the client we are looping over, from Thomas Adam. (diff)
downloadwireguard-openbsd-fd8d255a116d684122fa7367c9b5f36f1008318e.tar.xz
wireguard-openbsd-fd8d255a116d684122fa7367c9b5f36f1008318e.zip
Recognize carp(4) interfaces (yes, they are special...) in order to send
the src lladdr option. Problem reported and diff provided by Lauri Tirkkonen on bugs@ ok sthen@
-rw-r--r--usr.sbin/rtadvd/if.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/rtadvd/if.c b/usr.sbin/rtadvd/if.c
index 74831727d34..169113f60cd 100644
--- a/usr.sbin/rtadvd/if.c
+++ b/usr.sbin/rtadvd/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.29 2015/10/25 22:11:34 jca Exp $ */
+/* $OpenBSD: if.c,v 1.30 2015/11/03 15:59:31 mpi Exp $ */
/* $KAME: if.c,v 1.17 2001/01/21 15:27:30 itojun Exp $ */
/*
@@ -180,6 +180,7 @@ int
lladdropt_length(struct sockaddr_dl *sdl)
{
switch (sdl->sdl_type) {
+ case IFT_CARP:
case IFT_ETHER:
case IFT_FDDI:
return(ROUNDUP8(ETHER_ADDR_LEN + 2));
@@ -196,6 +197,7 @@ lladdropt_fill(struct sockaddr_dl *sdl, struct nd_opt_hdr *ndopt)
ndopt->nd_opt_type = ND_OPT_SOURCE_LINKADDR; /* fixed */
switch (sdl->sdl_type) {
+ case IFT_CARP:
case IFT_ETHER:
case IFT_FDDI:
ndopt->nd_opt_len = (ROUNDUP8(ETHER_ADDR_LEN + 2)) >> 3;