summaryrefslogtreecommitdiff
path: root/lib/netns_linux.c
AgeCommit message (Collapse)Author
2020-02-04zebra, lib: Remove return from void functionsDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2019-12-13lib: make some variables staticDavid Lamparter
Signed-off-by: David Lamparter <equinox@diac24.net>
2019-02-25*: remove null check before XFREEQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-09-13*: style for EC replacementsQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-09-13*: LIB_[ERR|WARN] -> EC_LIBQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-09-06lib: Convert netns_linux.c to new error-code workDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-29lib: remove spurious message when netns is not availablePhilippe Guibert
remove spurious message when netns is not available. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-08-14*: rename ferr_zlog -> flog_err_sysQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-08-14*: rename zlog_fer -> flog_errQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-08-14lib: Add LIB_ERR_NS to error subsystemDonald Sharp
Add additional information about NameSpace errors that may happen. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-14lib: Add LIB_ERR_SYSTEM_CALL and convert VRF_SOCKET to SOCKETDonald Sharp
Add a new error code LIB_ERR_SYSTEM_CALL to the ferr subsystem. Additionally convert LIB_ERR_VRF_SOCKET to a more generic LIB_ERR_SOCKET. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-07-06lib: add the pathname to get the realpath in case of failurePhilippe Guibert
Sometimes, the file under /var/run/netns may not be authorised to be read ( because it is not read permission for frr user, for instance). so it is good to know what happened. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-04-13lib: rename parameter for netns functionPhilippe Guibert
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-04-13lib: Update netns_linux.cPhilippe Guibert
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-04-13zebra: add an indirection table for ns_idPhilippe Guibert
This list "table" is created in the case the netns backend for VRF is used. This contains the mapping between the NSID value read from the 'ip netns list' and the ns id external used to create the VRF value from vrf context. This mapping is necessary in order to reserve default 0 value for vrf_default. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-03-31lib: Namespaces should only complain about failure if we have itDonald Sharp
Do not complain about failure to create a namespace if we do not have any such thing going on. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-03-07Merge pull request #1428 from LabNConsulting/working/master/indentDonald Sharp
frr: conform with COMMUNITY.md formatting rules
2018-03-06*: conform with COMMUNITY.md formatting rules, via 'make indent'Lou Berger
Signed-off-by: Lou Berger <lberger@labn.net>
2018-03-06lib: NS_DEFAULT wrong valuePhilippe Guibert
The NS_DEFAULT value returns UNKNOWN in the case the vrf lite backend is used, whereas this is wrong. This commit fixes the default value. Also, it fixes the default value in the case NETNS support from system is not ok, or some error can occur when reading default NS at startup. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-02-27lib: do not use ENOSYS errno when returning from nsPhilippe Guibert
ENOSYS should not be used for other goals. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-02-27lib: netns checkstyle fixPhilippe Guibert
A space is appended between RB_FOREACH and ' ', to comply with style practiced in frr. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-02-27lib: add debug guard for ns informational tracesPhilippe Guibert
Informational traces are being added. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-02-27lib: split logicalrouter and vrf netns featurePhilippe Guibert
This split is introducing logicalrouter.[ch] as the file that contains the vty commands to configure logical router feature. The split has as consequence that the backend of logical router is linux_netns.c formerly called ns.c. The same relationship exists between VRF and its backend which may be linux_netns.c file. The split is adapting ns and vrf fiels so as to : - clarify header - ensure that the daemon persepctive, the feature VRF or logical router is called instead of calling directly ns. - this implies that VRF will call NS apis, as logical router does. Also, like it is done for default NS and default VRF, the associated VRF is enabled first, before NETNS is enabled, so that zvrf->zns pointer is valid when NETNS discovery applies. Also, other_netns.c file is a stub handler that will be used for non linux systems. As NETNS feature is only used by Linux, some BSD systems may want to use the same backend API to benefit from NETNS. This is what that file has been done. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>