diff options
| author | Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org> | 2025-02-21 08:54:49 +0100 |
|---|---|---|
| committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2025-02-24 18:57:32 +0000 |
| commit | e1c0246dee86db5103cf8036277bef9235466b40 (patch) | |
| tree | ad03a5b783c61418861739dc6d3d6d6c21aabe9f | |
| parent | 2539e678848b8f9f629c395c6c21770cc9237d09 (diff) | |
pimd: Fix PIM VRF support (send register/register stop in VRF)
In 946195391406269003275850e1a4d550ea8db38b and
8ebcc02328c6b63ecf85e44fdfbf3365be27c127, transmission of PIM register and
register stop messages was changed to use a separate socket. However, that
socket is not bound to a possible VRF, so the messages were sent in the
default VRF instead. Call vrf_bind() once after socket creation and when the
VRF is ready to ensure transmission in the correct VRF. vrf_bind() handles
the non-VRF case (i.e. VRF_DEFAULT) automatically, so it may be called
unconditionally.
Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
(cherry picked from commit 5a01011e0d2db538a8ba523904bd4f08b786edfb)
| -rw-r--r-- | pimd/pim_instance.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pimd/pim_instance.c b/pimd/pim_instance.c index f7c5ea3bcf..30726b1b71 100644 --- a/pimd/pim_instance.c +++ b/pimd/pim_instance.c @@ -186,6 +186,9 @@ static int pim_vrf_enable(struct vrf *vrf) zlog_debug("%s: for %s %u", __func__, vrf->name, vrf->vrf_id); + if (vrf_bind(vrf->vrf_id, pim->reg_sock, NULL) < 0) + zlog_warn("Failed to bind register socket to VRF %s", vrf->name); + pim_mroute_socket_enable(pim); FOR_ALL_INTERFACES (vrf, ifp) { |
