From 873ee04392be176051a22ad09ae1ae2fa224bfc7 Mon Sep 17 00:00:00 2001 From: Tim Laszlo Date: Fri, 20 Jun 2014 08:37:19 -0500 Subject: [PATCH] Warn if ttl is out of bounds --- src/network.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/network.c b/src/network.c index 98cb8eba..8cf17031 100644 --- a/src/network.c +++ b/src/network.c @@ -2897,6 +2897,10 @@ static int network_config_set_ttl (const oconfig_item_t *ci) /* {{{ */ tmp = (int) ci->values[0].value.number; if ((tmp > 0) && (tmp <= 255)) network_config_ttl = tmp; + else { + WARNING ("network plugin: The `TimeToLive' must be between 1 and 255."); + return (-1); + } return (0); } /* }}} int network_config_set_ttl */ -- 2.30.2