diff options
author | 2001-07-25 03:28:19 +0000 | |
---|---|---|
committer | 2001-07-25 03:28:19 +0000 | |
commit | 00cd3058c6df8a207d26a68eda0726df1030f5e4 (patch) | |
tree | d180c01251b5cbdaebe9f0a8c456761c9c10db7f | |
parent | sync (diff) | |
download | wireguard-openbsd-00cd3058c6df8a207d26a68eda0726df1030f5e4.tar.xz wireguard-openbsd-00cd3058c6df8a207d26a68eda0726df1030f5e4.zip |
Initialization of arpcom * based on ifp was too soon: ifp can change as
a result of a call to bridge_input().
-rw-r--r-- | sys/net/if_ethersubr.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 622c73107b9..418aae30b1e 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ethersubr.c,v 1.52 2001/06/27 06:07:40 kjc Exp $ */ +/* $OpenBSD: if_ethersubr.c,v 1.53 2001/07/25 03:28:19 jason Exp $ */ /* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */ /* @@ -715,7 +715,7 @@ ether_input(ifp, eh, m) u_int16_t etype; int s, llcfound = 0; register struct llc *l; - struct arpcom *ac = (struct arpcom *)ifp; + struct arpcom *ac; if ((ifp->if_flags & IFF_UP) == 0) { m_freem(m); @@ -783,6 +783,8 @@ ether_input(ifp, eh, m) } #endif /* NVLAN > 0 */ + ac = (struct arpcom *)ifp; + /* * If packet is unicast and we're in promiscuous mode, make sure it * is for us. Drop otherwise. |