diff options
author | julian <julian@FreeBSD.org> | 1998-06-13 02:27:10 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 1998-06-13 02:27:10 +0000 |
commit | 98ec89f1825fc700e6d9bce147a026b4036af855 (patch) | |
tree | 9ea1a826446f623564f252bb1ea72fbe7cbf53ee /sys/net | |
parent | b2d1ceea52dbb0bd35d15a71505d699539af0edc (diff) | |
download | FreeBSD-src-98ec89f1825fc700e6d9bce147a026b4036af855.zip FreeBSD-src-98ec89f1825fc700e6d9bce147a026b4036af855.tar.gz |
Allow a protocol to specify that it does NOT want to be looped back
even if it looks like it should (backwards compatibility with
old broken code) should get rid of some annoying messags.
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_ethersubr.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 4e440cf..97b9847 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if_ethersubr.c 8.1 (Berkeley) 6/10/93 - * $Id: if_ethersubr.c,v 1.48 1998/05/19 14:04:02 dg Exp $ + * $Id: if_ethersubr.c,v 1.49 1998/06/12 03:48:07 julian Exp $ */ #include "opt_atalk.h" @@ -322,6 +322,7 @@ ether_output(ifp, m0, dst, rt0) #endif /* LLC */ case AF_UNSPEC: + loop_copy = -1; /* if this is for us, don't do it */ eh = (struct ether_header *)dst->sa_data; (void)memcpy(edst, eh->ether_dhost, sizeof (edst)); type = eh->ether_type; @@ -357,13 +358,15 @@ ether_output(ifp, m0, dst, rt0) * reasons and compatibility with the original behavior. */ if (ifp->if_flags & IFF_SIMPLEX) { - if ((m->m_flags & M_BCAST) || loop_copy) { + if ((m->m_flags & M_BCAST) || (loop_copy > 0)) { struct mbuf *n = m_copy(m, 0, (int)M_COPYALL); (void) if_simloop(ifp, n, dst, ETHER_HDR_LEN); } else if (bcmp(eh->ether_dhost, eh->ether_shost, ETHER_ADDR_LEN) == 0) { - (void) if_simloop(ifp, m, dst, ETHER_HDR_LEN); + if (loop_copy != -1) + (void) if_simloop(ifp, m, dst, + ETHER_HDR_LEN); return(0); /* XXX */ } } |