Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: configure vlan-if jumbo mtu crashs kernel
On Fri, Nov 18, 2016 at 02:35:03PM +0100, 6bone%6bone.informatik.uni-leipzig.de@localhost wrote:
> in some networks we are working with jumbo mtu's. If I configure the mtu to
> the native interface all works fine.
>
> ifconfig ixg1 mtu 9000 (no problem)
>
> but
>
> ifconfig vlan850 ip4csum tcp4csum udp4csum tcp6csum udp6csum ip4csum-tx
> ip4csum-rx tcp4csum-tx tcp4csum-rx udp4csum-tx udp4csum-rx tcp6csum-tx
> tcp6csum-rx udp6csum-tx udp6csum-rx tso4 tso6 mtu 9000
The attached patch should prevent the crash, does it?
Joerg
Index: if_vlan.c
===================================================================
RCS file: /home/joerg/repo/netbsd/src/sys/net/if_vlan.c,v
retrieving revision 1.70.2.3
diff -u -p -r1.70.2.3 if_vlan.c
--- if_vlan.c 23 Apr 2015 19:23:45 -0000 1.70.2.3
+++ if_vlan.c 18 Nov 2016 15:26:08 -0000
@@ -550,6 +550,10 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd
case SIOCSIFCAP:
ifcr = data;
/* make sure caps are enabled on parent */
+ if (ifv->ifv_p == NULL) {
+ error = EINVAL;
+ break;
+ }
if ((ifv->ifv_p->if_capenable & ifcr->ifcr_capenable) !=
ifcr->ifcr_capenable) {
error = EINVAL;
Home |
Main Index |
Thread Index |
Old Index