From: Pavel Balaev <hidden> Date: 2018-11-15 00:34:55
Hello, for now IP rules supports only old TOS values and we cannot use
DSCP.
This patch adds support for DSCP values in IP rules:
$ ip r add default via 192.168.0.6 table test
$ ip ru add tos 0x80 table test
$ ip ru
0: from all lookup local
32764: from all tos CS4 lookup test
32766: from all lookup main
32767: from all lookup default
$ ip r get fibmatch 8.8.8.9 tos 0x80
default tos CS4 via 192.168.0.6 dev lan table test
Signed-off-by: Pavel Balaev <redacted>
---
net/ipv4/fib_rules.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Pavel Balaev <hidden> Date: 2018-11-16 01:13:20
On Wed, Nov 14, 2018 at 05:30:37PM +0300, Pavel Balaev wrote:
quoted hunk
Hello, for now IP rules supports only old TOS values and we cannot use
DSCP.
This patch adds support for DSCP values in IP rules:
$ ip r add default via 192.168.0.6 table test
$ ip ru add tos 0x80 table test
$ ip ru
0: from all lookup local
32764: from all tos CS4 lookup test
32766: from all lookup main
32767: from all lookup default
$ ip r get fibmatch 8.8.8.9 tos 0x80
default tos CS4 via 192.168.0.6 dev lan table test
Signed-off-by: Pavel Balaev <redacted>
---
net/ipv4/fib_rules.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
This patch adds ability to set newer RFC2597 values, they also presents
in /etc/iproute2/rt_dsfield:
0x28 AF11
0x30 AF12
0x38 AF13
0x48 AF21
...
If one tries to apply this values with iproure2 (ip rule add tos 0x28
...) he will get error from netlink: "Invalid tos" for this moment.
From: Pavel Balaev <hidden> Date: 2018-11-16 01:14:40
On Wed, Nov 14, 2018 at 05:30:37PM +0300, Pavel Balaev wrote:
quoted hunk
Hello, for now IP rules supports only old TOS values and we cannot use
DSCP.
This patch adds support for DSCP values in IP rules:
$ ip r add default via 192.168.0.6 table test
$ ip ru add tos 0x80 table test
$ ip ru
0: from all lookup local
32764: from all tos CS4 lookup test
32766: from all lookup main
32767: from all lookup default
$ ip r get fibmatch 8.8.8.9 tos 0x80
default tos CS4 via 192.168.0.6 dev lan table test
Signed-off-by: Pavel Balaev <redacted>
---
net/ipv4/fib_rules.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
In addition. This patch adds ability to set newer RFC2597 values. They
also presents in /etc/iproute2/rt_dsfield:
# Newer RFC2597 values
0x28 AF11
0x30 AF12
0x38 AF13
0x48 AF21
....
If one tries to apply this values with iproure2 (ip rule add tos 0x28
...) he will get error from netlink: "Invalid tos" for this moment.
From: David Miller <davem@davemloft.net> Date: 2018-11-17 14:44:32
From: Pavel Balaev <redacted>
Date: Wed, 14 Nov 2018 17:30:37 +0300
Hello, for now IP rules supports only old TOS values and we cannot use
DSCP.
This patch adds support for DSCP values in IP rules:
$ ip r add default via 192.168.0.6 table test
$ ip ru add tos 0x80 table test
$ ip ru
0: from all lookup local
32764: from all tos CS4 lookup test
32766: from all lookup main
32767: from all lookup default
$ ip r get fibmatch 8.8.8.9 tos 0x80
default tos CS4 via 192.168.0.6 dev lan table test
Signed-off-by: Pavel Balaev <redacted>
Please repost this with all of your follow-up comments added to
the commit message.
And provide a proper subsystem prefix in your Subject line, such
as "ipv4: ".