diff options
author | David Lamparter <equinox@diac24.net> | 2019-08-13 15:47:23 +0200 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2019-09-03 17:18:35 +0200 |
commit | 0cf6db21eca516d825431d4a747748a94c890aad (patch) | |
tree | 9cd6d2fa6df5f91024a4edc160d4c759bd93d942 /vrrpd/vrrp.c | |
parent | tools: extend checkpatch.pl for frr_{with,each} (diff) | |
download | frr-0cf6db21eca516d825431d4a747748a94c890aad.tar.xz frr-0cf6db21eca516d825431d4a747748a94c890aad.zip |
*: frr_elevate_privs -> frr_with_privs
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'vrrpd/vrrp.c')
-rw-r--r-- | vrrpd/vrrp.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/vrrpd/vrrp.c b/vrrpd/vrrp.c index 951ad3f58..b4049b55e 100644 --- a/vrrpd/vrrp.c +++ b/vrrpd/vrrp.c @@ -1065,8 +1065,7 @@ static int vrrp_socket(struct vrrp_router *r) int ret; bool failed = false; - frr_elevate_privs(&vrrp_privs) - { + 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); } @@ -1102,8 +1101,7 @@ static int vrrp_socket(struct vrrp_router *r) setsockopt_ipv4_multicast_loop(r->sock_tx, 0); /* Bind Rx socket to exact interface */ - frr_elevate_privs(&vrrp_privs) - { + frr_with_privs(&vrrp_privs) { ret = setsockopt(r->sock_rx, SOL_SOCKET, SO_BINDTODEVICE, r->vr->ifp->name, strlen(r->vr->ifp->name)); @@ -1213,8 +1211,7 @@ static int vrrp_socket(struct vrrp_router *r) setsockopt_ipv6_multicast_loop(r->sock_tx, 0); /* Bind Rx socket to exact interface */ - frr_elevate_privs(&vrrp_privs) - { + frr_with_privs(&vrrp_privs) { ret = setsockopt(r->sock_rx, SOL_SOCKET, SO_BINDTODEVICE, r->vr->ifp->name, strlen(r->vr->ifp->name)); |