arpcom untangling:
consistently with the rest of the code, use IFP2AC(ifp) to access the arpcom structure given the ifp. In this case also fix a difference in assumptions WRT the rest of the net/ sources: it is not the 'struct *softc' that starts with a 'struct arpcom', but a 'struct arpcom' that starts with a 'struct ifnet'
This commit is contained in:
parent
56f7062728
commit
3fefbff0c2
@ -319,7 +319,7 @@ if_findindex(struct ifnet *ifp)
|
||||
case IFT_ISO88025:
|
||||
case IFT_L2VLAN:
|
||||
snprintf(eaddr, 18, "%6D",
|
||||
((struct arpcom *)ifp->if_softc)->ac_enaddr, ":");
|
||||
IFP2AC(ifp)->ac_enaddr, ":");
|
||||
break;
|
||||
default:
|
||||
eaddr[0] = '\0';
|
||||
@ -1979,7 +1979,7 @@ if_setlladdr(struct ifnet *ifp, const u_char *lladdr, int len)
|
||||
case IFT_XETHER:
|
||||
case IFT_ISO88025:
|
||||
case IFT_L2VLAN:
|
||||
bcopy(lladdr, ((struct arpcom *)ifp->if_softc)->ac_enaddr, len);
|
||||
bcopy(lladdr, IFP2AC(ifp)->ac_enaddr, len);
|
||||
/*
|
||||
* XXX We also need to store the lladdr in LLADDR(sdl),
|
||||
* which is done below. This is a pain because we must
|
||||
|
@ -691,7 +691,7 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
|
||||
struct sockaddr *sa;
|
||||
|
||||
sa = (struct sockaddr *) &ifr->ifr_data;
|
||||
bcopy(((struct arpcom *)ifp->if_softc)->ac_enaddr,
|
||||
bcopy(IFP2AC(ifp)->ac_enaddr,
|
||||
(caddr_t) sa->sa_data, ETHER_ADDR_LEN);
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user