summaryrefslogtreecommitdiff
path: root/src/network/tc/netem.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2020-07-16 14:48:08 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2020-07-17 00:40:09 +0900
commitd96edb2c6e7014e93e6713c79a698c91463c8929 (patch)
treeb54277e70a405ece6700db3c3199d6db04cca0aa /src/network/tc/netem.c
parent4d939d2c849fea2169082451a90722030dca5139 (diff)
downloadsystemd-d96edb2c6e7014e93e6713c79a698c91463c8929.tar.gz
network: downgrade log level in conf parsers
Diffstat (limited to 'src/network/tc/netem.c')
-rw-r--r--src/network/tc/netem.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/src/network/tc/netem.c b/src/network/tc/netem.c
index 7d0add9e30..a94a9a369e 100644
--- a/src/network/tc/netem.c
+++ b/src/network/tc/netem.c
@@ -80,9 +80,11 @@ int config_parse_network_emulator_delay(
r = qdisc_new_static(QDISC_KIND_NETEM, network, filename, section_line, &qdisc);
if (r == -ENOMEM)
return log_oom();
- if (r < 0)
- return log_syntax(unit, LOG_ERR, filename, line, r,
- "More than one kind of queueing discipline, ignoring assignment: %m");
+ if (r < 0) {
+ log_syntax(unit, LOG_WARNING, filename, line, r,
+ "More than one kind of queueing discipline, ignoring assignment: %m");
+ return 0;
+ }
ne = NETEM(qdisc);
@@ -98,7 +100,7 @@ int config_parse_network_emulator_delay(
r = parse_sec(rvalue, &u);
if (r < 0) {
- log_syntax(unit, LOG_ERR, filename, line, r,
+ log_syntax(unit, LOG_WARNING, filename, line, r,
"Failed to parse '%s=', ignoring assignment: %s",
lvalue, rvalue);
return 0;
@@ -140,9 +142,11 @@ int config_parse_network_emulator_rate(
r = qdisc_new_static(QDISC_KIND_NETEM, network, filename, section_line, &qdisc);
if (r == -ENOMEM)
return log_oom();
- if (r < 0)
- return log_syntax(unit, LOG_ERR, filename, line, r,
- "More than one kind of queueing discipline, ignoring assignment: %m");
+ if (r < 0) {
+ log_syntax(unit, LOG_WARNING, filename, line, r,
+ "More than one kind of queueing discipline, ignoring assignment: %m");
+ return 0;
+ }
ne = NETEM(qdisc);
@@ -158,7 +162,7 @@ int config_parse_network_emulator_rate(
r = parse_tc_percent(rvalue, &rate);
if (r < 0) {
- log_syntax(unit, LOG_ERR, filename, line, r,
+ log_syntax(unit, LOG_WARNING, filename, line, r,
"Failed to parse '%s=', ignoring assignment: %s",
lvalue, rvalue);
return 0;
@@ -198,9 +202,11 @@ int config_parse_network_emulator_packet_limit(
r = qdisc_new_static(QDISC_KIND_NETEM, network, filename, section_line, &qdisc);
if (r == -ENOMEM)
return log_oom();
- if (r < 0)
- return log_syntax(unit, LOG_ERR, filename, line, r,
- "More than one kind of queueing discipline, ignoring assignment: %m");
+ if (r < 0) {
+ log_syntax(unit, LOG_WARNING, filename, line, r,
+ "More than one kind of queueing discipline, ignoring assignment: %m");
+ return 0;
+ }
ne = NETEM(qdisc);
@@ -213,7 +219,7 @@ int config_parse_network_emulator_packet_limit(
r = safe_atou(rvalue, &ne->limit);
if (r < 0) {
- log_syntax(unit, LOG_ERR, filename, line, r,
+ log_syntax(unit, LOG_WARNING, filename, line, r,
"Failed to parse '%s=', ignoring assignment: %s",
lvalue, rvalue);
return 0;