Module Name: src Committed By: knakahara Date: Tue Apr 4 10:25:38 UTC 2017
Modified Files: src/sys/net: if_l2tp.c src/sys/netinet6: in6_l2tp.c Log Message: remove unnecessary if_vlanvar.h. add missing include "vlan.h". pointed out by s-yamaguchi@IIJ, thanks. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/net/if_l2tp.c cvs rdiff -u -r1.2 -r1.3 src/sys/netinet6/in6_l2tp.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_l2tp.c diff -u src/sys/net/if_l2tp.c:1.5 src/sys/net/if_l2tp.c:1.6 --- src/sys/net/if_l2tp.c:1.5 Tue Apr 4 04:34:43 2017 +++ src/sys/net/if_l2tp.c Tue Apr 4 10:25:38 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_l2tp.c,v 1.5 2017/04/04 04:34:43 knakahara Exp $ */ +/* $NetBSD: if_l2tp.c,v 1.6 2017/04/04 10:25:38 knakahara Exp $ */ /* * Copyright (c) 2017 Internet Initiative Japan Inc. @@ -31,12 +31,14 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_l2tp.c,v 1.5 2017/04/04 04:34:43 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_l2tp.c,v 1.6 2017/04/04 10:25:38 knakahara Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" #endif +#include "vlan.h" + #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> @@ -67,7 +69,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_l2tp.c,v #include <net/netisr.h> #include <net/route.h> #include <net/bpf.h> -#include <net/if_vlanvar.h> #include <netinet/in.h> #include <netinet/in_systm.h> @@ -1390,13 +1391,16 @@ l2tp_tcpmss_clamp(struct ifnet *ifp, str if (l2tp_need_tcpmss_clamp(ifp)) { struct ether_header *eh; +#if NVLAN > 0 struct ether_vlan_header evh; +#endif /* save ether header */ m_copydata(m, 0, sizeof(evh), (void *)&evh); eh = (struct ether_header *)&evh; switch (ntohs(eh->ether_type)) { +#if NVLAN > 0 case ETHERTYPE_VLAN: /* Ether + VLAN */ if (m->m_pkthdr.len <= sizeof(struct ether_vlan_header)) break; @@ -1426,6 +1430,7 @@ l2tp_tcpmss_clamp(struct ifnet *ifp, str return NULL; *mtod(m, struct ether_vlan_header *) = evh; break; +#endif /* NVLAN > 0 */ #ifdef INET case ETHERTYPE_IP: /* Ether + IPv4 */ if (m->m_pkthdr.len <= sizeof(struct ether_header)) Index: src/sys/netinet6/in6_l2tp.c diff -u src/sys/netinet6/in6_l2tp.c:1.2 src/sys/netinet6/in6_l2tp.c:1.3 --- src/sys/netinet6/in6_l2tp.c:1.2 Thu Mar 30 23:13:54 2017 +++ src/sys/netinet6/in6_l2tp.c Tue Apr 4 10:25:38 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: in6_l2tp.c,v 1.2 2017/03/30 23:13:54 knakahara Exp $ */ +/* $NetBSD: in6_l2tp.c,v 1.3 2017/04/04 10:25:38 knakahara Exp $ */ /* * Copyright (c) 2017 Internet Initiative Japan Inc. @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: in6_l2tp.c,v 1.2 2017/03/30 23:13:54 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in6_l2tp.c,v 1.3 2017/04/04 10:25:38 knakahara Exp $"); #ifdef _KERNEL_OPT #include "opt_l2tp.h" @@ -64,8 +64,6 @@ __KERNEL_RCSID(0, "$NetBSD: in6_l2tp.c,v #include <altq/altq.h> #endif -#include <net/if_vlanvar.h> - /* TODO: IP_TCPMSS support */ #undef IP_TCPMSS #ifdef IP_TCPMSS