summaryrefslogtreecommitdiff
path: root/pimd/pim_register.c
AgeCommit message (Collapse)Author
2024-05-10pimd: fix null register before aging out reg-stopDavid Lamparter
It looks like the code was trying to do this with the null_register parameter on pim_upstream_start_register_stop_timer(), but that didn't quite work right. Restructure a bit to get it right. Signed-off-by: David Lamparter <equinox@opensourcerouting.org> (cherry picked from commit dce38da8061a7ac62c690dbb8a89cae7f9a758d6) # Conflicts: # pimd/pim_upstream.c
2022-11-23pimd: consistently ignore prefix list mask lenDavid Lamparter
... the prefix length wasn't ignored as expected. Both S and G are always /32. But expecting "le 32" in prefix-list config is unexpected & counterintuitive. Signed-off-by: David Lamparter <equinox@opensourcerouting.org> (cherry picked from commit ab2f9e89b44642af568c3542e1f2b14378fb5ec2)
2022-08-04pimd, pim6d: Send register msg via register socketMobashshera Rasool
The problem here is when the same node is FHR as well as RP, then the node keeps on sending the register packet. Register-stop is not sent as well. This problem has occurred because the RP is the same node and there is no socket created on loopback interface, so the packet is never send out and never received back on the same node, so register recv could not be processed on the node and hence no register-stop is sent. Since register packets are unicast packets, its better to handle the send of register packet via a separate register socket. This fixes the problem mentioned above as well. Fixes: #11331 Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-07-06pimd: Handle rpf_addr in register send/recvsarita patra
Signed-off-by: sarita patra <saritap@vmware.com>
2022-06-21pim6d: Send register msg with IPv6 global addressMobashshera Rasool
Use global unicast IPv6 address to send the register packet. Fixes: #11235 Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-06-07pimd: Handle receive of (*,G) register stop with src addr as 0Mobashshera Rasool
PIM conformance test case 11.12 sends a register stop msg with source address as 0. This should trigger a register stop for all the upstreams. It is not happening as such because we are not considering 0.0.0.0 source address for starg_handling. Fixed it. Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-05-13Merge pull request #10958 from patrasar/pim_passiveJafar Al-Gharaibeh
pimd: introduce ip pim passive command
2022-05-12pimd: Disable receiving register-stop on passive interfacesarita patra
Signed-off-by: sarita patra <saritap@vmware.com>
2022-05-12pimd: Disable receiving register msg on passive interfacesarita patra
Signed-off-by: sarita patra <saritap@vmware.com>
2022-05-12pimd: Handling reg and reg_stop send statistics for passive interfacesarita patra
Increment pim_ifstat_reg_stop_send & pim_ifstat_reg_send when interface is passive disabled. Signed-off-by: sarita patra <saritap@vmware.com>
2022-05-11*: Properly use memset() when zeroingDonatas Abraitis
Wrong: memset(&a, 0, sizeof(struct ...)); Good: memset(&a, 0, sizeof(a)); Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-29pim6d: Register message send handlingplsaranya
Register and Null register send handling In IPv6 PIM Null Register message if dummy PIM Header is included as data, this dummy PIM header checksum needs to be valuated Signed-off-by: plsaranya <Saranya_Panjarathina@dell.com>
2022-03-28pim6d: include IPv6 pseudoheader in TX checksumsDavid Lamparter
Lots of passing src/dst around, but it is what it is. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-03-14pimd: A wrong address family means the register-stop receive failsDonald Sharp
The current code in pim_register_stop_recv would never fail as that the code was always returning 0 in all cases, but if the code parses an incorrect afi then it has failed and should return as much Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-03-14pimd: FRR-PIM sending register packet even after receiving (*,G) register stopsaravanank
RCA: (*,G) register stop was not handled Fix: Loop through all (S,G) under the (*,G) and apply reg stop Authored-by- Saravanan K <saravanank@vmware.com> Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-03-10pim6d: Replace pim_br_unknown with PIMADDR_ANYMobashshera Rasool
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-03-10pim6d: Handle B bit changes for IPv6Mobashshera Rasool
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-03-10pim6d: Parsing pimv6 register msgMobashshera Rasool
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-02-14pim6d: IPv6-adjust various pim_sgaddr usesDavid Lamparter
Since `pim_sgaddr` is `pim_addr` now, that causes a whole lot of fallout anywhere S,G pairs are handled. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-02-14pim6d: more TLV parse/encode IPv6 preparationDavid Lamparter
More proliferation of pim_addr to work towards IPV6. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-01-17pimd: fix `%pI4` that needs to be `%pPA`David Lamparter
There's only 2 locations of this. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-01-17pimd: move, rename and deploy pim_addr_is_any()David Lamparter
Replaces comparison against INADDR_ANY, so we can do IPv6 too. (Renamed from "pim_is_addr_any" for "pim_addr_*" naming pattern, and type fixed to bool.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-01-17pimd: remove pim_str_sg_dump()David Lamparter
... and replace with `%pSG` printfrr specifier. This actually used a static buffer in the formatting function, so subsequent formatting would overwrite earlier uses. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-01-12pimd: `prefix_sg` => `pim_sgaddr`David Lamparter
Mostly just 2 sed calls: - `sed -e 's%struct prefix_sg%pim_sgaddr%g'` - `sed -e 's%memset(&sg, 0, sizeof(pim_sgaddr));%memset(\&sg, 0, sizeof(sg));%g'` Plus a bunch of fixing whatever that broke. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-01-12pimd: move `%pSG4` to `%pPSG4`David Lamparter
Since this is only used in very few places, moving it out of the way is reasonable. (`%pSG` will be pim_sgaddr) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-11-17*: clean up ifp-by-local-address function(s)David Lamparter
Most users of if_lookup_address_exact only cared about whether the address is any local address. Split that off into a separate function. For the users that actually need the ifp - which I'm about to add a few of - change it to prefer returning interfaces that are UP. (Function name changed due to slight change in behavior re. UP state, to avoid possible bugs from this change.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-11-05pimd: remove usage of inet_ntopDonald Sharp
We should not be using inet_ntop. and should be using the appropriate %pI4 instead. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-10-26pimd: modifications in PIM joinsSai Gomathi
Problem : ======= (*,G) created on transit node where same groups are defined as SSM At present FRR has SSM checks for IGMP report, but SSM check is missing for PIM join. Fix : === When an interface receives the PIM (*,G)join with G as SSM group, then PIMd supposed to discard that join. There is no need to maintain PIM state for this group. Signed-off-by: Sai Gomathi <nsaigomathi@vmware.com>
2021-07-01*: Convert numeric 32 into IPV4_MAX_BITLEN for prefixlenDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-07-01*: Replace IPV4_MAX_PREFIXLEN to IPV4_MAX_BITLENDonatas Abraitis
Just drop IPV4_MAX_PREFIXLEN at all, no need keeping both. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-10-22pimd: replace inet_ntoaMark Stapp
Replace all use of inet_ntoa, using %pI4 or inet_ntoa instead Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-01Merge pull request #6054 from sarav511/dr2ndrDonald Sharp
pimd: When DR becomes non DR, Still sends register packets to RP
2020-03-24*: remove line breaks from log messagesDavid Lamparter
Line break at the end of the message is implicit for zlog_* and flog_*, don't put it in the string. Mid-message line breaks are currently unsupported. (LF is "end of message" in syslog.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2020-03-19pimd: When DR becomes non DR, couldreg state events not handled.saravanank
RCA: Upstreams which are in register state other than noinfo, doesnt remove register tunnel from oif after it becomes nonDR Fix: scan upstreams with iif as the old dr and check if couldReg becomes false. If couldreg becomes false from true, remove regiface and stop reg timer. Do not disturb the entry. Later the entry shall be removed by kat expiry. Signed-off-by: Saravanan K <saravanank@vmware.com>
2020-03-06pimd: Add `ip pim register-accept-list PLIST` commandDonald Sharp
When pim receives a register packet, we will apply the received source to the prefix list. If accepted normal processing continues. If denied we will send a register stop message to the source. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-06pimd: Add a pim pointer to register_recvDonald Sharp
We already use the pim pointer a bunch off of pim_ifp->pim just add another pim variable to allow us to shorten code a bit. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-05*: Replace __PRETTY_FUNCTION__/__FUNCTION__ to __func__Donatas Abraitis
Just keep the code cool. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-03-03pimd: Update pim register stop statisticsSarita Patra
Issue: REGISTER-STOP Rx is always displaying 0. Root-cause: pim_ifstat_reg_stop_recv is not getting incremented when register stop message is received. Fix: Increment pim_ifstat_reg_stop_recv on receiving of pim register stop packet. Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-02-13*: Remove break after returnDonatas Abraitis
Just a deadcode. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2019-11-15pimd: re-name SwitchToSptDesired to SwitchToSptDesiredonRpAnuradha Karuppiah
Criteria for switching to SPT is different on RP and LHR. Re-name the functions to make that apparent. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-11-15pimd: set mfcc_parent at the time of MFCC programmingAnuradha Karuppiah
mfcc_parent for an (S, G) entry was being updated on any upstream RPF change. With the change to use RPT for (S,G) in some cases we can no longer do that. Instead the upstream entry's RPF neigbor is managed separately form the channel_oil's mfcc_parent i.e. via NHT. And the mfcc_parent is evaluated at the time of mroute programming. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-11-15pimd: update add_oif and del_oif debugs to print callerAnuradha Karuppiah
These logs were printing file name which has little value (is always pim_oil.c). Instead print the caller. add_oif/del_oif are being called directly from one too many. Instead OIF setup needs to be consolidated via the PIM state machine. These debugs are expected to help in understanding what needs to be cleaned up. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-11-12pimd: `debug igmp trace` turns on non igmp debugsDonald Sharp
When you turn on `debug igmp trace` we are seeing a bunch of debugs associated with pim processing. This is because we were using PIM_DEBUG_TRACE which is both `debug igmp trace` and `debug pim trace` when tracing igmp code it would be nice to only see igmp work. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-07-01*: s/TRUE/true/, s/FALSE/false/Quentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-05-14pimd: PIM Msg header includes N bit as defined by RFCsaravanank
This commit includes parsing of Nbit and contructing pim hdr with Nbit Adding Nbit to PIm hdr structure Adding Scope zone bit and Bidir bit to Encoded IPv4 Group Address Signed-off-by: Saravanan K <saravanank@vmware.com>
2019-04-20pimd: use VTEP-PIP as pim-register's ip header SIPAnuradha Karuppiah
The unique physical IP is used as the SIP in the ip header to ensure that pim-register-stop makes it back to the right MLAG switch. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-04-20pimd: register local VTEP-IP for each BUM MDT via NULL registersAnuradha Karuppiah
For multicast vxlan tunnels we register the local VTEP-IP independent of the prescence of BUM traffic i.e. we prime the pump. This is acheived via NULL registers. VxLAN orig entries with upstream in a PIM_REG_JOIN state are linked to a work list for periodic NULL register transmission. Once the SPT setup is complete the upstream-entry moves to a PIM_REG_PRUNE state and is remved from the VxLAN work list. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-04-20pimd: extern pim_null_register_sendAnuradha Karuppiah
pim_vxlan will use this for registering the local-VTEP-IP wth the RP independent of the presence of BUM traffic. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-03-28pimd: Cleanup extra paranthesis around S,G printoutDonald Sharp
When we are displaying S,G string data we already auto display the string as (S,G) no need to have ((S,G)). Cleanup some that were found during log look through. 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>