From: Tim Laszlo Date: Fri, 20 Jun 2014 13:37:19 +0000 (-0500) Subject: Warn if ttl is out of bounds X-Git-Tag: collectd-5.5.0~12^2~7^2~2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0d5096466777809ad0b63fba58997cb9e0ea9426;p=collectd.git Warn if ttl is out of bounds --- diff --git a/src/network.c b/src/network.c index a2221e5b..9c9e83cc 100644 --- a/src/network.c +++ b/src/network.c @@ -2977,6 +2977,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 */