summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2019-12-18 22:01:44 +0100
committerQuentin Young <qlyoung@cumulusnetworks.com>2019-12-18 22:01:44 +0100
commit444a06ea959f9793b5dde9a8df3a3736b7229b46 (patch)
tree5e7a475729a39c476c65ea6244f4a9e7ce426461
parentlib: document vrf_socket(), vrf_bind() (diff)
downloadfrr-444a06ea959f9793b5dde9a8df3a3736b7229b46.tar.xz
frr-444a06ea959f9793b5dde9a8df3a3736b7229b46.zip
vrrpd: support namespace vrf too
-.- Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
-rw-r--r--vrrpd/vrrp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/vrrpd/vrrp.c b/vrrpd/vrrp.c
index 973485bb5..2acf98589 100644
--- a/vrrpd/vrrp.c
+++ b/vrrpd/vrrp.c
@@ -1086,8 +1086,10 @@ static int vrrp_socket(struct vrrp_router *r)
bool failed = false;
frr_with_privs(&vrrp_privs) {
- r->sock_rx = socket(r->family, SOCK_RAW, IPPROTO_VRRP);
- r->sock_tx = socket(r->family, SOCK_RAW, IPPROTO_VRRP);
+ r->sock_rx = vrf_socket(r->family, SOCK_RAW, IPPROTO_VRRP,
+ r->vr->ifp->vrf_id, NULL);
+ r->sock_tx = vrf_socket(r->family, SOCK_RAW, IPPROTO_VRRP,
+ r->vr->ifp->vrf_id, NULL);
}
if (r->sock_rx < 0 || r->sock_tx < 0) {