summaryrefslogtreecommitdiffstats
path: root/include (follow)
Commit message (Collapse)AuthorAgeFilesLines
* zebra, lib: add an internal API to get relative default nsid in other nsPhilippe Guibert2020-05-181-0/+1
| | | | | | | | | | | | | | | | | | | as remind, the netns identifiers are local to a namespace. that is to say that for instance, a vrf <vrfx> will have a netns id value in one netns, and have an other netns id value in one other netns. There is a need for zebra daemon to collect some cross information, like the LINK_NETNSID information from interfaces having link layer in an other network namespace. For that, it is needed to have a global overview instead of a relative overview per namespace. The first brick of this change is an API that sticks to netlink API, that uses NETNSA_TARGET_NSID. from a given vrf vrfX, and a new vrf created vrfY, the API returns the value of nsID from vrfX, inside the new vrf vrfY. The brick also gets the ns id value of default namespace in each other namespace. An additional value in ns.h is offered, that permits to retrieve the default namespace context. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* include: add kernel header for seg6/seg6localHiroki Shirokura2020-01-096-0/+237
| | | | | | | | | The linux kernel is adding support for seg6/seg6local lwtunnel type to support SRv6 feature. This commit update our includes to reflect new types and structs we should be listening for from the kernel Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
* include: Add nexthop.h to the include automake fileStephen Worley2019-10-251-0/+1
| | | | | | | Add linux header nexthop.h to the automake file under include/. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
* linux: Update our netlink headers for nexthop group supportStephen Worley2019-10-251-0/+58
| | | | | | | | The linux kernel is adding support for nexthop groups. Update our includes to reflect new types and structs we should be listening for from the kernel. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
* *: strip trailing whitespaceQuentin Young2019-09-302-6/+6
| | | | | | Some of it has snuck by CI Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* include: update include/linuxDonald Sharp2019-09-1911-27/+189
| | | | | | | Newer versions of the linux kernel have made their way into the wild. Update some headers. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* Revert "include: Add linux header mroute.h to our build"David Lamparter2019-01-312-180/+0
| | | | | | | | This reverts commit 086841cf0bddebc21e72dcb24755c222ed29072c. Oops, broke the build... shoulda waited for CI... Signed-off-by: David Lamparter <equinox@diac24.net>
* include: Add linux header mroute.h to our buildDonald Sharp2019-01-302-0/+180
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* zebra: set connected route metric based on the devaddr metricAnuradha Karuppiah2019-01-252-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MACVLAN devices are typically used for applications such as VRR/VRRP that require a second MAC address (virtual). These devices have a corresponding SVI/VLAN device - root@TORC11:~# ip addr show vlan1002 39: vlan1002@bridge: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9152 qdisc noqueue master vrf1 state UP group default link/ether 00:02:00:00:00:2e brd ff:ff:ff:ff:ff:ff inet6 2001:aa:1::2/64 scope global valid_lft forever preferred_lft forever root@TORC11:~# ip addr show vlan1002-v0 40: vlan1002-v0@vlan1002: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9152 qdisc noqueue master vrf1 state UP group default link/ether 00:00:5e:00:01:01 brd ff:ff:ff:ff:ff:ff inet6 2001:aa:1::a/64 metric 1024 scope global valid_lft forever preferred_lft forever root@TORC11:~# The macvlan device is used primarily for RX (VR-IP/VR-MAC). And TX is via the SVI. To acheive that functionality the macvlan network's metric is set to a higher value. Zebra currently ignores the devaddr metric sent by the kernel and hardcodes it to 0. This commit eliminates that hardcoding. If the devaddr metric is available (METRIC_MAX) it is used for setting up the connected route otherwise we fallback to the dev/interface metric. Setting the macvlan metric to a higher value ensures that zebra will always select the connected route on the SVI (and subsequently use it for next hop resolution etc.) - root@TORC11:~# vtysh -c "show ip route vrf vrf1 2001:aa:1::/64" Routing entry for 2001:aa:1::/64 Known via "connected", distance 0, metric 1024, vrf vrf1 Last update 11:30:56 ago * directly connected, vlan1002-v0 Routing entry for 2001:aa:1::/64 Known via "connected", distance 0, metric 0, vrf vrf1, best Last update 11:30:56 ago * directly connected, vlan1002 root@TORC11:~# Ticket: CM-23511 Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
* include: add netlink.h to our build systemDonald Sharp2018-06-212-0/+248
| | | | | | | For compilation on platforms that do not have the linux headers installed. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: PBR - netlink interaction and basic definitionsvivek2018-03-092-0/+75
| | | | | | | | | | Implement netlink interactions for Policy Based Routing. This includes APIs to install and uninstall rules and handle notifications from the kernel related to rule addition or deletion. Various definitions are added to facilitate this. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
* zebra: upon NS creation, collect the NSID via netlinkPhilippe Guibert2018-02-272-0/+24
| | | | | | | | | | | A NS identifier is collected by netlink. This identifier is a 32 bit identifier that is either generated by the kernel (if not set) or manually set by a set netlink command. The commit here is getting the NSID from the newly created NS. If the linux option to create or get a new NSID from the kernel does not exist, then the NSID is locally genrated. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* build: include our own copies of some linux kernel headersRenato Westphal2017-10-248-0/+2241
This is the definitive solution to avoid build issues on old Linux systems, where the system kernel headers might not contain some constants or macros used by FRR (e.g. MPLS_IPTUNNEL_DST, introduced on 2015). This is the same strategy adopted by other projects, like iproute2, libnl, lldpd, strongswan, etc. These header files don't need to be in sync with upstream, they only need to be updated when necessary (e.g. if we want to use a new feature introduced by a recent kernel). Fixes #962 using the solution suggested by David Lamparter. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>