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: crash while finding primary address. #6027

Merged
merged 1 commit into from
Apr 10, 2020

Conversation

sarav511
Copy link
Contributor

RCA:
Trying to get primary address for the interface.
Unnumbered interface pick address from vrf device for non default.
While doing so it ends up in recursion without exit condition if vrf dev doesnt have any address.

Solution:
Break the recursion by checking if it is vrf device.

Signed-off-by: Saravanan K saravanank@vmware.com

@polychaeta polychaeta added the pim label Mar 18, 2020
Copy link

@polychaeta polychaeta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution to FRR!

Click for style suggestions

To apply these suggestions:

curl -s https://gist.githubusercontent.com/polychaeta/7cd602360f5e2e3b9856a7484cfdc163/raw/36680adce52577f4c7acaf01cb725cf1393a557f/cr_6027_1584527754.diff | git apply

diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c
index 6a2b28229..10a01c812 100644
--- a/pimd/pim_iface.c
+++ b/pimd/pim_iface.c
@@ -894,8 +894,8 @@ struct in_addr pim_find_primary_addr(struct interface *ifp)
 	 * So let's grab the loopbacks v4 address
 	 * and use that as the primary address
 	 */
-	if (!v4_addrs && v6_addrs && !if_is_loopback(ifp) &&
-	    !pim_if_is_vrf_device(ifp)) {
+	if (!v4_addrs && v6_addrs && !if_is_loopback(ifp)
+	    && !pim_if_is_vrf_device(ifp)) {
 		struct interface *lo_ifp;
 
 		// DBS - Come back and check here

If you are a new contributor to FRR, please see our contributing guidelines.

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: FAILED

See below for issues.
CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11255/

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.

Get source / Pull Request: Failed

Checkout code: Failed (click for details) Checkout code: No useful log found

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: FAILED

See below for issues.
CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11256/

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.

Get source / Pull Request: Failed

Checkout code: Failed (click for details) Checkout code: No useful log found

@LabN-CI
Copy link
Collaborator

LabN-CI commented Mar 18, 2020

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git merge/6027 2e2c698
Date 03/18/2020
Start 06:36:31
Finish 07:02:15
Run-Time 25:44
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2020-03-18-06:36:31.txt
Log autoscript-2020-03-18-06:37:26.log.bz2
Memory 486 494 418

For details, please contact louberger

@LabN-CI
Copy link
Collaborator

LabN-CI commented Mar 18, 2020

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git merge/6027 dc2a38a
Date 03/18/2020
Start 07:05:28
Finish 07:31:14
Run-Time 25:46
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2020-03-18-07:05:28.txt
Log autoscript-2020-03-18-07:06:24.log.bz2
Memory 492 493 418

For details, please contact louberger

@sarav511
Copy link
Contributor Author

CI: rerun

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: FAILED

See below for issues.
CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11258/

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.

Get source / Pull Request: Failed

Checkout code: Failed (click for details) Checkout code: No useful log found

@mwinter-osr
Copy link
Member

CI complains about issue with libyang as submodule. Not related to this PR. I'll investigate in a few hours. Please leave this PR as it is so I can debug this.

@mwinter-osr mwinter-osr self-assigned this Mar 18, 2020
@sarav511
Copy link
Contributor Author

CI: rerun

@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-FRRPULLREQ-11276/

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:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11276/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: pkg-js-tools-test-is-missing
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200318-00-gdc2a38af0-0 (missing) -> 7.4-dev-20200318-00-gdc2a38af0-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200318-00-gdc2a38af0-0 (missing) -> 7.4-dev-20200318-00-gdc2a38af0-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200318-00-gdc2a38af0-0 (missing) -> 7.4-dev-20200318-00-gdc2a38af0-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200318-00-gdc2a38af0-0 (missing) -> 7.4-dev-20200318-00-gdc2a38af0-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200318-00-gdc2a38af0-0 (missing) -> 7.4-dev-20200318-00-gdc2a38af0-0~deb10u1

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
RCA:
Trying to get primary address for the interface.
Unnumbered interface pick address from vrf device for non default.
While doing so it ends up in recursion without exit condition if vrf dev doesnt have any address.

Solution:
Break the recursion by checking if it is vrf device.

Signed-off-by: Saravanan K <saravanank@vmware.com>
pimd/pim_iface.c Show resolved Hide resolved
@LabN-CI
Copy link
Collaborator

LabN-CI commented Mar 19, 2020

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/6027 2430f05
Date 03/19/2020
Start 11:42:30
Finish 12:08:29
Run-Time 25:59
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2020-03-19-11:42:30.txt
Log autoscript-2020-03-19-11:43:28.log.bz2
Memory 473 490 418

For details, please contact louberger

@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-FRRPULLREQ-11298/

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:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11298/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: pkg-js-tools-test-is-missing
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200319-00-g2430f0579-0 (missing) -> 7.4-dev-20200319-00-g2430f0579-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200319-00-g2430f0579-0 (missing) -> 7.4-dev-20200319-00-g2430f0579-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200319-00-g2430f0579-0 (missing) -> 7.4-dev-20200319-00-g2430f0579-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200319-00-g2430f0579-0 (missing) -> 7.4-dev-20200319-00-g2430f0579-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200319-00-g2430f0579-0 (missing) -> 7.4-dev-20200319-00-g2430f0579-0~deb10u1

@qlyoung
Copy link
Member

qlyoung commented Apr 10, 2020

@donaldsharp looks like your comment has been addressed, want to unblock & merge?

@donaldsharp donaldsharp merged commit eb728e0 into FRRouting:master Apr 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants