network: fix log message and man page for HopLimit=

Follow-up for 88c0642358.
Closes #28899.
This commit is contained in:
Yu Watanabe 2023-08-22 15:49:49 +09:00 committed by Zbigniew Jędrzejewski-Szmek
parent 90dab2b01e
commit 08801318e8
2 changed files with 5 additions and 4 deletions

View file

@ -1620,7 +1620,8 @@ allow my_server_t localnet_peer_t:peer recv;</programlisting>
<varlistentry>
<term><varname>HopLimit=</varname></term>
<listitem>
<para> Configures per route hop limit. See also <varname>IPv6HopLimit=</varname>.</para>
<para>Configures per route hop limit. Takes an integer in the range 1…255. See also
<varname>IPv6HopLimit=</varname>.</para>
</listitem>
</varlistentry>

View file

@ -2573,17 +2573,17 @@ int config_parse_route_hop_limit(
r = safe_atou32(rvalue, &k);
if (r < 0) {
log_syntax(unit, LOG_WARNING, filename, line, r,
"Could not parse route hop limit %s \"%s\", ignoring assignment: %m", lvalue, rvalue);
"Could not parse per route hop limit, ignoring assignment: %s", rvalue);
return 0;
}
if (k > 255) {
log_syntax(unit, LOG_WARNING, filename, line, 0,
"Specified route hop limit %s \"%s\" is too large, ignoring assignment: %m", lvalue, rvalue);
"Specified per route hop limit \"%s\" is too large, ignoring assignment: %m", rvalue);
return 0;
}
if (k == 0) {
log_syntax(unit, LOG_WARNING, filename, line, 0,
"Invalid route hop limit %s \"%s\", ignoring assignment: %m", lvalue, rvalue);
"Invalid per route hop limit \"%s\", ignoring assignment: %m", rvalue);
return 0;
}