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

ospf6d: Fix flooding of old copies of self-originated LSAs #7202

Merged
merged 1 commit into from
Oct 6, 2020

Conversation

gromit1811
Copy link
Contributor

Note: This seems to fix my problem (at least the topotest in #7168 no longer fails), but I'm not sure whether it breaks other things (like the reboot problem 7624953 was trying to fix) as I'm not very familiar with the code in question. Needs proper review by an ospf6d wizard before merging.

When receiving old copies (e.g. originated before the local ospf6d was
restarted) of supposedly self-originated LSAs which we previously tried to
flush from the network (by setting them to MaxAge), neither flood them nor
add them to our LSDB. Instead, keep the MaxAge version until we actually
(re-)originate them.

Possible fix for #7030. Testcase in #7168
(tests/topotests/ospf6-dr-no-netlsa-bug7030).

Signed-off-by: Martin Buck mb-tmp-tvguho.pbz@gromit.dyndns.org

When receiving old copies (e.g. originated before the local ospf6d was
restarted) of supposedly self-originated LSAs which we previously tried to
flush from the network (by setting them to MaxAge), neither flood them nor
add them to our LSDB. Instead, keep the MaxAge version until we actually
(re-)originate them.

Possible fix for FRRouting#7030. Testcase in FRRouting#7168
(tests/topotests/ospf6-dr-no-netlsa-bug7030).

Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
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/00815f70f33b65e0563c8a6672aed368/raw/0e3f9bcfefb20662338eccb364a8f902d03c6d42/cr_7202_1601414772.diff | git apply

diff --git a/ospf6d/ospf6_flood.c b/ospf6d/ospf6_flood.c
index 56aac0f21..d2423556d 100644
--- a/ospf6d/ospf6_flood.c
+++ b/ospf6d/ospf6_flood.c
@@ -1006,7 +1006,8 @@ void ospf6_receive_lsa(struct ospf6_neighbor *from,
 					if (is_debug)
 						zlog_debug(
 							"%s: Current copy of LSA %s is MAXAGE, but new has recent age, flooding/installing.",
-							old->name, __PRETTY_FUNCTION__);
+							old->name,
+							__PRETTY_FUNCTION__);
 					ospf6_lsa_purge(old);
 					ospf6_flood(from, new);
 					ospf6_install_lsa(new);
@@ -1014,7 +1015,8 @@ void ospf6_receive_lsa(struct ospf6_neighbor *from,
 					if (is_debug)
 						zlog_debug(
 							"%s: Current copy of self-originated LSA %s is MAXAGE, but new has recent age, ignoring new.",
-							old->name, __PRETTY_FUNCTION__);
+							old->name,
+							__PRETTY_FUNCTION__);
 					ospf6_lsa_delete(new);
 				}
 				return;

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

After making changes, you do not need to create a new PR. You should perform an amend or interactive rebase followed by a force push.

@LabN-CI
Copy link
Collaborator

LabN-CI commented Sep 29, 2020

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/7202 4c63a76
Date 09/29/2020
Start 17:30:33
Finish 17:56:41
Run-Time 26:08
Total 1818
Pass 1818
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2020-09-29-17:30:33.txt
Log autoscript-2020-09-29-17:31:34.log.bz2
Memory 501 492 424

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-14434/

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 ospf6_flood.c | 4 issues
===============================================
< WARNING: line over 80 characters
< #1009: FILE: /tmp/f1-4894/ospf6_flood.c:1009:
< WARNING: line over 80 characters
< #1017: FILE: /tmp/f1-4894/ospf6_flood.c:1017:

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-14434/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.4.1 (current is 4.3.0)
W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.4.1 (current is 4.3.0)
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.6-dev-20200929-00-g4c63a76a6-0 (missing) -> 7.6-dev-20200929-00-g4c63a76a6-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.6-dev-20200929-00-g4c63a76a6-0 (missing) -> 7.6-dev-20200929-00-g4c63a76a6-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.6-dev-20200929-00-g4c63a76a6-0 (missing) -> 7.6-dev-20200929-00-g4c63a76a6-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.6-dev-20200929-00-g4c63a76a6-0 (missing) -> 7.6-dev-20200929-00-g4c63a76a6-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.6-dev-20200929-00-g4c63a76a6-0 (missing) -> 7.6-dev-20200929-00-g4c63a76a6-0~deb10u1

Copy link
Member

@pguibert6WIND pguibert6WIND left a comment

Choose a reason for hiding this comment

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

a second pair of eyes would be nice to have; @odd22 , do you have some knowledge on ospfv3 ?

@odd22
Copy link
Member

odd22 commented Sep 30, 2020

@pguibert6WIND I'm not so familiar with ospfv3, but after reading the corresponding issue #7030 and the proposed solution, it seems that the fix is OK for me and seems not introduce any side effect. May be @chiragshah6 could have a look to this PR as suggest by @gromit1811

Copy link
Member

@odd22 odd22 left a comment

Choose a reason for hiding this comment

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

LGTM

@dslicenc
Copy link
Member

dslicenc commented Oct 5, 2020

Tested this fix by running an internal test that occasionally failed with this problem. Completed a loop of 400 test iterations over the weekend and it looks good.

@odd22 odd22 merged commit 24d7ccf into FRRouting:master Oct 6, 2020
@gromit1811 gromit1811 deleted the proposed_fix_7030 branch January 28, 2022 22:30
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