Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet If a packet came in as link-level broadcast or l...



details:   https://anonhg.NetBSD.org/src/rev/d03654f510a7
branches:  trunk
changeset: 477241:d03654f510a7
user:      sommerfeld <sommerfeld%NetBSD.org@localhost>
date:      Sun Oct 17 23:38:45 1999 +0000

description:
If a packet came in as link-level broadcast or link-level multicast, don't
attempt to fast-forward it out.

diffstat:

 sys/netinet/ip_flow.c |  10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diffs (24 lines):

diff -r 7c16f37e0047 -r d03654f510a7 sys/netinet/ip_flow.c
--- a/sys/netinet/ip_flow.c     Sun Oct 17 16:00:00 1999 +0000
+++ b/sys/netinet/ip_flow.c     Sun Oct 17 23:38:45 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_flow.c,v 1.13 1999/03/26 08:51:35 proff Exp $       */
+/*     $NetBSD: ip_flow.c,v 1.14 1999/10/17 23:38:45 sommerfeld Exp $  */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -154,6 +154,14 @@
         */
        if (!ipforwarding || ipflow_inuse == 0 || m->m_len < sizeof(struct ip))
                return 0;
+
+       /*
+        * Was packet recieved as a link-level multicast or broadcast?
+        * If so, don't try to fast forward..
+        */
+       if ((m->m_flags & (M_BCAST|M_MCAST)) != 0)
+               return 0;
+       
        /*
         * IP header with no option and valid version and length
         */



Home | Main Index | Thread Index | Old Index