Module Name: src Committed By: martin Date: Mon Mar 11 19:28:45 UTC 2024
Modified Files: src/sys/net [netbsd-10]: if_tun.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #627): 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.173.4.1 -r1.173.4.2 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.173.4.1 src/sys/net/if_tun.c:1.173.4.2 --- src/sys/net/if_tun.c:1.173.4.1 Sun Jan 14 15:18:37 2024 +++ src/sys/net/if_tun.c Mon Mar 11 19:28:45 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: if_tun.c,v 1.173.4.1 2024/01/14 15:18:37 martin Exp $ */ +/* $NetBSD: if_tun.c,v 1.173.4.2 2024/03/11 19:28:45 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.173.4.1 2024/01/14 15:18:37 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.173.4.2 2024/03/11 19:28:45 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -604,9 +604,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) {