summaryrefslogtreecommitdiff
path: root/pimd/pim_rp.h
AgeCommit message (Collapse)Author
2023-02-09*: auto-convert to SPDX License IDsDavid Lamparter
Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-03-28pim6d: Implementing "show ipv6 pim rp-info" CLIAbhishek N R
Adding new show CLI to display pim RP information. Also corrected ipv4 json object. Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-03-12pimd: Show group-type under `show ip pim rp-info`Donatas Abraitis
And filter by group for PIM. ``` exit1-debian-11# show ip pim rp-info RP address group/prefix-list OIF I am RP Source Group-Type 192.168.10.17 238.0.0.0/24 eth2 no Static ASM 192.168.10.110 232.0.0.0/24 eth2 no Static SSM exit1-debian-11# show ip pim rp-info 238.0.0.0/24 RP address group/prefix-list OIF I am RP Source Group-Type 192.168.10.17 238.0.0.0/24 eth2 no Static ASM exit1-debian-11# show ip pim rp-info 238.0.0.0/24 json { "192.168.10.17":[ { "rpAddress":"192.168.10.17", "outboundInterface":"eth2", "iAmRP":false, "group":"238.0.0.0/24", "source":"Static", "groupType":"ASM" } ] } exit1-debian-11# ``` Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-03-08pim6d: Modify pim_rp_del for PIMv4/PIMv6Mobashshera Rasool
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-03-08pim6d: Modify pim_rp_change api for pimv6Mobashshera Rasool
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-03-08pim6d: Modify pim_rp_new for pimv6Mobashshera Rasool
Modify the api pim_rp_new to accomodate pimv6 changes. Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-03-08pim6d: Return type and parameter changes for api pim_rp_del_configMobashshera Rasool
1. Return value of this function pim_rp_del_config is nowhere used. So made it as a void function. 2. Paramater const char *rp is first converted to string from prefix in the caller and then back to prefix in this api pim_rp_del_config. Fixed it by directly passing the address instead of string. Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-02-14pim6d: prepare/stub pim_rp_* functions for IPv6David Lamparter
These are sprinkled relatively widely through the PIM codebase, so for the time being reduce the "compiler warning surface" by moving them forward to proper types without actual implementations. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-08-27pimd: de-circularize includesDavid Lamparter
pimd's include files are very interdependent. Let's chop that down a bit to gain some flexibility. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-01-08pimd : Added the command to clear the pim bsr data.vdhingra
This command has been added in the context of PIM BSM functionality. This command will clear the data structs having bsr information. Co-authored-by: Sarita Patra <saritap@vmware.com> Signed-off-by: vishaldhingra <vdhingra@vmware.com>
2020-11-06pimd: Northbound implementation for rp commands.Sarita Patra
ip_pim_rp ip_pim_rp_prefix_list no_ip_pim_rp no_ip_pim_rp_prefix_list module: frr-pim-rp augment /frr-routing:routing/frr-routing:control-plane-protocols/frr-routing:control-plane-protocol/frr-pim:pim/frr-pim:address-family: +--rw rp +--rw static-rp +--rw rp-list* [rp-address] +--rw rp-address ietf-inet-types:ip-address +--rw (group-list-or-prefix-list)? +--:(group-list) | +--rw group-list* ip-multicast-group-address-prefix +--:(prefix-list) +--rw prefix-list? plist-ref Signed-off-by: Sarita Patra <saritap@vmware.com>
2019-05-14pimd: rp_new & rp_del split into 2 tier functions & implement rp_changesaravanank
pim_rp_new split into pim_rp_new_config and pim_rp_new. pim_rp_new_config is called by CLI. pim_rp_new will be called by pim_rp_new_config and bsm rp config. pim_rp_del is split into pim_rp_del_config and pim_rp_del pim_rp_del_config is called by CLI. pim_rp_del is called by pim_rp_del_config and bsm rp config Signed-off-by: Saravanan K <saravanank@vmware.com>
2019-05-14pimd: adding datastructure to accomodate to source of RP.saravanank
After the introduction of BSR Message processing, source of RP can be either static or BSR Message. Signed-off-by: Saravanan K <saravanank@vmware.com>
2019-04-02pimd: Limit lookup of neighbor since we know we have oneDonald Sharp
When a new pim neighbor comes up, we need to go through and mark nexthops that we have received from zebra for reachability tracking so we can refigure stuff. If we pass in the new neighbor we can limit the search to those nexthops out the interface that the new neighbor has come up. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-03-28pimd: Reduce RP checks a bitDonald Sharp
The pim_rp_check_is_my_ip_address function was checking to see if we were the actual RP as well as the pim_register code was doing the same thing. Remove the reduncancy a bit and just make this function check for that we are the actual receiver of this data. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-02-24pimd: update pim upstream structure when RP gets configuredSarita Patra
When a new RP is configured, find all the (*, G) upstream whose group belongs to the new RP and then update the upstream structure with the below fields. 1. De-register for the old RP. 2. Set the upstream address as new RP 3. Register for the new RP. 4. Update the upstream rpf information and kernel multicast forwarding cache(MFC), if the new RP is reachable. Signed-off-by: Sarita Patra <saritap@vmware.com>
2018-09-04bgpd, ospfd, pimd, zebra: Convert more use_json locations to boolDon Slice
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
2018-03-27*: use C99 standard fixed-width integer typesQuentin Young
The following types are nonstandard: - u_char - u_short - u_int - u_long - u_int8_t - u_int16_t - u_int32_t Replace them with the C99 standard types: - uint8_t - unsigned short - unsigned int - unsigned long - uint8_t - uint16_t - uint32_t Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-07-24pimd: Put 'struct pim_instance *' as the first function parameterDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Convert pim_cmd.c to use correct pim instanceDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Add code to write spaces or not before 'ip pim rp'Donald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Convert pim_rp.c to use 'struct pim_instance *'Donald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: pim_rp.c -> convert pimg to pimDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Refactor some functionsDonald Sharp
A bunch of functions had return values that were never checked for ( and not needed ) and opposite return values for proper calling function boolean logic. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Refactor code to be in better spotsDonald Sharp
1) Create pim_instance.[ch] to allow us to handle the instance information there 2) Refactor some pim_rpf_ and some pim_rp commands into appropriate files and appropriate includes. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-17*: reindentreindent-master-afterwhitespace / reindent
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-05-15*: make consistent & update GPLv2 file headersDavid Lamparter
The FSF's address changed, and we had a mixture of comment styles for the GPL file header. (The style with * at the beginning won out with 580 to 141 in existing files.) Note: I've intentionally left intact other "variations" of the copyright header, e.g. whether it says "Zebra", "Quagga", "FRR", or nothing. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-04-06pimd: Pim Nexthop Tracking support with ECMPChirag Shah
In this patch, PIM nexthop tracking uses locally populated nexthop cached list to determine ECMP based nexthop (w/ ECMP knob enabled), otherwise picks the first nexthop as RPF. Introduced '[no] ip pim ecmp' command to enable/disable PIM ECMP knob. By default, PIM ECMP is disabled. Intorudced '[no] ip pim ecmp rebalance' command to provide existing mcache entry to switch new path based on hash chosen path. Introduced, show command to display pim registered addresses and respective nexthops. Introuduce, show command to find nexthop and out interface for (S,G) or (RP,G). Re-Register an address with nexthop when Interface UP event received, to ensure the PIM nexthop cache is updated (being PIM enabled). During PIM neighbor UP, traverse all RPs and Upstreams nexthop and determine, if any of nexthop's IPv4 address changes/resolves due to neigbor UP event. Testing Done: Run various LHR, RP and FHR related cases to resolve RPF using nexthop cache with ECMP knob disabled, performed interface/PIM neighbor flap events. Executed pim-smoke with knob disabled. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-03-31pimd: Remove impossible conditions from testDonald Sharp
It is impossible for the list->cmp function to ever be handed NULL values as the arguments. Clean up this in the code. Additionally consolidate the exact same two functions into 1 function. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-03-16pimd: Nexthop tracking supportChirag Shah
Add pim Nexthop tracking feature 1st part where, specific RP or Source address (unicast address) register with Zebra. Once nexthop update received from Zebra for a given address, scan RP or upstream entries impacted by the change in nexthop. Reviewed By: CCR-5761, Donald Sharp <sharpd@cumulusnetworks.com> Testing Done: Tested with multiple RPs and multiple *,G entries at LHR. Add new Nexthop or remove one of the link towards RP and verify RP and upstream nexthop update. similar test done at RP with multiple S,G entries to reach source. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2016-12-21pim-anycast-rp: Add limited support for secondary addresses.anuradhak
Anycast requires that the lo interface be associated with multiple addresses. One is the anycast IP address (which is the same on all RPs participating in RP redundancy) and the second is the unique IP address that will be used as the router id by routing protocols. To accomodate that we maintain a list of secondary addresses per-pim iface and allow any of them to be the RP address. This lets the I_am_RP macro succeed on anycast RPs. Note that the support is limited i.e. we don't actually advertise a secondary list to the neighbors. This is assuming the anycast IP will never be used as a router id i.e. will never be an RPF neighbor. Sample output: ============== dell-s6000-04# sh ip pim interface lo Interface : lo State : up Address : 100.1.1.1 (primary) 100.1.1.2 100.1.1.3 100.1.2.1 >>>>>>> SNIP >>>>>>>>>>>>>>> dell-s6000-04# sh ip pim interface lo json { "lo":{ "name":"lo", "state":"up", "address":"100.1.1.1", "index":1, "lanDelayEnabled":true, "secondaryAddressList":[ "100.1.1.2", "100.1.1.3", "100.1.2.1" ], >>>>>>> SNIP >>>>>>>>>>>>>>> dell-s6000-04#sh ip pim rp-info RP address group/prefix-list OIF I am RP 100.1.2.1 224.0.0.0/4 lo yes dell-s6000-04# Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com> Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21PIM: json support for "show ip pim" commandsDaniel Walton
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-12865
2016-12-21PIM: prefix-list support for selecting RPDaniel Walton
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: CCR-5173 Ticket: CM-12819
2016-12-21pimd: Add "show ip pim rp-info" commandDonald Sharp
List the RP information we have configured. Fix bug where we were not properly initializing some code Ticket: CM-12617 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: multiple rp commandsDonald Sharp
Allow the user to specify multiple rp commands. 'ip pim rp A.B.C.D' -> translates to 'ip pim rp A.G.C.D 224.0.0.0/24' ip pim rp A.B.C.D A.B.C.D/M First is the rp, second is the group with mask. Groups and masks cannot be over each other except 224.0.0.0/24 which is the fallback if used. Ticket: CM-7860 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Refactor RP code and start the ability to handle rangesDonald Sharp
Refactor the qpim_rp into pim_rp.c so that the global data is protected. This will allow us to easily add the group ranges. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Infrastructure to forward packet down (*,G) treeDonald Sharp
When a register is received, forward the packet as appropriate. This is the infrastructure to make this happen. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Create raw socket for register packets to be forwarded.Donald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-05-25pimd: Convert the RP(G) code to return a struct pim_rpfDonald Sharp
This will facilitate sending packets to the right spot Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-05-25pimd: Add code to get RP(G)Donald Sharp
Add code to figure out who the RP is for group G. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-05-25pimd: Add RP check codeDonald Sharp
Add the ability for the node to determine if it is the RP or not. Currently this only allows static RP's. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-05-25pimd: Receive and transmit (*,G) to the RPDonald Sharp
Receive a (*,G) route and send it upstream to the RP. The RP at this time does not properly handle the route. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>