summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2024-08-01isisd: vlan-subif isis neighborJosiahMg
Fixed the problem that physical interfaces can establish isis neighbor relationships with vlan subinterfaces Signed-off-by: JosiahMg <JosiahMg@163.com>
2024-04-26build: include our own copy of if.h and dependenciesLouis Scalbert
Import our a copy of Linux if.h and its dependencies (compiler_types.h and libc-compat.h) from the above links. In "if.h", "#include <linux/compiler.h>" has been replaced by "#include <linux/compiler_types.h>". libc-compat.h is needed to avoid conflicts with glibc. Include "linux/if.h" in "zebra.h" when compiling on Linux. De-reference "net/if.h" in C files. Note that "net/if.h" is still needed. It is even included in many Linux kernel files. "linux/if.h" provides additional definitions. Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/include/uapi/linux/if.h?h=v5.5 Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/include/uapi/linux/libc-compat.h?h=v5.5 Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/include/linux/compiler_types.h?h=v5.5 Link: https://patchwork.ozlabs.org/project/glibc/patch/1461512707-23058-1-git-send-email-mikko.rapeli@iki.fi/ Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-03-09lib: Drop include/linux/mroute[6].hDonatas Abraitis
Not needed anymore since https://github.com/FRRouting/frr/pull/15509/commits/a5389154a1363ea778e0cafddc34f1964631278c. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-09-20bgpd,lib,sharpd,zebra: srv6 introduce multiple segs/SIDs in nexthopDmytro Shytyi
Append zebra and lib to use muliple SRv6 segs SIDs, and keep one seg SID for bgpd and sharpd. Note: bgpd and sharpd compilation relies on the lib and zebra files, i.e if we separate this: lib or zebra or bgpd or sharpd in different commits - this will not compile. Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
2023-09-11include: Update `seg6_local.h` to last kernelCarmine Scarpitta
Update `seg6_local.h` to the last kernel version, required to support SRv6 flavors. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-02-17Merge pull request #12780 from opensourcerouting/spdx-license-idDonald Sharp
*: convert to SPDX License identifiers
2023-02-13linux: update if_bridge include to newer versionStephen Worley
Update included if_bridge file to newer version. Signed-off-by: Stephen Worley <sworley@nvidia.com>
2023-02-09*: manual SPDX License ID conversionsDavid Lamparter
The files converted in this commit either had some random misspelling or formatting weirdness that made them escape automated replacement, or have a particularly "weird" licensing setup (e.g. dual-licensed.) This also marks a bunch of "public domain" files as SPDX License "NONE". Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-11-22include: add pkt_cls.h to automake headersSiger Yang
Add pkt_cls.h to subdir.am under include. Signed-off-by: Siger Yang <siger.yang@outlook.com>
2022-10-31include: remove one unused macroanlan_cs
In "rtnetlink.h", four items are a group, e.g. 116/117/118/119 should be a group. But "RTM_SETHWFLAGS" is not in use and has nothing to do with "NEXTHOPBUCKET". After comparing with kernel header, better remove it imo. Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-10-18include: update seg6_local.h to latest kernelCarmine Scarpitta
The seg6_local.h header has changed in the kernel. We need a recent version of the header to support SRv6 End.DT46 behavior. This commit pulls seg6_local.h header from the Linux kernel. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2022-09-15include: clean up some white spacesanlan_cs
Found some extra spaces, clean up them with uniform format. Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-08-10include: add linux header pkt_cls.hSiger Yang
Signed-off-by: Siger Yang <siger.yang@outlook.com>
2022-05-18zebra: netlink registry rtm tunnel notifChirag Shah
The kernel supports l3vxlan device to have (l3vni) vni filter similar to vlan filtering on bridge device. To receive netlink notification, FRR to register for new netlink RTNLGRP_TUNNEL message. This message required to register via additional socket option as it's beyond bitmap size. kernel patches: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/ linux.git/commit/?h=v5.18-rc7&id=7b8135f4df98b155b23754b6065c157861e268f1 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/ linux.git/commit/?h=v5.18-rc7&id=f9c4bb0b245cee35ef66f75bf409c9573d934cf9 Ticket:#3073812 Testing Done: Signed-off-by: Chirag Shah <chirag@nvidia.com>
2022-05-06pim6d: fix Linux kernel header macroDavid Lamparter
__KERNEL_DIV_ROUND_UP isn't in older versions of linux/const.h. Rather than pull in more headers, just inline the definition. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-03-23pim6d: Mroute changesplsaranya
Mroute and supporting changes Signed-off-by: plsaranya <Saranya_Panjarathina@dell.com>
2022-03-09include: bump if_netlink.h version for protodownStephen Worley
Bump if_netlink.h UAPI files for protodown netlink processing. Signed-off-by: Stephen Worley <sworley@nvidia.com>
2022-02-25zebra: Start of work to get data about mpls from kernelDonald Sharp
a) We'll need to pass the info up via some dataplane control method (This way bsd and linux can both be zebra agnostic of each other) b) We'll need to modify `struct interface *` to track this data and when it changes to notify upper level protocols about it. c) Work is needed to dump the entire mpls state at the start so we can gather interface state. This should be done after interface data gathering from the kernel. Signed-off-by: Donald Sharp <sharpd@nvidia.com> Signed-off-by: Mark Stapp <mstapp@nvidia.com>
2022-02-08Merge pull request #9649 from proelbtn/add-support-for-end-dt4Russ White
add support for SRv6 IPv4 L3VPN
2021-11-22zebra: add support for End.DT4Ryoga Saito
This patch enables zebra to insert End.DT4 nexthop into linux kernel. Signed-off-by: Ryoga Saito <ryoga.saito@linecorp.com>
2021-10-25include, zebra: Add recent nexthop.hDonald Sharp
Add actual recent nexthop.h file from kernel and fix up resulting fallout because FRR's original nexthop.h did not match upstream linux kernel. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-08-16include: Update rtnetlink.h to be correct with upstream kernelsDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-04-30nhrpd: cleaning netlink gre informationPhilippe Guibert
flush netlink related dependencies with gre information. Add some linux headers required to compile with it. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2021-04-30zebra: storage of gre information in zebra layerPhilippe Guibert
zebra is able to get information about gre tunnels. zebra_gre file is created to handle hooks, but is not yet used. also, debug zebra gre command is done to add gre traces. A zebra_gre file is used for complementary actions that may be needed. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-12-11zebra: move from NDA_NOTIFY to NDA_FDB_EXT_ATTRSNikolay Aleksandrov
Use the new nested NDA_FDB_EXT_ATTRS attribute to control per-fdb notifications. PS: The attributes where updated as a part of the kernel upstreaming hence the change. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-11-15include: Update rtnetlink.hDonald Sharp
Update to latest kernel version of rtnetlink.h We are really bringing in the RTM_F_OFFLOAD_FAILED change. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-09-23Merge pull request #7155 from donaldsharp/TRAPMark Stapp
Offload/Trap
2020-09-22Merge pull request #7116 from AnuradhaKaruppiah/mh-neigh-fixesSri Mohana Singamsetty
evpn-mh: changes for programming synced neighs as static in the dataplane
2020-09-22include: Update rtnetlink.h to latest kernelDonald Sharp
The rtnetlink.h header has changed in the kernel. Let's pull it in we need this for OFFLOAD and TRAP Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-09-16linux: UAPI for neigh syncAnuradha Karuppiah
kernel header files for neigh sync support Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-08-18zebra, lib: add an internal API to get relative default nsid in other nsPhilippe Guibert
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>
2020-08-05linux: UAPI for MAC syncAnuradha Karuppiah
MAC entries rxed from an ES-peer need to be marked as static to prevent them from being aged out. However, for static entries, we still need to track local activity to independently (independent of BGP) establish that a host is still attached to the ES. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-08-05linux: UAPI for L2-NHG and MAC-ECMPAnuradha Karuppiah
linux headers needed for MH MAC-ECMP support Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-08-05evpn-netns: Revert PR5077, has been re-worked post-refactorPat Ruddy
Revert "zebra: support for macvlan interfaces" This reverts commit bf69e212fd053af3298fc3cba38458b396467849. Revert "doc: add some documentation about bgp evpn netns support" This reverts commit 89b97c33d7a6d9dc427d56fea52fa27334dde81d. Revert "zebra: dynamically detect vxlan link interfaces in other netns" This reverts commit de0ebb25404fe984f084a0d57b7f873618423876. Revert "bgpd: sanity check when updating nexthop from bgp to zebra" This reverts commit ee9633ed87f0ff5da1373a42d6c044f0a682c8d3. Revert "lib, zebra: reuse and adapt ns_list walk functionality" This reverts commit c4d466c830083e8ba58881d7ad03a90f6baf0754. Revert "zebra: local mac entries populated in correct netnamespace" This reverts commit 40424548910887f3bbbf544ce964d3b736048ae5. Revert "zebra: when parsing local entry against dad, retrieve config" This reverts commit 3acc394bc5e5c225e9258fd0d57a6cebea0c0ccd. Revert "bgpd: evpn nexthop can be changed by default" This reverts commit a2342a241253c41b798845cae155b4caab4bcda5. Revert "zebra: zvni_map_to_vlan() adaptation for all namespaces" This reverts commit db81d18647bbd81a2c335620c9a03e32e4a5b2be. Revert "zebra: add ns_id attribute to mac structure" This reverts commit 388d5b438e22cddc6740e362763c0922edbb242a. Revert "zebra: bridge layer2 information records ns_id where bridge is" This reverts commit b5b453a2d6af58692bee0e256fe1dffe99824801. Revert "zebra, lib: new API to get absolute netns val from relative netns val" This reverts commit b6ebab34f664ba1cc9479fc1287f127c12077509. Revert "zebra, lib: store relative default ns id in each namespace" This reverts commit 9d3555e06ccc68fe37e0a00100029ac4bad8dee2. Revert "zebra, lib: add an internal API to get relative default nsid in other ns" This reverts commit 97c9e7533bd22029ac19838c043cfca82d2f6eb3. Revert "zebra: map vxlan interface to bridge interface with correct ns id" This reverts commit 7c990878f20efff335c1211deda3ec50071ae2b5. Revert "zebra: fdb and neighbor table are read for all zns" This reverts commit f8ed2c5420106314a940cb67264494e0110fc4c0. Revert "zebra: zvni_map_to_svi() adaptation for other network namespaces" This reverts commit 2a9dccb6475bfc11af2b855c4c8ff9e500ba21f4. Revert "zebra: display interface slave type" This reverts commit fc3141393ad95651d31fccd144b5c029d00e5f3a. Revert "zebra: zvni_from_svi() adaptation for other network namespaces" This reverts commit 6fe516bd4b85569b3b8b4bcc2910afc5569aa026. Revert "zebra: importation of bgp evpn rt5 from vni with other netns" This reverts commit 28254125d06f65cc4344b6156eec76a37ec6aede. Revert "lib, zebra: update interface name at netlink creation" This reverts commit 1f7a68a2ff0ba1424131f30112e0cc1572f0bee3. Signed-off-by: Pat Ruddy <pat@voltanet.io>
2020-05-18zebra, lib: add an internal API to get relative default nsid in other nsPhilippe Guibert
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>
2020-01-09include: add kernel header for seg6/seg6localHiroki Shirokura
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>
2019-10-25include: Add nexthop.h to the include automake fileStephen Worley
Add linux header nexthop.h to the automake file under include/. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
2019-10-25linux: Update our netlink headers for nexthop group supportStephen Worley
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>
2019-09-30*: strip trailing whitespaceQuentin Young
Some of it has snuck by CI Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-09-19include: update include/linuxDonald Sharp
Newer versions of the linux kernel have made their way into the wild. Update some headers. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-31Revert "include: Add linux header mroute.h to our build"David Lamparter
This reverts commit 086841cf0bddebc21e72dcb24755c222ed29072c. Oops, broke the build... shoulda waited for CI... Signed-off-by: David Lamparter <equinox@diac24.net>
2019-01-30include: Add linux header mroute.h to our buildDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-25zebra: set connected route metric based on the devaddr metricAnuradha Karuppiah
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>
2018-06-21include: add netlink.h to our build systemDonald Sharp
For compilation on platforms that do not have the linux headers installed. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-03-09*: PBR - netlink interaction and basic definitionsvivek
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>
2018-02-27zebra: upon NS creation, collect the NSID via netlinkPhilippe Guibert
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>
2017-10-24build: include our own copies of some linux kernel headersRenato Westphal
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>