diff options
| author | Jesper Skriver <jesper@FreeBSD.org> | 2002-01-11 16:04:47 +0000 |
|---|---|---|
| committer | Jesper Skriver <jesper@FreeBSD.org> | 2002-01-11 16:04:47 +0000 |
| commit | 3cd675111bd0325614cfd7d4724af4dd61156c4b (patch) | |
| tree | 04dbc7f90561d9bd3e965da432f5324effc66cf3 /sys/net/if_ethersubr.c | |
| parent | b944866c2548b589a16b839d6cfbc207afb9bc23 (diff) | |
Notes
Diffstat (limited to 'sys/net/if_ethersubr.c')
| -rw-r--r-- | sys/net/if_ethersubr.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 399f0658b92d..d743187d6a35 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -325,12 +325,25 @@ ether_output(ifp, m, dst, rt0) * reasons and compatibility with the original behavior. */ if ((ifp->if_flags & IFF_SIMPLEX) && (loop_copy != -1)) { + int csum_flags = 0; + + if (m->m_pkthdr.csum_flags & CSUM_IP) + csum_flags |= (CSUM_IP_CHECKED|CSUM_IP_VALID); + if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA) + csum_flags |= (CSUM_DATA_VALID|CSUM_PSEUDO_HDR); if ((m->m_flags & M_BCAST) || (loop_copy > 0)) { struct mbuf *n = m_copy(m, 0, (int)M_COPYALL); + n->m_pkthdr.csum_flags |= csum_flags; + if (csum_flags & CSUM_DATA_VALID) + n->m_pkthdr.csum_data = 0xffff; + (void) if_simloop(ifp, n, dst->sa_family, hlen); } else if (bcmp(eh->ether_dhost, eh->ether_shost, ETHER_ADDR_LEN) == 0) { + m->m_pkthdr.csum_flags |= csum_flags; + if (csum_flags & CSUM_DATA_VALID) + m->m_pkthdr.csum_data = 0xffff; (void) if_simloop(ifp, m, dst->sa_family, hlen); return (0); /* XXX */ } |
