summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_network.c
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2018-02-05 17:28:51 +0100
committerPhilippe Guibert <philippe.guibert@6wind.com>2018-02-27 11:11:24 +0100
commit0f4977c6689441e7b3075fc7a82c1ddc9ffdfa1c (patch)
treea4679fd142c21212e652e3253c23bec821fff7b4 /bgpd/bgp_network.c
parentlib: add vrf_ioctl API (diff)
downloadfrr-0f4977c6689441e7b3075fc7a82c1ddc9ffdfa1c.tar.xz
frr-0f4977c6689441e7b3075fc7a82c1ddc9ffdfa1c.zip
lib: add vrf-lite bind capability to vrf APIs
Because socket creation is tightly linked with socket binding for vrf lite, the proposal is made to extend socket creation APIs and to create a new API called vrf_bind that applies to vrf lite. The passed interface name is the interface that will be bound to the socket passed. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'bgpd/bgp_network.c')
-rw-r--r--bgpd/bgp_network.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c
index 59c59f924..240a23d19 100644
--- a/bgpd/bgp_network.c
+++ b/bgpd/bgp_network.c
@@ -571,7 +571,7 @@ int bgp_connect(struct peer *peer)
if (bgpd_privs.change(ZPRIVS_RAISE))
zlog_err("Can't raise privileges");
/* Make socket for the peer. */
- peer->fd = vrf_sockunion_socket(&peer->su, peer->bgp->vrf_id);
+ peer->fd = vrf_sockunion_socket(&peer->su, peer->bgp->vrf_id, NULL);
if (bgpd_privs.change(ZPRIVS_LOWER))
zlog_err("Can't lower privileges");
if (peer->fd < 0)
@@ -751,7 +751,7 @@ int bgp_socket(struct bgp *bgp, unsigned short port, const char *address)
if (bgpd_privs.change(ZPRIVS_RAISE))
zlog_err("Can't raise privileges");
sock = vrf_socket(ainfo->ai_family, ainfo->ai_socktype,
- ainfo->ai_protocol, bgp->vrf_id);
+ ainfo->ai_protocol, bgp->vrf_id, NULL);
if (bgpd_privs.change(ZPRIVS_LOWER))
zlog_err("Can't lower privileges");
if (sock < 0) {