summaryrefslogtreecommitdiffstats
path: root/nhrpd/nhrpd.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* *: Convert `struct event_master` to `struct event_loop`Donald Sharp2023-03-241-1/+1
| | | | | | Let's find a better name for it. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Convert struct thread_master to struct event_master and it's ilkDonald Sharp2023-03-241-1/+1
| | | | | | | Convert the `struct thread_master` to `struct event_master` across the code base. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Rename `struct thread` to `struct event`Donald Sharp2023-03-241-7/+7
| | | | | | | | | Effectively a massive search and replace of `struct thread` to `struct event`. Using the term `thread` gives people the thought that this event system is a pthread when it is not Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: auto-convert to SPDX License IDsDavid Lamparter2023-02-091-5/+1
| | | | | | Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Merge pull request #9854 from opensourcerouting/zapi-call-tableRuss White2021-10-261-2/+2
|\ | | | | *: convert zclient callbacks to table
| * *: convert zclient callbacks to tableDavid Lamparter2021-10-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This removes a giant `switch { }` block from lib/zclient.c and harmonizes all zclient callback function types to be the same (some had a subset of the args, some had a void return, now they all have ZAPI_CALLBACK_ARGS and int return.) Apart from getting rid of the giant switch, this is a minor security benefit since the function pointers are now in a `const` array, so they can't be overwritten by e.g. heap overflows for code execution anymore. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | nhrpd: drop list.hDavid Lamparter2021-10-191-2/+0
| | | | | | | | | | | | `number_of_linked_lists_in_frr--;` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | nhrpd: convert reg list to DLISTDavid Lamparter2021-10-191-2/+5
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | nhrpd: convert mcast list to DLISTDavid Lamparter2021-10-191-2/+5
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | nhrpd: convert nhs list to DLISTDavid Lamparter2021-10-191-3/+7
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | nhrpd: convert notifier list to DLISTDavid Lamparter2021-10-191-11/+16
|/ | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* nhrpd: redirect netlink gre with zebraPhilippe Guibert2021-04-301-4/+29
| | | | | | | | as zebra has a new api to get gre and set gre source commands, netlink gre get and netlink gre source function calls are redirected to zebra by using the zapi interface. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* Merge pull request #8153 from reubendowle/nhrp-multicastJafar Al-Gharaibeh2021-04-131-0/+18
|\ | | | | nhrp, ospf: add nhrp multicast for OSPF DMVPN
| * nhrpd: Introduce new - nflog mutlicast-nflog-group (1-65535) - commandAmol Lad2021-04-051-1/+1
| | | | | | | | Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
| * nhrpd: Fix style violation issuesReuben Dowle2021-04-051-4/+6
| | | | | | | | Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
| * nhrpd: Add support for forwarding multicast packetsAmol Lad2021-04-051-0/+16
| | | | | | | | | | | | | | | | | | | | Forwarding multicast is a pre-requisite for allowing multicast based routing protocols such as OSPF to work with DMVPN This code relies on externally adding iptables rule. For example: iptables -A OUTPUT -d 224.0.0.0/24 -o gre1 -j NFLOG --nflog-group 224 Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
* | nhrpd: add a zebra api to configure neighbor table per interfacePhilippe Guibert2021-04-121-1/+3
| | | | | | | | | | | | | | neighbor table per interface is being configured per interface, via zebra api. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* | nhrp, lib, zebra: add/del neighbor entry possible from nhrpPhilippe Guibert2021-04-091-0/+3
| | | | | | | | | | | | | | | | | | a zebra api is extended to offer ability to add or remove neighbor entry from daemon. Also this extension makes possible to add neigh entry, not only between IPs and macs, but also between IPs and NBMA IPs. This API supports configuring ipv6/ipv4 entries with ipv4/ipv6 lladdr. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* | nhrpd: link layer registration to notificationsPhilippe Guibert2021-04-091-0/+1
|/ | | | | | | | | neighbor notifications are done in zebra. so, instead of relying on nhrp, rely on zebra by using zebra api interface. Consequently, the code originally used in nhrp for netlink neighor notification is no more used. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* Merge pull request #8240 from reubendowle/fixes/nhrp-natJafar Al-Gharaibeh2021-04-041-1/+7
|\ | | | | nhrp: NAT fixes
| * nhrpd: Add Claimed NBMA field in sh ip nhrp cache outputAmol Lad2021-03-181-1/+3
| | | | | | | | Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
| * nhrpd: Process NAT extension properly, and also fallback to IPSec NAT infoGaurav Goyal2021-03-181-0/+4
| | | | | | | | Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
* | Merge pull request #8121 from opensourcerouting/macro-cleanupDonatas Abraitis2021-03-221-1/+1
|\ \ | |/ |/| *: require ISO C11 + semicolons after file-scope macros
| * *: require semicolon after DEFINE_MTYPE & coDavid Lamparter2021-03-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | nhrpd: When IPsec profile is added or deleted, reset the vc and re-check peerGaurav Goyal2021-03-171-0/+1
| | | | | | | | Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
* | nhrpd: Close IPSec connection when tunnel protection removedGaurav Goyal2021-03-171-1/+2
| | | | | | | | Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
* | nhrpd: Retry IPSec if NHRP is repeatedly failingGaurav Goyal2021-03-171-0/+2
|/ | | | | | | | | This prevents a failed IPSec connection from preventing DMVPN from working. A failure situation can be reproduced using a Cisco peer, and and disabling then re-enabling the tunnel IPSec protection (after the IPSec connection has already been established). Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
* libs,nhrpd: remove exec permMark Stapp2021-01-121-0/+0
| | | | | | | Some source files got the exec bit set in a recent commit - undo that. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* nhrpd: Cleanup resources when interface is deletedReuben Dowle2020-12-161-0/+3
| | | | | | | | | | | | Currently when an interface is deleted from configuration, associated resources are not freed. This causes memory leaks and crashes. To reproduce this issue: * Connect to a DMVPN hub * Outside of frr, delete the underlying GRE interface * Use 'no interface xxx' to delete the interface containing nhrp configurations Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
* nhrpd: change ipsec SA count to 32-bitTimo Teräs2020-12-161-1/+1
| | | | | | | | Under certain misconfigurations, the SA count can be unusually high and wrap 8-bit counter. That leads to premature free, and crash. Make the count 32-bit to avoid crash in these rare conditions. Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
* nhrpd: cache config may disappear if iface not present at startupPhilippe Guibert2020-11-231-0/+14
| | | | | | | | When interface not present at config time, store separately the list of config parameters. Then, when interface is ready and an address has been configured, the nbma setting is done. Reversely, when interface disappears, there is no need to keep the maps present, then keep only the configuration. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* nhrpd: clean up SA warningMark Stapp2019-10-171-2/+1
| | | | | | | Try to signal to SA/clang more clearly to clean up an SA warning in the nhrp-specific linkedlist code. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* nhrpd: be more careful with linked listsMark Stapp2019-10-161-2/+4
| | | | | | | | NHRPD has its own linked-list implementation, and one of the apis is a little free and easy with pointers. Also be safer with one list iteration operation. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* *: Add infrastructure to support zapi interface callbacksDonald Sharp2019-09-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Start the conversion to allow zapi interface callbacks to be controlled like vrf creation/destruction/change callbacks. This will allow us to consolidate control into the interface.c instead of having each daemon read the stream and react accordingly. This will hopefully reduce a bunch of cut-n-paste stuff Create 4 new callback functions that will be controlled by lib/if.c create -> A upper level protocol receives an interface creation event The ifp is brand spanking newly created in the system. up -> A upper level protocol receives a interface up event This means the interface is up and ready to go. down -> A upper level protocol receives a interface down destroy -> A upper level protocol receives a destroy event This means to delete the pointers associated with it. At this point this is just boilerplate setup for future commits. There is no new functionality. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* lib: split off c-ares code from nhrpdDavid Lamparter2019-07-031-9/+1
| | | | | | This is useful in other places too, e.g. for BMP outbound connections. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: use ZAPI_CALLBACK_ARGS macro for zapi handlersQuentin Young2019-05-031-14/+7
| | | | | | | | | | | | This macro: - Marks ZAPI callbacks for readability - Standardizes argument names - Makes it simple to add ZAPI arguments in the future - Ensures proper types - Looks better - Shortens function declarations Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: conform with COMMUNITY.md formatting rules, via 'make indent'Lou Berger2018-03-061-71/+108
| | | | Signed-off-by: Lou Berger <lberger@labn.net>
* nhrpd: Let struct zebra_privs_t be availableDonald Sharp2017-10-241-0/+2
| | | | signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* nhrpd: fix issues found by coverityJorge Boncompte2017-08-101-0/+2
| | | | Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
* nhrpd: implement 'show ip nhrp nhs'Timo Teräs2017-04-251-0/+13
|
* nhrpd: change VTY port 2612->2610David Lamparter2017-03-071-1/+1
| | | | | | | 2612 is already in use for ldpd. (Change to SERVICES file resolved in rebasing) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* nhrpd: adapt to API changesDavid Lamparter2017-03-071-0/+3
| | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* nhrpd: implement next hop resolution protocolTimo Teräs2017-03-071-0/+400
This provides DMVPN support and integrates to strongSwan. Please read README.nhrpd and README.kernel for more details. [DL: cherry-picked from dafa05e65fe4b3b3ed5525443f554215ba14f42c] [DL: merge partially resolved, this commit will not build.] Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>