Commit 805cbe74 authored by Beniamino Galvani's avatar Beniamino Galvani

ifcfg-rh: fix parse of tc qdiscs and filters

Fixes: 902bbfdb
parent fa7af768
...@@ -1999,11 +1999,15 @@ make_tc_setting (shvarFile *ifcfg) ...@@ -1999,11 +1999,15 @@ make_tc_setting (shvarFile *ifcfg)
break; break;
qdisc = nm_utils_tc_qdisc_from_str (value, &local); qdisc = nm_utils_tc_qdisc_from_str (value, &local);
if (!qdisc) if (!qdisc) {
PARSE_WARNING ("ignoring bad qdisc: '%s': %s", value, local->message); PARSE_WARNING ("ignoring bad tc qdisc: '%s': %s", value, local->message);
continue;
}
if (!nm_setting_tc_config_add_qdisc (s_tc, qdisc)) if (!nm_setting_tc_config_add_qdisc (s_tc, qdisc))
PARSE_WARNING ("duplicate qdisc"); PARSE_WARNING ("duplicate tc qdisc");
nm_tc_qdisc_unref (qdisc);
} }
for (i = 1;; i++) { for (i = 1;; i++) {
...@@ -2017,11 +2021,15 @@ make_tc_setting (shvarFile *ifcfg) ...@@ -2017,11 +2021,15 @@ make_tc_setting (shvarFile *ifcfg)
break; break;
tfilter = nm_utils_tc_tfilter_from_str (value, &local); tfilter = nm_utils_tc_tfilter_from_str (value, &local);
if (!tfilter) if (!tfilter) {
PARSE_WARNING ("ignoring bad tfilter: '%s': %s", value, local->message); PARSE_WARNING ("ignoring bad tc filter: '%s': %s", value, local->message);
continue;
}
if (!nm_setting_tc_config_add_tfilter (s_tc, tfilter)) if (!nm_setting_tc_config_add_tfilter (s_tc, tfilter))
PARSE_WARNING ("duplicate filter"); PARSE_WARNING ("duplicate tc filter");
nm_tc_tfilter_unref (tfilter);
} }
if ( nm_setting_tc_config_get_num_qdiscs (s_tc) > 0 if ( nm_setting_tc_config_get_num_qdiscs (s_tc) > 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment