diff options
| author | Rafael Zalamena <rzalamena@users.noreply.github.com> | 2021-06-02 10:47:10 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-02 10:47:10 -0300 |
| commit | d532d1092e165dc9b7164039c0366c4f2856c9f9 (patch) | |
| tree | bed48c7e62accfb5f7e2a74302143e7fb739f076 /lib/vrf.h | |
| parent | bb117f044602662c5ed50727eb9e424c4b653163 (diff) | |
| parent | 75b8d4823696490fc025a97b581439bcb7740604 (diff) | |
Merge pull request #8644 from idryzhov/fix-vrf-bind
lib: fix binding to a vrf
Diffstat (limited to 'lib/vrf.h')
| -rw-r--r-- | lib/vrf.h | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -251,15 +251,14 @@ extern int vrf_sockunion_socket(const union sockunion *su, vrf_id_t vrf_id, const char *name); /* - * Binds a socket to a VRF device. + * Binds a socket to an interface (ifname) in a VRF (vrf_id). * - * If name is null, the socket is not bound, irrespective of any other - * arguments. + * If ifname is NULL or is equal to the VRF name then bind to a VRF device. + * Otherwise, bind to the specified interface in the specified VRF. * - * name should be the name of the VRF device. vrf_id should be the - * corresponding vrf_id (the ifindex of the device). + * Returns 0 on success and -1 on failure. */ -extern int vrf_bind(vrf_id_t vrf_id, int fd, const char *name); +extern int vrf_bind(vrf_id_t vrf_id, int fd, const char *ifname); /* VRF ioctl operations */ extern int vrf_getaddrinfo(const char *node, const char *service, |
