]> git.ipfire.org Git - thirdparty/chrony.git/commit
sys_linux: allow setsockopt(SOL_IP, IP_TOS) in seccomp
authorFoster Snowhill <forst@forstwoof.ru>
Sun, 4 Apr 2021 13:12:17 +0000 (15:12 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Wed, 7 Apr 2021 15:14:22 +0000 (17:14 +0200)
commit966e6fd939df724235a93e7a89dd7cf67178f99d
treea9c1bba0dd3cac52677726b19d396d46014231a2
parent4f0dd72cf092d6a98629949555b1d3f2aa7bc6e1
sys_linux: allow setsockopt(SOL_IP, IP_TOS) in seccomp

This system call is required by the DSCP marking feature introduced in commit
6a5665ca5877 ("conf: add dscp directive").

Before this change, enabling seccomp filtering (chronyd -F 1) and specifying a
custom DSCP value in the configuration (for example "dscp 46") caused the
process to be killed by seccomp due to IP_TOS not being allowed by the filter.

Tested before and after the change on Ubuntu 21.04, kernel 5.11.0-13-generic.
IP_TOS is available since Linux 1.0, so I didn't add any ifdefs for it.

Signed-off-by: Foster Snowhill <forst@forstwoof.ru>
sys_linux.c