summaryrefslogtreecommitdiffstats
path: root/lib/netns_other.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* *: require semicolon after DEFINE_MTYPE & coDavid Lamparter2021-03-171-2/+2
| | | | | | | | | | | | | | | | | Back when I put this together in 2015, ISO C11 was still reasonably new and we couldn't require it just yet. Without ISO C11, there is no "good" way (only bad hacks) to require a semicolon after a macro that ends with a function definition. And if you added one anyway, you'd get "spurious semicolon" warnings on some compilers... With C11, `_Static_assert()` at the end of a macro will make it so that the semicolon is properly required, consumed, and not warned about. Consistently requiring semicolons after "file-level" macros matches Linux kernel coding style and helps some editors against mis-syntax'ing these macros. Signed-off-by: David Lamparter <equinox@diac24.net>
* Merge pull request #7018 from gouault6wind/show_ip_routeDonatas Abraitis2020-09-231-7/+0
|\ | | | | Clean up in vrf management
| * vrf: VRF_DEFAULT must be 0, remove useless codeChristophe Gouault2020-09-211-7/+0
| | | | | | | | | | | | | | | | | | | | Code was added in the past to support a value of VRF_DEFAULT different from 0. This option was abandoned, the default vrf id is always 0. Remove this code, this will simplify the code and improve performance (use a constant value instead of a function that performs tests). Signed-off-by: Christophe Gouault <christophe.gouault@6wind.com>
* | *: Remove solaris from FRRDonald Sharp2020-09-211-2/+2
|/ | | | | | | | | | The Solaris code has gone through a deprecation cycle. No-one has said anything to us and worse of all we don't have any test systems running Solaris to know if we are making changes that are breaking on Solaris. Remove it from the system so we can clean up a bit. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* lib: make some variables staticDavid Lamparter2019-12-131-1/+1
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* all: remove logical-router functionalityIgor Ryzhov2019-08-021-1/+1
| | | | Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* zebra: add an indirection table for ns_idPhilippe Guibert2018-04-131-0/+5
| | | | | | | | | | 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>
* lib: split logicalrouter and vrf netns featurePhilippe Guibert2018-02-271-0/+165
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>