summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1999-11-11 22:23:58 +0000
committerjulian <julian@FreeBSD.org>1999-11-11 22:23:58 +0000
commit2df28cd3feb4dc03f845eeb69c859b61fe887418 (patch)
tree97402a5504db3f09568afa2b8d472f4b657c4678 /sys/net
parent30ceb7c670a3387ada379c6b921f203425f70ec3 (diff)
downloadFreeBSD-src-2df28cd3feb4dc03f845eeb69c859b61fe887418.zip
FreeBSD-src-2df28cd3feb4dc03f845eeb69c859b61fe887418.tar.gz
Oops forgot to put the source MAC address on outgoing packets!
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_ethersubr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 587d0e3..e3c110e 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -1082,6 +1082,9 @@ ngether_rcvdata(hook_p hook, struct mbuf *m, meta_p meta)
if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING))
senderr(ENETDOWN);
+ /* drop in the MAC address */
+ eh = mtod(m, struct ether_header *);
+ bcopy(IFP2AC(ifp)->ac_enaddr, eh->ether_shost, 6);
/*
* If a simplex interface, and the packet is being sent to our
* Ethernet address or a broadcast address, loopback a copy.
@@ -1092,7 +1095,6 @@ ngether_rcvdata(hook_p hook, struct mbuf *m, meta_p meta)
* reasons and compatibility with the original behavior.
*/
if (ifp->if_flags & IFF_SIMPLEX) {
- eh = mtod(m, struct ether_header *);
if (m->m_flags & M_BCAST) {
struct mbuf *n = m_copy(m, 0, (int)M_COPYALL);
OpenPOWER on IntegriCloud