The MAC address might need to be copied to the arpcom structure as well

(the 3com driver needs this, for example).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22814 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2007-11-03 15:10:22 +00:00
parent 3e01ad3517
commit e60d7937c9
+7 -2
View File
@@ -289,7 +289,7 @@ ether_input(struct ifnet *ifp, struct mbuf *m)
void
ether_ifattach(struct ifnet *ifp, const uint8_t *mac_address)
ether_ifattach(struct ifnet *ifp, const uint8_t *macAddress)
{
ifp->if_addrlen = ETHER_ADDR_LEN;
ifp->if_hdrlen = ETHER_HDR_LEN;
@@ -300,7 +300,12 @@ ether_ifattach(struct ifnet *ifp, const uint8_t *mac_address)
ifp->if_resolvemulti = NULL; /* done in the stack */
ifp->if_lladdr.sdl_family = AF_LINK;
memcpy(IF_LLADDR(ifp), mac_address, ETHER_ADDR_LEN);
memcpy(IF_LLADDR(ifp), macAddress, ETHER_ADDR_LEN);
// TODO: according to FreeBSD's if_ethersubr.c, this should be removed
// once all drivers are cleaned up.
if (macAddress != IFP2ENADDR(ifp))
memcpy(IFP2ENADDR(ifp), macAddress, ETHER_ADDR_LEN);
ifp->if_init(ifp->if_softc);
}