]> git.puffer.fish Git - mirror/frr.git/commit
lib: add two APIs to handle socket operations with VRF NETNS
authorPhilippe Guibert <philippe.guibert@6wind.com>
Fri, 26 Jan 2018 11:28:27 +0000 (12:28 +0100)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Tue, 27 Feb 2018 10:11:24 +0000 (11:11 +0100)
commit2e0d2b3d9c4f2681d00ec2607319f3bb8078e31d
tree05903e6601393cce616c981bcedd4a62282628d4
parent40289934f1b07acf934f26aec63ed523e6889a1d
lib: add two APIs to handle socket operations with VRF NETNS

The vrf_sockunion_socket() wraps sockunion_socket() with vrf_id as
additional parameter. The creation of socket forces the user to
transparently move to new NETNS for doing the operation.
The vrf_getaddr_info() wraps getaddr_info() with vrf_id as additional
parameter. That API relies on the underlying system. Then there may be
need to switch to an other netns in that case too.
Also, the vrf_socket() implementation is simplified.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
lib/vrf.c
lib/vrf.h