1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00

Reduce code differences.

This commit is contained in:
Matthew N. Dodd 2003-03-15 19:37:44 +00:00
parent a93a116153
commit 06f684b004
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=112279
3 changed files with 20 additions and 19 deletions

View File

@ -275,16 +275,18 @@ ether_output(ifp, m, dst, rt0)
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);
struct mbuf *n;
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) {
} 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;

View File

@ -299,15 +299,15 @@ fddi_output(ifp, m, dst, rt0)
* reasons and compatibility with the original behavior.
*/
if ((ifp->if_flags & IFF_SIMPLEX) && (loop_copy != -1)) {
if ((m->m_flags & M_BCAST) || loop_copy) {
struct mbuf *n = m_copy(m, 0, (int)M_COPYALL);
(void) if_simloop(ifp,
n, dst->sa_family, FDDI_HDR_LEN);
} else if (bcmp(fh->fddi_dhost,
fh->fddi_shost, FDDI_ADDR_LEN) == 0) {
(void) if_simloop(ifp,
m, dst->sa_family, FDDI_HDR_LEN);
if ((m->m_flags & M_BCAST) || (loop_copy > 0)) {
struct mbuf *n;
n = m_copy(m, 0, (int)M_COPYALL);
(void) if_simloop(ifp, n, dst->sa_family,
FDDI_HDR_LEN);
} else if (bcmp(fh->fddi_dhost, fh->fddi_shost,
FDDI_ADDR_LEN) == 0) {
(void) if_simloop(ifp, m, dst->sa_family,
FDDI_HDR_LEN);
return (0); /* XXX */
}
}

View File

@ -372,8 +372,7 @@ iso88025_output(ifp, m, dst, rt0)
n = m_copy(m, 0, (int)M_COPYALL);
(void) if_simloop(ifp, n, dst->sa_family,
ISO88025_HDR_LEN);
} else
if (bcmp(th->iso88025_dhost, th->iso88025_shost,
} else if (bcmp(th->iso88025_dhost, th->iso88025_shost,
ETHER_ADDR_LEN) == 0) {
(void) if_simloop(ifp, m, dst->sa_family,
ISO88025_HDR_LEN);