Filtering this attribute via `path-attribute discard/treat-as-widthraw`.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
uint8_t type = args->type;
uint8_t flag = args->flags;
+ if (peer->discard_attrs[args->type] || peer->withdraw_attrs[args->type])
+ goto encap_ignore;
+
if (!CHECK_FLAG(flag, BGP_ATTR_FLAG_TRANS)
|| !CHECK_FLAG(flag, BGP_ATTR_FLAG_OPTIONAL)) {
zlog_err("Tunnel Encap attribute flag isn't optional and transitive %d",
args->total);
}
- return 0;
+ return BGP_ATTR_PARSE_PROCEED;
+
+encap_ignore:
+ stream_forward_getp(peer->curr, length);
+
+ return bgp_attr_ignore(peer, type);
}