Note to self. Have morning coffee *before* committing things.
There is no mac_addr in the mbuf for BSD.. cheat like we are supposed to and use the csum field since our friend the gif tunnel itself will never use offload.
This commit is contained in:
parent
6f17e3a31a
commit
cef68c63ec
@ -388,7 +388,8 @@ gif_start(struct ifnet *ifp)
|
||||
/* Now pull back the af in packet that
|
||||
* was saved in the address location.
|
||||
*/
|
||||
bcopy(m->m_pkthdr.src_mac_addr, &af, sizeof(af));
|
||||
af = m->m_pkthdr.csum_data;
|
||||
|
||||
if (ifp->if_bridge)
|
||||
af = AF_LINK;
|
||||
|
||||
@ -503,10 +504,11 @@ gif_output(ifp, m, dst, ro)
|
||||
dst->sa_family = af;
|
||||
}
|
||||
af = dst->sa_family;
|
||||
/* Now save the af in the inbound pkt mac
|
||||
* address location.
|
||||
/* Now save the af in the inbound pkt csum
|
||||
* data, this is a cheat since really
|
||||
* gif tunnels don't do offload.
|
||||
*/
|
||||
bcopy(&af, m->m_pkthdr.src_mac_addr, sizeof(af));
|
||||
m->m_pkthdr.csum_data = af;
|
||||
if (!(ifp->if_flags & IFF_UP) ||
|
||||
sc->gif_psrc == NULL || sc->gif_pdst == NULL) {
|
||||
m_freem(m);
|
||||
|
Loading…
Reference in New Issue
Block a user