summaryrefslogtreecommitdiffstats
path: root/lib/iana_afi.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-01-30lib: mgmtd: add YANG notification supportChristian Hopps13-22/+298
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-29zebra: fix compiler warning about truncation.Christian Hopps1-3/+4
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-29topotests: vpnv4 route leaking with import-checkLouis Scalbert5-7/+33
Test vpnv4 route leaking with import-check Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-01-29bgpd: fix VRF leaking with 'network import-check' (4/4)Louis Scalbert1-1/+1
The following configuration creates an infinite routing leaking loop because 'rt vpn both' parameters are the same in both VRFs. > router bgp 5227 vrf r1-cust4 > no bgp network import-check > bgp router-id 192.168.1.1 > address-family ipv4 unicast > network 28.0.0.0/24 > rd vpn export 10:12 > rt vpn both 52:100 > import vpn > export vpn > exit-address-family > ! > router bgp 5227 vrf r1-cust5 > no bgp network import-check > bgp router id 192.168.1.1 > address-family ipv4 unicast > network 29.0.0.0/24 > rd vpn export 10:13 > rt vpn both 52:100 > import vpn > export vpn > exit-address-family The previous commit has added a routing leak update when a nexthop update is received from zebra. It indirectly calls bgp_find_or_add_nexthop() in which a static route triggers a nexthop cache entry registration that triggers a nexthop update from zebra. Do not register again the nexthop cache entry if the BGP_STATIC_ROUTE is already set. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-01-29bgpd: fix VRF leaking with 'network import-check' (3/4)Louis Scalbert4-5/+40
If 'bgp network import-check' is defined on the source BGP session, prefixes that are defined with the network command cannot be leaked to the other VRFs BGP table even if they are present in the origin VRF RIB if the 'rt import' statement is defined after the 'network <prefix>' ones. When a prefix nexthop is updated, update the prefix route leaking. The current state of nexthop validation is now stored in the attributes of the bgp path info. Attributes are compared with the previous ones at route leaking update so that a nexthop validation change now triggers the update of destination VRF BGP table. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-01-29bgpd: fix VRF leaking with 'network import-check' (2/4)Louis Scalbert1-12/+10
"if not XX else" statements are confusing. Replace two "if not XX else" statements by "if XX else" to prepare next commits. The patch is only cosmetic. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-01-29bgpd: fix VRF leaking with 'network import-check' (1/4)Louis Scalbert1-7/+13
If 'bgp network import-check' is defined on the source BGP session, prefixes that are defined with the network command cannot be leaked to the other VRFs BGP table even if they are present in the origin VRF RIB. Always validate the nexthop of BGP static routes (i.e. defined with the network statement) if 'network import-check' is defined on the source BGP session and the prefix is present in source RIB. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-01-28zebra, build: disable irdp by defaultIgor Ryzhov5-8/+6
IRDP client (rdisc) was deleted from iputils more than 2 years ago. It's time to drop IRDP, but first let's stop building and including it in the packages by default to see if anyone will be complaining. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28lib, mgmtd, zebra: cleanup of zebra conversion to mgmtdIgor Ryzhov7-128/+104
- use `apply_finish` callback when possible to avoid multiple applies per commit - move table range working to the CLI handler - remove unnecessary conditional compilation - remove unnecessary boolean conversion Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert to mgmtdIgor Ryzhov28-3285/+3012
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28build: remove mgmtd exception from xref2vtyshIgor Ryzhov2-12/+2
We may actually need to send CLI commands to mgmtd and another daemon at the same time, for example, if this daemon is not mgmtd-converted. The only daemon this exception protects is staticd. But we don't actually need any configuration commands in staticd, so just remove the exception and don't install unnecessary commands to staticd. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28lib: use shared candidate between vty and mgmtd clientIgor Ryzhov1-2/+2
When the daemon is partially mgmtd-converted, it receives configuration from vty and mgmtmd simultaneosly. This configuration must be synchronized. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28lib: convert affinity-map to mgmtdIgor Ryzhov7-38/+22
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28lib: fix yang_dnode_dupIgor Ryzhov1-1/+2
When duplicating nodes, we should always keep flags, especially the LYD_NEW flag that indicates not validated data. This allows to select a new choice's case without the need to explicitly remove the existing one. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert vrf configuration output to NBIgor Ryzhov12-157/+218
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: make vrf netns commands do nothingIgor Ryzhov1-37/+1
These commands don't really provide any functionality. VRF is associated with netns automatically based on its name, and it's not possible to associate VRF and netns with different names with these commands: - When trying to assosiate a VRF with an already existing netns with a different name: `NS /run/netns/test is already configured with VRF 1(test)` - When trying to assiciate a VRF with a non-existing netns, so they become linked once the netns is created: `Invalid pathname for /run/netns/test: No such file or directory` - When doing "no netns" to unlink the netns and link it back to the same VRF: `VRF 1 is already configured with VRF test` - When doing "no netns" to unlink the netns and link it to another VRF: `Can not associate NS 4294967295 with NETNS /run/netns/test` As shown above, not a single usecase is working. We can't remove them completely to preserve backwards-compatibility, so just make them empty. The main reason for this change is not to spend a lot of time trying to figure out how to convert them to northbound. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert table range command to NBIgor Ryzhov7-73/+211
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert resolve-via-default commands to NBIgor Ryzhov5-37/+162
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: fix vni NB conversionIgor Ryzhov4-232/+41
- unnecessary command duplication - usage of oper data during validation - unnecessary checks for things that can't happen Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert route-map delay-timer command to NBIgor Ryzhov6-16/+42
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert ip nht commands to NBIgor Ryzhov6-84/+206
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert ip protocol commands to NBIgor Ryzhov6-82/+202
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert router-id commands to NBIgor Ryzhov7-137/+174
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert interface configuration output to NBIgor Ryzhov11-334/+733
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: fix build with --disable-rtadvIgor Ryzhov5-4/+32
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert PTM configuration to NBIgor Ryzhov7-25/+152
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28lib: add support for "features" when loading YANG modulesIgor Ryzhov7-9/+26
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert interface ipv6 nd dnssl command to NBIgor Ryzhov6-96/+175
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert interface ipv6 nd rdnss command to NBIgor Ryzhov6-87/+159
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert interface ipv6 nd prefix command to NBIgor Ryzhov6-121/+386
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert interface ipv6 nd router-preference command to NBIgor Ryzhov5-38/+69
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert interface ipv6 nd home-agent-lifetime command to NBIgor Ryzhov5-25/+72
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert interface ipv6 nd home-agent-preference command to NBIgor Ryzhov5-25/+71
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert interface ipv6 nd adv-interval-option command to NBIgor Ryzhov5-27/+52
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert interface ipv6 nd home-agent-config-flag command to NBIgor Ryzhov5-24/+51
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert interface ipv6 nd ra-fast-retrans command to NBIgor Ryzhov5-36/+50
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert interface ipv6 nd ra-hop-limit command to NBIgor Ryzhov5-38/+81
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert interface ipv6 nd ra-retrans-interval command to NBIgor Ryzhov5-37/+53
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert interface ipv6 nd mtu command to NBIgor Ryzhov5-22/+53
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert interface ipv6 nd other-config-flag command to NBIgor Ryzhov5-24/+52
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert interface ipv6 nd managed-config-flag command to NBIgor Ryzhov5-24/+53
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert interface ipv6 nd reachable-time command to NBIgor Ryzhov5-24/+55
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert interface ipv6 nd ra interval/lifetime commands to NBIgor Ryzhov6-150/+206
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert interface ipv6 nd suppress-ra command to NBIgor Ryzhov6-40/+70
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert interface evpn mh uplink command to NBIgor Ryzhov6-11/+47
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert interface evpn mh bypass command to NBIgor Ryzhov6-17/+43
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert interface evpn mh es-df-pref command to NBIgor Ryzhov7-31/+66
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert interface evpn mh es-id commands to NBIgor Ryzhov9-159/+361
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28zebra: convert interface link-params packet-loss command to NBIgor Ryzhov6-45/+78
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28lib: fix conversion of yang decimal64 to doubleIgor Ryzhov1-5/+4
Current denominators are not integers and some of them lose precision because of that, for example, 1e-6 is actually stored as 9.9999999999999995e-07 and 1-e12 is stored as 9.9999999999999998e-13. When multiplying by such denominators, we receive incorrect values. Changing denominators to integers and using division instead of multiplication improves precision and solves the problem. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>