Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/netinet Apply patch (requested by thorpej):
details: https://anonhg.NetBSD.org/src/rev/974d85623a27
branches: netbsd-1-4
changeset: 470353:974d85623a27
user: he <he%NetBSD.org@localhost>
date: Sat Feb 12 18:10:24 2000 +0000
description:
Apply patch (requested by thorpej):
Adhere to RFC 1112 and RFC 1122 by dropping incoming packets with
a multicast source address. Fixes part of PR#7003.
diffstat:
sys/netinet/ip_input.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diffs (26 lines):
diff -r 20ce25163ff2 -r 974d85623a27 sys/netinet/ip_input.c
--- a/sys/netinet/ip_input.c Sat Feb 12 17:01:32 2000 +0000
+++ b/sys/netinet/ip_input.c Sat Feb 12 18:10:24 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_input.c,v 1.82.2.3 1999/10/17 23:59:59 cgd Exp $ */
+/* $NetBSD: ip_input.c,v 1.82.2.4 2000/02/12 18:10:24 he Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -340,6 +340,16 @@
}
ip = mtod(m, struct ip *);
}
+
+ /*
+ * RFC1122: packets with a multicast source address are
+ * not allowed.
+ */
+ if (IN_MULTICAST(ip->ip_src.s_addr)) {
+ /* XXX stat */
+ goto bad;
+ }
+
if (in_cksum(m, hlen) != 0) {
ipstat.ips_badsum++;
goto bad;
Home |
Main Index |
Thread Index |
Old Index