Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet6 do not forward packet with :: in the source.



details:   https://anonhg.NetBSD.org/src/rev/95f43b7030d7
branches:  trunk
changeset: 495413:95f43b7030d7
user:      itojun <itojun%NetBSD.org@localhost>
date:      Thu Jul 27 15:53:51 2000 +0000

description:
do not forward packet with :: in the source.
this is not in the spec - we had rough consensus on it in ipngwg,
spec will get updated to include this behavior.

diffstat:

 sys/netinet6/ip6_forward.c |  13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 53475dad9800 -r 95f43b7030d7 sys/netinet6/ip6_forward.c
--- a/sys/netinet6/ip6_forward.c        Thu Jul 27 15:26:16 2000 +0000
+++ b/sys/netinet6/ip6_forward.c        Thu Jul 27 15:53:51 2000 +0000
@@ -1,5 +1,5 @@
-/*     $NetBSD: ip6_forward.c,v 1.15 2000/07/16 07:57:55 itojun Exp $  */
-/*     $KAME: ip6_forward.c,v 1.43 2000/07/16 07:50:49 itojun Exp $    */
+/*     $NetBSD: ip6_forward.c,v 1.16 2000/07/27 15:53:51 itojun Exp $  */
+/*     $KAME: ip6_forward.c,v 1.44 2000/07/27 13:43:21 itojun Exp $    */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -112,8 +112,15 @@
        }
 #endif /*IPSEC*/
 
+       /*
+        * Do not forward packets to multicast destination (should be handled
+        * by ip6_mforward().
+        * Do not forward packets with unspecified source.  It was discussed
+        * in July 2000, on ipngwg mailing list.
+        */
        if ((m->m_flags & (M_BCAST|M_MCAST)) != 0 ||
-           IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) {
+           IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst) ||
+           IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src)) {
                ip6stat.ip6s_cantforward++;
                /* XXX in6_ifstat_inc(rt->rt_ifp, ifs6_in_discard) */
                if (ip6_log_time + ip6_log_interval < time_second) {



Home | Main Index | Thread Index | Old Index