Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet Drop packets, that have a Class-D address as sou...



details:   https://anonhg.NetBSD.org/src/rev/9d334aca266c
branches:  trunk
changeset: 472629:9d334aca266c
user:      hwr <hwr%NetBSD.org@localhost>
date:      Mon May 03 21:14:47 1999 +0000

description:
Drop packets, that have a Class-D address as source address.
Implements the first half of PR 7003.

diffstat:

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

diffs (25 lines):

diff -r b75fb299b758 -r 9d334aca266c sys/netinet/ip_input.c
--- a/sys/netinet/ip_input.c    Mon May 03 20:56:11 1999 +0000
+++ b/sys/netinet/ip_input.c    Mon May 03 21:14:47 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_input.c,v 1.84 1999/04/07 05:34:32 proff Exp $      */
+/*     $NetBSD: ip_input.c,v 1.85 1999/05/03 21:14:47 hwr Exp $        */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -340,6 +340,15 @@
                }
                ip = mtod(m, struct ip *);
        }
+       /*
+        * we drop packets that have a multicast address as source
+        * as wanted by rfc 1112
+        */
+       if (IN_MULTICAST(ip->ip_src.s_addr)) {
+               ipstat.ips_odropped++;
+               goto bad;
+       }
+
        if (in_cksum(m, hlen) != 0) {
                ipstat.ips_badsum++;
                goto bad;



Home | Main Index | Thread Index | Old Index