summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2015-04-10 02:08:08 +0000
committerdlg <dlg@openbsd.org>2015-04-10 02:08:08 +0000
commit5bf3916b08e95a965fa0a17a3c7eb79cdab66420 (patch)
tree7f6c389c88fb99f357a733735b9bc0e78608e75e /sys
parentinclude port number if a non-default one has been specified; (diff)
downloadwireguard-openbsd-5bf3916b08e95a965fa0a17a3c7eb79cdab66420.tar.xz
wireguard-openbsd-5bf3916b08e95a965fa0a17a3c7eb79cdab66420.zip
dont inherit the parent interfaces hardmtu as the vlan interfaces
mtu when it gets set up. instead, allow the vlan interfaces mtu to be raised to the parents hardmtu in SIOCSIFMTU handling. pointed out by claudio@
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if_vlan.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index 98963e66ebb..072b28be3dd 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vlan.c,v 1.114 2015/04/07 10:46:20 mpi Exp $ */
+/* $OpenBSD: if_vlan.c,v 1.115 2015/04/10 02:08:08 dlg Exp $ */
/*
* Copyright 1998 Massachusetts Institute of Technology
@@ -377,9 +377,9 @@ vlan_config(struct ifvlan *ifv, struct ifnet *p, u_int16_t tag)
ifv->ifv_if.if_baudrate = p->if_baudrate;
if (p->if_capabilities & IFCAP_VLAN_MTU)
- ifv->ifv_if.if_mtu = p->if_hardmtu;
+ ifv->ifv_if.if_mtu = p->if_mtu;
else
- ifv->ifv_if.if_mtu = p->if_hardmtu - EVL_ENCAPLEN;
+ ifv->ifv_if.if_mtu = p->if_mtu - EVL_ENCAPLEN;
ifv->ifv_if.if_flags = p->if_flags &
(IFF_UP | IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST);
@@ -561,9 +561,9 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
case SIOCSIFMTU:
if (ifv->ifv_p != NULL) {
if (ifv->ifv_p->if_capabilities & IFCAP_VLAN_MTU)
- p_mtu = ifv->ifv_p->if_mtu;
+ p_mtu = ifv->ifv_p->if_hardmtu;
else
- p_mtu = ifv->ifv_p->if_mtu - EVL_ENCAPLEN;
+ p_mtu = ifv->ifv_p->if_hardmtu - EVL_ENCAPLEN;
if (ifr->ifr_mtu > p_mtu || ifr->ifr_mtu < ETHERMIN)
error = EINVAL;