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

zebra: stop sending invalid nexthops to clients #4165

Merged
merged 1 commit into from
Apr 19, 2019

Conversation

dslicenc
Copy link
Member

Found that zebra_rnh_apply_nht_rmap would set the
NEXTHOP_FLAG_ACTIVE if not blocked by the route-map, even
if the flag was not active prior to the check. This fix
changes the flag used to denote the nexthop is filtered so
that proper active state can be retained. Additionally,
found two cases where we would send invalid nexthops via
send_client, which would also cause this crash. All three
fixed in this commit.

Signed-off-by: Don Slice dslice@cumulusnetworks.com

@mjstapp mjstapp self-requested a review April 18, 2019 17:46
@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-7298/

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.


CLANG Static Analyzer Summary

  • Github Pull Request 4165, comparing to Git base SHA 328b7ab

No Changes in Static Analysis warnings compared to base

12 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7298/artifact/shared/static_analysis/index.html

Copy link
Contributor

@mjstapp mjstapp left a comment

Choose a reason for hiding this comment

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

Good fix - just had one question/todo about the nexthop flags values, where another PR is also making changes.

lib/nexthop.h Outdated
@@ -83,6 +83,7 @@ struct nexthop {
#define NEXTHOP_FLAG_MATCHED (1 << 4) /* Already matched vs a nexthop */
#define NEXTHOP_FLAG_FILTERED (1 << 5) /* rmap filtered, used by static only */
#define NEXTHOP_FLAG_DUPLICATE (1 << 6) /* nexthop duplicates another active one */
#define NEXTHOP_FLAG_RNH_FILTERED (1 << 7) /* rmap filtered, used by rnh */
Copy link
Contributor

Choose a reason for hiding this comment

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

Donald's PR #4154 is going to touch these flags values too - will you re-sync after the merge?

Copy link
Member

Choose a reason for hiding this comment

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

Yes the looser will have to :)

@LabN-CI
Copy link
Collaborator

LabN-CI commented Apr 18, 2019

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/4165 9d6d1e7
Date 04/18/2019
Start 16:39:05
Finish 17:03:04
Run-Time 23:59
Total 1813
Pass 1813
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2019-04-18-16:39:05.txt
Log autoscript-2019-04-18-16:39:56.log.bz2
Memory 440 447 375

For details, please contact louberger

Found that zebra_rnh_apply_nht_rmap would set the
NEXTHOP_FLAG_ACTIVE if not blocked by the route-map, even
if the flag was not active prior to the check.  This fix
changes the flag used to denote the nexthop is filtered so
that proper active state can be retained. Additionally,
found two cases where we would send invalid nexthops via
send_client, which would also cause this crash.  All three
fixed in this commit.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
@dslicenc dslicenc force-pushed the rnh-invalid-nexthops branch from 9d6d1e7 to e47c4d3 Compare April 19, 2019 16:59
@LabN-CI
Copy link
Collaborator

LabN-CI commented Apr 19, 2019

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/4165 e47c4d3
Date 04/19/2019
Start 13:00:20
Finish 13:24:06
Run-Time 23:46
Total 1816
Pass 1816
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2019-04-19-13:00:20.txt
Log autoscript-2019-04-19-13:01:04.log.bz2
Memory 446 452 374

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

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.


CLANG Static Analyzer Summary

  • Github Pull Request 4165, comparing to Git base SHA fd3938a
  • Base image data for Git fd3938a does not exist - compare skipped

12 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7302/artifact/shared/static_analysis/index.html

@mjstapp mjstapp merged commit c02a40c into FRRouting:master Apr 19, 2019
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.

6 participants