Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet6 Don't validate the source address of forwarding...



details:   https://anonhg.NetBSD.org/src/rev/0d7dea521b5d
branches:  trunk
changeset: 446283:0d7dea521b5d
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Thu Nov 29 10:02:52 2018 +0000

description:
Don't validate the source address of forwarding IPv6 packets (same as IPv4)

diffstat:

 sys/netinet6/ip6_output.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r c67ae24b205f -r 0d7dea521b5d sys/netinet6/ip6_output.c
--- a/sys/netinet6/ip6_output.c Thu Nov 29 09:54:22 2018 +0000
+++ b/sys/netinet6/ip6_output.c Thu Nov 29 10:02:52 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip6_output.c,v 1.212 2018/08/10 06:46:09 maxv Exp $    */
+/*     $NetBSD: ip6_output.c,v 1.213 2018/11/29 10:02:52 ozaki-r Exp $ */
 /*     $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $    */
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.212 2018/08/10 06:46:09 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.213 2018/11/29 10:02:52 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -578,6 +578,7 @@
 
        /* Ensure we only send from a valid address. */
        if ((ifp->if_flags & IFF_LOOPBACK) == 0 &&
+           (flags & IPV6_FORWARDING) == 0 &&
            (error = ip6_ifaddrvalid(&src0, &dst0)) != 0)
        {
                char ip6buf[INET6_ADDRSTRLEN];



Home | Main Index | Thread Index | Old Index