The CLI to configure the standard format large-communities attribute
accepts regular expressions as well.
For ex., the below configuration is accepted.
"bgp large-community-list standard TEST permit 1:1 100:*"
The code to parse the large-communities does identify the configuration
as invalid however, error returned isn't processed.
The code has to be modified to handle the error.
Signed-off-by: NaveenThanikachalam nthanikachal@vmware.com
enum lcommunity_token token = lcommunity_token_unknown;
struct lcommunity_val lval;
- while ((str = lcommunity_gettoken(str, &lval, &token))) {
+ do {
+ str = lcommunity_gettoken(str, &lval, &token);
switch (token) {
case lcommunity_token_val:
if (lcom == NULL)
lcommunity_free(&lcom);
return NULL;
}
- }
+ } while (str);
+
return lcom;
}