From 2485fd1a70c9d2931bb681763258fcf7666632c1 Mon Sep 17 00:00:00 2001 From: dlg Date: Thu, 8 Feb 2018 22:11:06 +0000 Subject: [PATCH] ttl 0 is not valid on the wire, so dont accept it. --- sys/net/if_gre.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.20.1