diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2021-10-20 07:04:50 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2021-10-20 07:04:50 +0000 |
commit | f3a6455befe016c27b87a003b2c2d449b4ddb170 (patch) | |
tree | a868501817d9e8d07e20da3a3bae6a06895e69a3 /sbin | |
parent | 47b23ec03efc1b932be87067956839394671386c (diff) |
Do not ignore carp(4) interfaces.
Problem reported by Guy Godfroy on bugs, thanks!
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/dhcpleased/frontend.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sbin/dhcpleased/frontend.c b/sbin/dhcpleased/frontend.c index aecdfd72911..5131dce1471 100644 --- a/sbin/dhcpleased/frontend.c +++ b/sbin/dhcpleased/frontend.c @@ -1,4 +1,4 @@ -/* $OpenBSD: frontend.c,v 1.22 2021/09/14 07:51:51 florian Exp $ */ +/* $OpenBSD: frontend.c,v 1.23 2021/10/20 07:04:49 florian Exp $ */ /* * Copyright (c) 2017, 2021 Florian Obser <florian@openbsd.org> @@ -601,8 +601,8 @@ update_iface(struct if_msghdr *ifm, struct sockaddr_dl *sdl) ifinfo.running = (flags & (IFF_UP | IFF_RUNNING)) == (IFF_UP | IFF_RUNNING); - if (sdl != NULL && sdl->sdl_type == IFT_ETHER && - sdl->sdl_alen == ETHER_ADDR_LEN) + if (sdl != NULL && (sdl->sdl_type == IFT_ETHER || + sdl->sdl_type == IFT_CARP) && sdl->sdl_alen == ETHER_ADDR_LEN) memcpy(ifinfo.hw_address.ether_addr_octet, LLADDR(sdl), ETHER_ADDR_LEN); else if (iface == NULL) { @@ -691,7 +691,8 @@ init_ifaces(void) struct sockaddr_dl *sdl; sdl = (struct sockaddr_dl *)ifa->ifa_addr; - if (sdl->sdl_type != IFT_ETHER || + if ((sdl->sdl_type != IFT_ETHER && + sdl->sdl_type != IFT_CARP) || sdl->sdl_alen != ETHER_ADDR_LEN) continue; memcpy(ifinfo.hw_address.ether_addr_octet, |