]> git.ipfire.org Git - thirdparty/bird.git/commit
IO: Avoid re-binding accepted sockets to VRF
authorOndrej Zajicek <santiago@crfreenet.org>
Tue, 30 Jul 2024 14:33:51 +0000 (16:33 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Tue, 30 Jul 2024 14:33:51 +0000 (16:33 +0200)
commitdf22b3140cad6bd8742dce16e6a1b342d4a83f6d
treeb67d77877f38dad3f7994c7c1a038c9737e48adb
parent08ff0af8986099e6fb1d8a94c7ce62c83e4df7f1
IO: Avoid re-binding accepted sockets to VRF

When VRFs are used, BIRD correctly binds listening (and connecting)
sockets to their VRFs but also re-binds accepted sockets to the same VRF.
This is not needed as the interface bind is inherited in this case, and
indeed this redundant bind causes an -EPERM if BIRD is running as
non-root making BIRD close the connection and reject the peer.

Thanks to Christian Svensson for the original patch and Alexander Zubkov
for suggestions.
sysdep/unix/io.c