From: dlg Date: Thu, 8 Feb 2018 22:11:06 +0000 (+0000) Subject: ttl 0 is not valid on the wire, so dont accept it. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=2485fd1a70c9d2931bb681763258fcf7666632c1;p=openbsd ttl 0 is not valid on the wire, so dont accept it. --- diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c index 36e545b6a03..95dfe5056e7 100644 --- a/sys/net/if_gre.c +++ b/sys/net/if_gre.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_gre.c,v 1.94 2018/02/08 22:08:18 dlg Exp $ */ +/* $OpenBSD: if_gre.c,v 1.95 2018/02/08 22:11:06 dlg Exp $ */ /* $NetBSD: if_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */ /* @@ -1056,7 +1056,7 @@ gre_tunnel_ioctl(struct ifnet *ifp, struct gre_tunnel *tunnel, break; case SIOCSLIFPHYTTL: - if (ifr->ifr_ttl < 0 || ifr->ifr_ttl > 0xff) { + if (ifr->ifr_ttl < 1 || ifr->ifr_ttl > 0xff) { error = EINVAL; break; }