mirror of
https://github.com/rsmarples/dhcpcd.git
synced 2024-11-24 02:24:35 +08:00
OpenBSD: Ensure if_afreq is correct initialised.
This commit is contained in:
parent
27c0b01164
commit
008121afd0
@ -1763,10 +1763,9 @@ ip6_forwarding(__unused const char *ifname)
|
||||
static int
|
||||
if_af_attach(const struct interface *ifp, int af)
|
||||
{
|
||||
struct if_afreq ifar;
|
||||
struct if_afreq ifar = { .ifar_af = af };
|
||||
|
||||
strlcpy(ifar.ifar_name, ifp->name, sizeof(ifar.ifar_name));
|
||||
ifar.ifar_af = af;
|
||||
return if_ioctl6(ifp->ctx, SIOCIFAFATTACH, &ifar, sizeof(ifar));
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user