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

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

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

        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.139.2.4 -r1.139.2.5 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.139.2.4 src/sys/net/if_tun.c:1.139.2.5
--- src/sys/net/if_tun.c:1.139.2.4	Wed Aug 15 12:07:30 2018
+++ src/sys/net/if_tun.c	Mon Mar 11 19:31:31 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_tun.c,v 1.139.2.4 2018/08/15 12:07:30 martin Exp $	*/
+/*	$NetBSD: if_tun.c,v 1.139.2.5 2024/03/11 19:31:31 martin Exp $	*/
 
 /*
  * Copyright (c) 1988, Julian Onions <[email protected]>
@@ -19,7 +19,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.139.2.4 2018/08/15 12:07:30 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.139.2.5 2024/03/11 19:31:31 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -577,9 +577,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