Module Name:    src
Committed By:   martin
Date:           Wed Nov 13 12:53:35 UTC 2019

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

Log Message:
Pull up following revision(s) (requested by yamaguchi in ticket #1434):

        sys/net/if_vlan.c: revision 1.148

Fix a bug that vlan(4) fragments IPv6 packets
even the MTU > packet length.

The bug is appeared when the mtu is increased on SIOCSETVLAN.
>From t-kusaba@IIJ


To generate a diff of this commit:
cvs rdiff -u -r1.97.2.17 -r1.97.2.18 src/sys/net/if_vlan.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_vlan.c
diff -u src/sys/net/if_vlan.c:1.97.2.17 src/sys/net/if_vlan.c:1.97.2.18
--- src/sys/net/if_vlan.c:1.97.2.17	Thu Oct 24 15:48:37 2019
+++ src/sys/net/if_vlan.c	Wed Nov 13 12:53:34 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_vlan.c,v 1.97.2.17 2019/10/24 15:48:37 martin Exp $	*/
+/*	$NetBSD: if_vlan.c,v 1.97.2.18 2019/11/13 12:53:34 martin Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.97.2.17 2019/10/24 15:48:37 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.97.2.18 2019/11/13 12:53:34 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -119,6 +119,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 
 #ifdef INET6
 #include <netinet6/in6_ifattach.h>
 #include <netinet6/in6_var.h>
+#include <netinet6/nd6.h>
 #endif
 
 #include "ioconf.h"
@@ -520,6 +521,12 @@ vlan_config(struct ifvlan *ifv, struct i
 	nmib->ifvm_p = p;
 	nmib->ifvm_tag = vid;
 	ifv->ifv_if.if_mtu = p->if_mtu - nmib->ifvm_mtufudge;
+#ifdef INET6
+	KERNEL_LOCK_UNLESS_NET_MPSAFE();
+	if (in6_present)
+		nd6_setmtu(ifp);
+	KERNEL_UNLOCK_UNLESS_NET_MPSAFE();
+#endif
 	ifv->ifv_if.if_flags = p->if_flags &
 	    (IFF_UP | IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST);
 

Reply via email to