summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1999-08-06 16:52:04 +0000
committerbrian <brian@FreeBSD.org>1999-08-06 16:52:04 +0000
commit5ec394df57b33b2b1ed678ab579c2bc67573d9fd (patch)
tree7231605d1bee629d4768cd757b0c790a615c0016 /sys/net
parent292c37a981ed6ba79c90ba184aeeb491ae0e0d7d (diff)
downloadFreeBSD-src-5ec394df57b33b2b1ed678ab579c2bc67573d9fd.zip
FreeBSD-src-5ec394df57b33b2b1ed678ab579c2bc67573d9fd.tar.gz
Back out redundant check, and remove the MAXMTU comparison as it's
outside of the (bogus) tuninfo mtu range. Pointed out by: bde
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_tun.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index 3cb8f6b..341848b 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -302,12 +302,9 @@ tunifioctl(ifp, cmd, data)
ifp->if_name, ifp->if_unit);
break;
case SIOCSIFMTU:
- if (ifr->ifr_mtu < IF_MINMTU || ifr->ifr_mtu > IF_MAXMTU)
- error = EINVAL;
- else {
- ifp->if_mtu = ifr->ifr_mtu;
- TUNDEBUG("%s%d: mtu set\n", ifp->if_name, ifp->if_unit);
- }
+ ifp->if_mtu = ifr->ifr_mtu;
+ TUNDEBUG("%s%d: mtu set\n",
+ ifp->if_name, ifp->if_unit);
break;
case SIOCADDMULTI:
case SIOCDELMULTI:
@@ -438,7 +435,7 @@ tunioctl(dev, cmd, data, flag, p)
switch (cmd) {
case TUNSIFINFO:
tunp = (struct tuninfo *)data;
- if (tunp->mtu < IF_MINMTU || tunp->mtu > IF_MAXMTU)
+ if (tunp->mtu < IF_MINMTU)
return (EINVAL);
tp->tun_if.if_mtu = tunp->mtu;
tp->tun_if.if_type = tunp->type;
OpenPOWER on IntegriCloud