Page MenuHomeVyOS Platform

QOS-Rewrite: protocol name used literally
Closed, ResolvedPublic

Description

As of right now, protocols can only be matched by protocol id in T4284.
There is no protocol -> id translation taking place and the tc commands end up being invalid.

set qos policy shaper test class 2 match icmpv4 ip protocol icmp

ends up failing with:

cmd 'tc filter replace dev eth0 parent 1: protocol all u32 match ip protocol **icmp** 0xff action police rate 60000000 burst 16kb flowid 1:2'
returned (out):

returned (err):
Illegal "match"

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

MartB created this object in space S1 VyOS Public.
Viacheslav claimed this task.
Viacheslav moved this task from Need Triage to Finished on the VyOS 1.4 Sagitta board.
Viacheslav added a subscriber: Viacheslav.

Fixed in https://github.com/vyos/vyos-1x/pull/2047 https://vyos.dev/T5256

set qos interface eth0 egress 'test'
set qos policy shaper test bandwidth '330mbit'
set qos policy shaper test class 23 bandwidth '50%'
set qos policy shaper test class 23 match icmpv4 ip protocol 'icmp'
set qos policy shaper test default bandwidth '300mbit'
set qos policy shaper test default queue-type 'fair-queue'

commit

DEBUG/QoS: tc qdisc replace dev eth0 root handle 1: htb r2q 206 default 18
DEBUG/QoS: tc class replace dev eth0 parent 1: classid 1:1 htb rate 330000000
DEBUG/QoS: tc class replace dev eth0 parent 1:1 classid 1:17 htb rate 165000000 burst 15k quantum 1514
DEBUG/QoS: tc qdisc replace dev eth0 parent 1:17 sfq
DEBUG/QoS: tc class replace dev eth0 parent 1:1 classid 1:18 htb rate 300000000 burst 15k quantum 1514 prio 20
DEBUG/QoS: tc qdisc replace dev eth0 parent 1:18 sfq
DEBUG/QoS: tc qdisc replace dev eth0 parent 1:17 fq_codel quantum 1514 flows 1024 interval 100 interval 100 target 5 noecn
DEBUG/QoS: tc filter replace dev eth0 parent 1: protocol all u32 match ip protocol 1 0xff flowid 1:17