Oops forgot to put the source MAC address on outgoing packets!

This commit is contained in:
Julian Elischer 1999-11-11 22:23:58 +00:00
parent 03e3936479
commit e03b02a346
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=53099

View file

@ -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);