diff options
author | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2019-10-15 19:56:27 +0200 |
---|---|---|
committer | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2019-11-04 13:50:54 +0100 |
commit | 4a9feb66b9cae67b0e360d8a5880ba3395b5fbe9 (patch) | |
tree | ec47746bc95f447e4d8708f5f4ddbc0adfcc3762 /bfdd/bfd.c | |
parent | Merge pull request #5272 from vincentbernat/fix/debian-copyright (diff) | |
download | frr-4a9feb66b9cae67b0e360d8a5880ba3395b5fbe9.tar.xz frr-4a9feb66b9cae67b0e360d8a5880ba3395b5fbe9.zip |
bfdd: bind VRF sockets to devices
Always bind the created sockets to their respective VRF devices. With
this it should be possible to run BFD on VRFs without needing to weaken
the security setting `net.ipv4.udp_l3mdev_accept=1`.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Diffstat (limited to 'bfdd/bfd.c')
-rw-r--r-- | bfdd/bfd.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bfdd/bfd.c b/bfdd/bfd.c index 6e956aa92..cc171f2eb 100644 --- a/bfdd/bfd.c +++ b/bfdd/bfd.c @@ -1696,17 +1696,17 @@ static int bfd_vrf_enable(struct vrf *vrf) if (vrf->vrf_id == VRF_DEFAULT || vrf_get_backend() == VRF_BACKEND_NETNS) { if (!bvrf->bg_shop) - bvrf->bg_shop = bp_udp_shop(vrf->vrf_id); + bvrf->bg_shop = bp_udp_shop(vrf); if (!bvrf->bg_mhop) - bvrf->bg_mhop = bp_udp_mhop(vrf->vrf_id); + bvrf->bg_mhop = bp_udp_mhop(vrf); if (!bvrf->bg_shop6) - bvrf->bg_shop6 = bp_udp6_shop(vrf->vrf_id); + bvrf->bg_shop6 = bp_udp6_shop(vrf); if (!bvrf->bg_mhop6) - bvrf->bg_mhop6 = bp_udp6_mhop(vrf->vrf_id); + bvrf->bg_mhop6 = bp_udp6_mhop(vrf); if (!bvrf->bg_echo) - bvrf->bg_echo = bp_echo_socket(vrf->vrf_id); + bvrf->bg_echo = bp_echo_socket(vrf); if (!bvrf->bg_echov6) - bvrf->bg_echov6 = bp_echov6_socket(vrf->vrf_id); + bvrf->bg_echov6 = bp_echov6_socket(vrf); /* Add descriptors to the event loop. */ if (!bvrf->bg_ev[0]) |