Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet6 suppress too noisy warning on forward-over-loop...



details:   https://anonhg.NetBSD.org/src/rev/0bd12a65c7fd
branches:  trunk
changeset: 494077:0bd12a65c7fd
user:      itojun <itojun%NetBSD.org@localhost>
date:      Fri Jun 30 19:46:05 2000 +0000

description:
suppress too noisy warning on forward-over-loopback case.  from kame

diffstat:

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

diffs (57 lines):

diff -r 06be2080bb52 -r 0bd12a65c7fd sys/netinet6/ip6_forward.c
--- a/sys/netinet6/ip6_forward.c        Fri Jun 30 19:43:53 2000 +0000
+++ b/sys/netinet6/ip6_forward.c        Fri Jun 30 19:46:05 2000 +0000
@@ -1,5 +1,5 @@
-/*     $NetBSD: ip6_forward.c,v 1.12 2000/06/03 14:36:36 itojun Exp $  */
-/*     $KAME: ip6_forward.c,v 1.37 2000/05/28 12:17:19 itojun Exp $    */
+/*     $NetBSD: ip6_forward.c,v 1.13 2000/06/30 19:46:05 itojun Exp $  */
+/*     $KAME: ip6_forward.c,v 1.38 2000/06/22 21:02:05 itojun Exp $    */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -191,7 +191,7 @@
                /* no need to do IPsec. */
                key_freesp(sp);
                goto skip_ipsec;
-       
+
        case IPSEC_POLICY_IPSEC:
                if (sp->req == NULL) {
                        /* XXX should be panic ? */
@@ -289,7 +289,7 @@
                        /* this probably fails but give it a try again */
                        rtalloc((struct route *)&ip6_forward_rt);
                }
-               
+
                if (ip6_forward_rt.ro_rt == 0) {
                        ip6stat.ip6s_noroute++;
                        /* XXX in6_ifstat_inc(rt->rt_ifp, ifs6_in_noroute) */
@@ -443,10 +443,15 @@
                 *      to a loopback interface? I don't think so, and thus
                 *      I bark here. (jinmei%kame.net@localhost)
                 * XXX: it is common to route invalid packets to loopback.
-                *      (itojun)
+                *      also, the codepath will be visited on use of ::1 in
+                *      rthdr. (itojun)
                 */
-
-               if ((rt->rt_flags & (RTF_BLACKHOLE|RTF_REJECT)) == 0) {
+#if 1
+               if (0)
+#else
+               if ((rt->rt_flags & (RTF_BLACKHOLE|RTF_REJECT)) == 0)
+#endif
+               {
                        printf("ip6_forward: outgoing interface is loopback. "
                               "src %s, dst %s, nxt %d, rcvif %s, outif %s\n",
                               ip6_sprintf(&ip6->ip6_src),
@@ -454,7 +459,7 @@
                               ip6->ip6_nxt, if_name(m->m_pkthdr.rcvif),
                               if_name(rt->rt_ifp));
                }
-                      
+
                if (IN6_IS_SCOPE_LINKLOCAL(&ip6->ip6_src))
                        origifp = ifindex2ifnet[ntohs(ip6->ip6_src.s6_addr16[1])];
                else if (IN6_IS_SCOPE_LINKLOCAL(&ip6->ip6_dst))



Home | Main Index | Thread Index | Old Index