0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 01:31:55 +00:00

Merge commit 'df22b314' into thread-merge-2.16

This commit is contained in:
Maria Matejka 2024-11-28 12:08:43 +01:00
commit 3bbe0ec251

View File

@ -1108,10 +1108,11 @@ sk_setup(sock *s)
}
#endif
if (s->vrf && (s->vrf != &default_vrf) && !s->iface)
if (s->vrf && (s->vrf != &default_vrf) && !s->iface && (s->type != SK_TCP))
{
/* Bind socket to associated VRF interface.
This is Linux-specific, but so is SO_BINDTODEVICE. */
This is Linux-specific, but so is SO_BINDTODEVICE.
For accepted TCP sockets it is inherited from the listening one. */
#ifdef SO_BINDTODEVICE
struct ifreq ifr = {};
strcpy(ifr.ifr_name, s->vrf->name);