summaryrefslogtreecommitdiff
path: root/zebra/if_netlink.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 /zebra/if_netlink.c
parent516d7591d68cf4537bb7f0603ff703e808381d03 (diff)
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 'zebra/if_netlink.c')
-rw-r--r--zebra/if_netlink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/zebra/if_netlink.c b/zebra/if_netlink.c
index 65f1e56587..639f70a6b4 100644
--- a/zebra/if_netlink.c
+++ b/zebra/if_netlink.c
@@ -367,7 +367,8 @@ static int get_iflink_speed(struct interface *interface)
/* use ioctl to get IP address of an interface */
if (zserv_privs.change(ZPRIVS_RAISE))
zlog_err("Can't raise privileges");
- sd = vrf_socket(PF_INET, SOCK_DGRAM, IPPROTO_IP, interface->vrf_id);
+ sd = vrf_socket(PF_INET, SOCK_DGRAM, IPPROTO_IP,
+ interface->vrf_id, NULL);
if (sd < 0) {
if (IS_ZEBRA_DEBUG_KERNEL)
zlog_debug("Failure to read interface %s speed: %d %s",