diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-03-10 12:21:36 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-03-10 12:21:36 +0000 |
commit | 0c2795b2cd05fc562928d327b09541d00410e736 (patch) | |
tree | 2c2bb8630065326e82f9fad6f3345bba817d4c8a /sys | |
parent | 60dbcdeefe563b8ecef3452556ae0e52b8ef0fc0 (diff) |
if_lladdr -> if_sadl, no functional change.
ok mikeb@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/if_trunk.c | 6 | ||||
-rw-r--r-- | sys/net/if_vlan.c | 13 | ||||
-rw-r--r-- | sys/netinet/if_ether.c | 4 |
3 files changed, 8 insertions, 15 deletions
diff --git a/sys/net/if_trunk.c b/sys/net/if_trunk.c index 9669c8bdd08..a9026e5614f 100644 --- a/sys/net/if_trunk.c +++ b/sys/net/if_trunk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_trunk.c,v 1.86 2013/11/21 16:16:08 mpi Exp $ */ +/* $OpenBSD: if_trunk.c,v 1.87 2014/03/10 12:21:35 mpi Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Reyk Floeter <reyk@openbsd.org> @@ -246,11 +246,9 @@ void trunk_lladdr(struct arpcom *ac, u_int8_t *lladdr) { struct ifnet *ifp = &ac->ac_if; - struct ifaddr *ifa; struct sockaddr_dl *sdl; - ifa = ifp->if_lladdr; - sdl = (struct sockaddr_dl *)ifa->ifa_addr; + sdl = ifp->if_sadl; sdl->sdl_type = IFT_ETHER; sdl->sdl_alen = ETHER_ADDR_LEN; bcopy(lladdr, LLADDR(sdl), ETHER_ADDR_LEN); diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index ae2af7dc60c..274364993b1 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vlan.c,v 1.101 2013/11/08 09:18:27 mpi Exp $ */ +/* $OpenBSD: if_vlan.c,v 1.102 2014/03/10 12:21:35 mpi Exp $ */ /* * Copyright 1998 Massachusetts Institute of Technology @@ -348,7 +348,6 @@ vlan_input(struct ether_header *eh, struct mbuf *m) int vlan_config(struct ifvlan *ifv, struct ifnet *p, u_int16_t tag) { - struct ifaddr *ifa1, *ifa2; struct sockaddr_dl *sdl1, *sdl2; struct vlan_taghash *tagh; u_int flags; @@ -427,10 +426,8 @@ vlan_config(struct ifvlan *ifv, struct ifnet *p, u_int16_t tag) * Set up our ``Ethernet address'' to reflect the underlying * physical interface's. */ - ifa1 = ifv->ifv_if.if_lladdr; - ifa2 = p->if_lladdr; - sdl1 = (struct sockaddr_dl *)ifa1->ifa_addr; - sdl2 = (struct sockaddr_dl *)ifa2->ifa_addr; + sdl1 = ifv->ifv_if.if_sadl; + sdl2 = p->if_sadl; sdl1->sdl_type = IFT_ETHER; sdl1->sdl_alen = ETHER_ADDR_LEN; bcopy(LLADDR(sdl2), LLADDR(sdl1), ETHER_ADDR_LEN); @@ -458,7 +455,6 @@ vlan_config(struct ifvlan *ifv, struct ifnet *p, u_int16_t tag) int vlan_unconfig(struct ifnet *ifp, struct ifnet *newp) { - struct ifaddr *ifa; struct sockaddr_dl *sdl; struct ifvlan *ifv; struct ifnet *p; @@ -501,8 +497,7 @@ vlan_unconfig(struct ifnet *ifp, struct ifnet *newp) ifv->ifv_flags = 0; /* Clear our MAC address. */ - ifa = ifv->ifv_if.if_lladdr; - sdl = (struct sockaddr_dl *)ifa->ifa_addr; + sdl = ifv->ifv_if.if_sadl; sdl->sdl_type = IFT_ETHER; sdl->sdl_alen = ETHER_ADDR_LEN; bzero(LLADDR(sdl), ETHER_ADDR_LEN); diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index 828f1f08681..b72235d73db 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ether.c,v 1.118 2014/01/22 06:28:09 claudio Exp $ */ +/* $OpenBSD: if_ether.c,v 1.119 2014/03/10 12:21:35 mpi Exp $ */ /* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */ /* @@ -849,7 +849,7 @@ arpproxy(struct in_addr in, u_int rdomain) continue; if (!memcmp(LLADDR((struct sockaddr_dl *)la->la_rt->rt_gateway), - LLADDR((struct sockaddr_dl *)ifp->if_lladdr->ifa_addr), + LLADDR(ifp->if_sadl), ETHER_ADDR_LEN)) { found = 1; break; |