diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2023-01-03 17:01:54 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2023-01-03 17:01:54 +0100 |
commit | b28431e557c4f63923476094a919a0630001275e (patch) | |
tree | 0be1f9c6c1283fb6c4c258dd47c75575873de3ab /proto | |
parent | d3f50ede127df338f575e188566035b2a46cf6c6 (diff) |
Nest: Fix leaking internal attributes in RIP and Babel
During backporting attribute changes from 3.0-branch, some internal
attributes (RIP iface and Babel seqno) leaked to 'show route all' output.
Allow protocols to hide specific attributes with GA_HIDDEN value.
Thanks to Nigel Kukard for the bugreport.
Diffstat (limited to 'proto')
-rw-r--r-- | proto/babel/babel.c | 6 | ||||
-rw-r--r-- | proto/rip/rip.c | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/proto/babel/babel.c b/proto/babel/babel.c index 86cec63b..ecde07b3 100644 --- a/proto/babel/babel.c +++ b/proto/babel/babel.c @@ -2081,9 +2081,6 @@ babel_get_attr(const eattr *a, byte *buf, int buflen UNUSED) { switch (a->id) { - case EA_BABEL_SEQNO: - return GA_FULL; - case EA_BABEL_METRIC: bsprintf(buf, "metric: %d", a->u.data); return GA_FULL; @@ -2096,6 +2093,9 @@ babel_get_attr(const eattr *a, byte *buf, int buflen UNUSED) return GA_FULL; } + case EA_BABEL_SEQNO: + return GA_HIDDEN; + default: return GA_UNKNOWN; } diff --git a/proto/rip/rip.c b/proto/rip/rip.c index b0b5b8a1..5f3161ee 100644 --- a/proto/rip/rip.c +++ b/proto/rip/rip.c @@ -1233,6 +1233,9 @@ rip_get_attr(const eattr *a, byte *buf, int buflen UNUSED) bsprintf(buf, "tag: %04x", a->u.data); return GA_FULL; + case EA_RIP_FROM: + return GA_HIDDEN; + default: return GA_UNKNOWN; } |