diff options
author | 2006-07-01 19:30:51 +0000 | |
---|---|---|
committer | 2006-07-01 19:30:51 +0000 | |
commit | 835123099e8caedc13da6545721153b5c5a146a7 (patch) | |
tree | a862709129b45c130dec84b6f5da6fe5c7b403e7 | |
parent | remove some unneeded includes; one found by vetinari (diff) | |
download | wireguard-openbsd-835123099e8caedc13da6545721153b5c5a146a7.tar.xz wireguard-openbsd-835123099e8caedc13da6545721153b5c5a146a7.zip |
update the 802.11 address as well if the interface mac address has
been changed by the user, ie. with the ifconfig lladdr command. this
also replaces the old wicontrol -m option.
this closes pr 5159 from peter philipp at freenet dot de.
-rw-r--r-- | sys/dev/ic/if_wi.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/ic/if_wi.c b/sys/dev/ic/if_wi.c index be80a746fa4..d3edc64a5ab 100644 --- a/sys/dev/ic/if_wi.c +++ b/sys/dev/ic/if_wi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wi.c,v 1.131 2006/06/27 20:55:51 reyk Exp $ */ +/* $OpenBSD: if_wi.c,v 1.132 2006/07/01 19:30:51 reyk Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -127,7 +127,7 @@ u_int32_t widebug = WIDEBUG; #if !defined(lint) && !defined(__OpenBSD__) static const char rcsid[] = - "$OpenBSD: if_wi.c,v 1.131 2006/06/27 20:55:51 reyk Exp $"; + "$OpenBSD: if_wi.c,v 1.132 2006/07/01 19:30:51 reyk Exp $"; #endif /* lint */ #ifdef foo @@ -2148,8 +2148,10 @@ wi_init_io(struct wi_softc *sc) /* Set our MAC address. */ mac.wi_len = 4; mac.wi_type = WI_RID_MAC_NODE; + bcopy(LLADDR(ifp->if_sadl), + (char *)&sc->sc_ic.ic_myaddr, ETHER_ADDR_LEN); bcopy((char *)&sc->sc_ic.ic_myaddr, - (char *)&mac.wi_mac_addr, ETHER_ADDR_LEN); + (char *)&mac.wi_mac_addr, ETHER_ADDR_LEN); wi_write_record(sc, (struct wi_ltv_gen *)&mac); /* |