From 201c2527a9624c5f374341262c4318b0d02071c5 Mon Sep 17 00:00:00 2001 From: Julian Elischer Date: Sun, 14 Jun 1998 20:58:17 +0000 Subject: Try narrow down the culprit sending undefined packet types through the loopback --- sys/net/if_ethersubr.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'sys/net/if_ethersubr.c') diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 97b9847c3a58..e5232324df88 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.49 1998/06/12 03:48:07 julian Exp $ + * $Id: if_ethersubr.c,v 1.50 1998/06/13 02:27:10 julian Exp $ */ #include "opt_atalk.h" @@ -357,16 +357,15 @@ ether_output(ifp, m0, dst, rt0) * on the wire). However, we don't do that here for security * reasons and compatibility with the original behavior. */ - if (ifp->if_flags & IFF_SIMPLEX) { + if ((ifp->if_flags & IFF_SIMPLEX) && + (loop_copy != -1)) { 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) { - if (loop_copy != -1) - (void) if_simloop(ifp, m, dst, - ETHER_HDR_LEN); + (void) if_simloop(ifp, m, dst, ETHER_HDR_LEN); return(0); /* XXX */ } } -- cgit v1.2.3