diff options
author | Naveen Thanikachalam <nthanikachal@vmware.com> | 2019-08-11 09:29:32 +0200 |
---|---|---|
committer | Naveen Thanikachalam <nthanikachal@vmware.com> | 2019-08-11 09:29:32 +0200 |
commit | 6aee38481a4531f8997831a24474f0a75eceb02b (patch) | |
tree | 9ac527737f212fd2d2ef39c24f21cc56674ab3b9 /bgpd | |
parent | Merge pull request #4803 from ddutt/master (diff) | |
download | frr-6aee38481a4531f8997831a24474f0a75eceb02b.tar.xz frr-6aee38481a4531f8997831a24474f0a75eceb02b.zip |
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
Diffstat (limited to 'bgpd')
-rw-r--r-- | bgpd/bgp_lcommunity.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bgpd/bgp_lcommunity.c b/bgpd/bgp_lcommunity.c index 2b09a2954..aeb290719 100644 --- a/bgpd/bgp_lcommunity.c +++ b/bgpd/bgp_lcommunity.c @@ -439,7 +439,8 @@ struct lcommunity *lcommunity_str2com(const char *str) 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) @@ -452,7 +453,8 @@ struct lcommunity *lcommunity_str2com(const char *str) lcommunity_free(&lcom); return NULL; } - } + } while (str); + return lcom; } |