mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 02:30:52 +00:00
bgpd: Standard large-communities CLI does not return error when it's configured with reg-ex.
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
This commit is contained in:
parent
ab0ef7a392
commit
6aee38481a
@ -439,7 +439,8 @@ struct lcommunity *lcommunity_str2com(const char *str)
|
|||||||
enum lcommunity_token token = lcommunity_token_unknown;
|
enum lcommunity_token token = lcommunity_token_unknown;
|
||||||
struct lcommunity_val lval;
|
struct lcommunity_val lval;
|
||||||
|
|
||||||
while ((str = lcommunity_gettoken(str, &lval, &token))) {
|
do {
|
||||||
|
str = lcommunity_gettoken(str, &lval, &token);
|
||||||
switch (token) {
|
switch (token) {
|
||||||
case lcommunity_token_val:
|
case lcommunity_token_val:
|
||||||
if (lcom == NULL)
|
if (lcom == NULL)
|
||||||
@ -452,7 +453,8 @@ struct lcommunity *lcommunity_str2com(const char *str)
|
|||||||
lcommunity_free(&lcom);
|
lcommunity_free(&lcom);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
} while (str);
|
||||||
|
|
||||||
return lcom;
|
return lcom;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user