-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Bgp ecommlist count #18159
base: master
Are you sure you want to change the base?
Bgp ecommlist count #18159
Conversation
Add a mechanism in route-map to filter out route-map which have a list of extended communities greater than the given number. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
It should be possible to configure the community-limit count to 0. Fixes: f19b866 ("bgpd: add 'match community-count' command to restrict comm count") Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
The exact-match and the any options are missing for the extended communities. Add missing options that are present on the match operations for communities and large-communities. > route-map rmap permit 1 > match extcommunity 1 > exit > ! > route-map rmap permit 2 > match extcommunity 2 any > exit > ! > route-map rmap permit 3 > match extcommunity 3 exact-match > exit Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Add a test suite that checks that it is possible to filter out BGP updates based on the extcommunity-list match operation of the route-map. Check also the extcommunity-limit option. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
8d56860
to
810deaf
Compare
uint32_t i; | ||
|
||
for (i = 0; i < ecom->size; i++) { | ||
ptr = ecom->val + (i * ECOMMUNITY_SIZE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should handle IPv6-specific extended communities also. Thus ecom->unit_size should be used instead.
@@ -1168,8 +1168,10 @@ char *ecommunity_ecom2str(struct ecommunity *ecom, int format, int filter) | |||
bool unk_ecom = false; | |||
memset(encbuf, 0x00, sizeof(encbuf)); | |||
|
|||
if (number != -1 && (uint32_t)number != i) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does it mean (number)?
|
||
path = (struct bgp_path_info *)object; | ||
|
||
piextcomm = bgp_attr_get_ecommunity(path->attr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please include also IPv6-address specific extended communities...
@@ -2907,7 +2907,13 @@ Extended Community Lists | |||
Note that all extended community lists shares a single name space, so it's | |||
not necessary to specify their type when creating or destroying them. | |||
|
|||
.. clicmd:: show bgp extcommunity-list [NAME detail] | |||
.. clicmd:: match community-limit (0-65535) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this duplicate? We already have this documented.
Add extensions in route-map for handling extended community-list in match operations: