diff options
author | Julian Elischer <julian@FreeBSD.org> | 1998-06-13 02:27:10 +0000 |
---|---|---|
committer | Julian Elischer <julian@FreeBSD.org> | 1998-06-13 02:27:10 +0000 |
commit | 9d3f194df32106ed067e176615aa6e0263ce8c54 (patch) | |
tree | 5cfdbda799ac734debe0900515aa8db765facc11 /sys/net/if_ethersubr.c | |
parent | e2fea9c587e57074d9e4abc7983bde6b11afdd22 (diff) | |
download | src-9d3f194df32106ed067e176615aa6e0263ce8c54.tar.gz src-9d3f194df32106ed067e176615aa6e0263ce8c54.zip |
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.
Notes
Notes:
svn path=/head/; revision=36940
Diffstat (limited to 'sys/net/if_ethersubr.c')
-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 4e440cf4e5da..97b9847c3a58 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 */ } } |