Module Name:    src
Committed By:   martin
Date:           Mon Mar 11 19:30:06 UTC 2024

Modified Files:
        src/sys/net [netbsd-9]: if_tun.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1815):

        sys/net/if_tun.c: revision 1.175

tun(4): Allow IPv6 packets with TUNSLMODE configured.
PR kern/58013


To generate a diff of this commit:
cvs rdiff -u -r1.156 -r1.156.2.1 src/sys/net/if_tun.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/if_tun.c
diff -u src/sys/net/if_tun.c:1.156 src/sys/net/if_tun.c:1.156.2.1
--- src/sys/net/if_tun.c:1.156	Fri Apr 26 08:38:25 2019
+++ src/sys/net/if_tun.c	Mon Mar 11 19:30:06 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_tun.c,v 1.156 2019/04/26 08:38:25 pgoyette Exp $	*/
+/*	$NetBSD: if_tun.c,v 1.156.2.1 2024/03/11 19:30:06 martin Exp $	*/
 
 /*
  * Copyright (c) 1988, Julian Onions <j...@cs.nott.ac.uk>
@@ -19,7 +19,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.156 2019/04/26 08:38:25 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.156.2.1 2024/03/11 19:30:06 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -586,9 +586,7 @@ tun_output(struct ifnet *ifp, struct mbu
 				goto out;
 			}
 			memcpy(mtod(m0, char *), dst, dst->sa_len);
-		}
-
-		if (tp->tun_flags & TUN_IFHEAD) {
+		} else if (tp->tun_flags & TUN_IFHEAD) {
 			/* Prepend the address family */
 			M_PREPEND(m0, sizeof(*af), M_DONTWAIT);
 			if (m0 == NULL) {

Reply via email to