Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pimd,pim6d: Set RP to true if the address matches, ignore prefix-length #11593

Merged
merged 1 commit into from
Jul 13, 2022

Conversation

mobash-rasool
Copy link
Contributor

@mobash-rasool mobash-rasool commented Jul 12, 2022

I would like to discuss on this before moving further. Have raised it temporarily to ease the discussion.

Either

  1. We can fix both PIMv4 and PIMv6 by only matching the configured RP address with the interface address and not the prefix-length since it does not matter
    OR
    2. Make this fix only specific to PIMv6 as done in this PR.

The API pim_rp_check_interface_addrs checks if the RP address matches
with the primary address then it returns true.
In case of PIMv4 this condition is true, therefore the router becomes RP.
But in case of PIMv6, this condition does not pass because primary address
for PIMv6 is link-local address.

Also PIMv4 allows secondary addresses to be used as RP
if it is a host route in case primary does not match.
This behaviour is same for PIMv6.

Fixing it by only checking the configured RP address with the interface
address and ignoring the prefix length since it does not matter.

Fixes: #11335

Signed-off-by: Mobashshera Rasool mrasool@vmware.com

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Jul 12, 2022

Continuous Integration Result: SUCCESSFUL

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-6415/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Checkout code: Successful with additional warnings
Report for pim_rp.c | 2 issues
===============================================
< WARNING: Block comments use a trailing */ on a separate line
< #360: FILE: /tmp/f1-30766/pim_rp.c:360:

@eqvinox
Copy link
Contributor

eqvinox commented Jul 12, 2022

Fixing it by only checking the configured RP address with the interface address and ignoring the prefix length since it does not matter.

Only the address should be checked for both IPv4 & IPv6, the prefix length should always have been ignored. It's a plain bug that the prefix length was ever checked.

Can you change it to just use pim_addr_from_prefix(&sec_addr->addr) and pim_addr_cmp please?

@frrbot frrbot bot added the pim label Jul 12, 2022
@mobash-rasool mobash-rasool changed the title <Need Discussion>pim6d: Set RP to true if the address matches, ignore prefix-length pimd,pim6d: Set RP to true if the address matches, ignore prefix-length Jul 12, 2022
@mobash-rasool
Copy link
Contributor Author

Fixing it by only checking the configured RP address with the interface address and ignoring the prefix length since it does not matter.

Only the address should be checked for both IPv4 & IPv6, the prefix length should always have been ignored. It's a plain bug that the prefix length was ever checked.

Can you change it to just use pim_addr_from_prefix(&sec_addr->addr) and pim_addr_cmp please?

Yeah I too feel the same way. Thanks @eqvinox for the inputs.

@mobash-rasool mobash-rasool marked this pull request as ready for review July 12, 2022 11:42
@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Jul 12, 2022

Continuous Integration Result: SUCCESSFUL

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-6420/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Checkout code: Successful with additional warnings
Report for pim_rp.c | 2 issues
===============================================
< WARNING: Block comments use a trailing */ on a separate line
< #357: FILE: /tmp/f1-24733/pim_rp.c:357:

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Jul 12, 2022

Continuous Integration Result: SUCCESSFUL

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-6421/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Checkout code: Successful with additional warnings
Report for pim_rp.c | 2 issues
===============================================
< WARNING: Block comments use a trailing */ on a separate line
< #354: FILE: /tmp/f1-674/pim_rp.c:354:

@eqvinox eqvinox self-requested a review July 12, 2022 15:39
The API pim_rp_check_interface_addrs checks if the RP address matches
with the primary address then it returns true.
In case of PIMv4 this condition is true, therefore the router becomes RP.
But in case of PIMv6, this condition does not pass because primary address
for PIMv6 is link-local address.

Also PIMv4 allows secondary addresses to be used as RP
if it is a host route in case primary does not match.

Fixing it by only checking the configured
RP address with the interface address and ignoring the prefix
length since it does not matter.

Fixes: FRRouting#11335

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
@mobash-rasool
Copy link
Contributor Author

Rebased on top of master.

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-6450/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Checkout code: Successful with additional warnings
Report for pim_rp.c | 2 issues
===============================================
< WARNING: Block comments use a trailing */ on a separate line
< #354: FILE: /tmp/f1-18440/pim_rp.c:354:

@eqvinox eqvinox merged commit 69de2a1 into FRRouting:master Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PIM6d- When upstream interface configured as RP , (*,G) join not received on RP node
3 participants