diff options
Diffstat (limited to 'sys/net/if_vlan.c')
-rw-r--r-- | sys/net/if_vlan.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 815ae37..d84a4b9 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -487,8 +487,8 @@ vlan_config(struct ifvlan *ifv, struct ifnet *p) * Set up our ``Ethernet address'' to reflect the underlying * physical interface's. */ - ifa1 = ifnet_addrs[ifv->ifv_if.if_index - 1]; - ifa2 = ifnet_addrs[p->if_index - 1]; + ifa1 = ifaddr_byindex(ifv->ifv_if.if_index); + ifa2 = ifaddr_byindex(p->if_index); sdl1 = (struct sockaddr_dl *)ifa1->ifa_addr; sdl2 = (struct sockaddr_dl *)ifa2->ifa_addr; sdl1->sdl_type = IFT_ETHER; @@ -549,7 +549,7 @@ vlan_unconfig(struct ifnet *ifp) ifv->ifv_if.if_mtu = ETHERMTU; /* Clear our MAC address. */ - ifa = ifnet_addrs[ifv->ifv_if.if_index - 1]; + ifa = ifaddr_byindex(ifv->ifv_if.if_index); sdl = (struct sockaddr_dl *)ifa->ifa_addr; sdl->sdl_type = IFT_ETHER; sdl->sdl_alen = ETHER_ADDR_LEN; |