-/* $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>
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) {
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,