diff --git a/man/systemd.network.xml b/man/systemd.network.xml index 793243f9ae..d8485f736f 100644 --- a/man/systemd.network.xml +++ b/man/systemd.network.xml @@ -2270,6 +2270,21 @@ + + [QDisc] Section Options + The [QDisc] section manages the traffic control queueing discipline (qdisc). + + + + Parent= + + Specifies the parent Queueing Discipline (qdisc). Takes one of clsact + or ingress. This is mandatory. + + + + + [NetworkEmulator] Section Options The [NetworkEmulator] section manages the queueing discipline (qdisc) of diff --git a/src/network/networkd-network-gperf.gperf b/src/network/networkd-network-gperf.gperf index 369631d9ee..81ce9ee1e4 100644 --- a/src/network/networkd-network-gperf.gperf +++ b/src/network/networkd-network-gperf.gperf @@ -251,6 +251,7 @@ CAN.BitRate, config_parse_si_uint64, CAN.SamplePoint, config_parse_permille, 0, offsetof(Network, can_sample_point) CAN.RestartSec, config_parse_sec, 0, offsetof(Network, can_restart_us) CAN.TripleSampling, config_parse_tristate, 0, offsetof(Network, can_triple_sampling) +QDisc.Parent, config_parse_qdisc_parent, _QDISC_KIND_INVALID, 0 ControlledDelay.Parent, config_parse_qdisc_parent, QDISC_KIND_CODEL, 0 ControlledDelay.PacketLimit, config_parse_controlled_delay_u32, QDISC_KIND_CODEL, 0 ControlledDelay.TargetSec, config_parse_controlled_delay_usec, QDISC_KIND_CODEL, 0 @@ -320,7 +321,7 @@ DHCP.RapidCommit, config_parse_bool, DHCP.ForceDHCPv6PDOtherInformation, config_parse_bool, 0, offsetof(Network, dhcp6_force_pd_other_information) DHCPv4.UseDomainName, config_parse_dhcp_use_domains, 0, offsetof(Network, dhcp_use_domains) DHCPv4.CriticalConnection, config_parse_tristate, 0, offsetof(Network, dhcp_critical) -TrafficControlQueueingDiscipline.Parent, config_parse_qdisc_parent, QDISC_KIND_NETEM, 0 +TrafficControlQueueingDiscipline.Parent, config_parse_qdisc_parent, _QDISC_KIND_INVALID, 0 TrafficControlQueueingDiscipline.NetworkEmulatorDelaySec, config_parse_network_emulator_delay, 0, 0 TrafficControlQueueingDiscipline.NetworkEmulatorDelayJitterSec, config_parse_network_emulator_delay, 0, 0 TrafficControlQueueingDiscipline.NetworkEmulatorLossRate, config_parse_network_emulator_rate, 0, 0 diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c index 1b9e6a22b4..96f9c785ba 100644 --- a/src/network/networkd-network.c +++ b/src/network/networkd-network.c @@ -482,6 +482,7 @@ int network_load_one(Manager *manager, OrderedHashmap **networks, const char *fi "IPv6RoutePrefix\0" "TrafficControlQueueingDiscipline\0" "CAN\0" + "QDisc\0" "ControlledDelay\0" "FairQueueing\0" "FairQueueingControlledDelay\0" diff --git a/src/network/tc/qdisc.c b/src/network/tc/qdisc.c index ee0637bf32..c156fe5ce9 100644 --- a/src/network/tc/qdisc.c +++ b/src/network/tc/qdisc.c @@ -254,7 +254,6 @@ int config_parse_qdisc_parent( assert(lvalue); assert(rvalue); assert(data); - assert(ltype >= 0 && ltype < _QDISC_KIND_MAX); r = qdisc_new_static(ltype, network, filename, section_line, &qdisc); if (r < 0) diff --git a/test/fuzz/fuzz-network-parser/directives.network b/test/fuzz/fuzz-network-parser/directives.network index 180a30c32c..5b04fefeb5 100644 --- a/test/fuzz/fuzz-network-parser/directives.network +++ b/test/fuzz/fuzz-network-parser/directives.network @@ -270,6 +270,8 @@ SendOption= [NextHop] Id= Gateway= +[QDisc] +Parent= [NetworkEmulator] Parent= DelaySec=