Merge pull request #6669 from ton31337/fix/large-community-list-set_sequence

bgpd: Actually find the sequence number for large-community-list
This commit is contained in:
Donald Sharp 2020-07-03 07:47:28 -04:00 committed by GitHub
commit d0e2053724
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 4 deletions

View File

@ -17332,8 +17332,7 @@ static int lcommunity_list_set_vty(struct vty *vty, int argc,
char *cl_name;
char *seq = NULL;
argv_find(argv, argc, "(1-4294967295)", &idx);
if (idx)
if (argv_find(argv, argc, "(1-4294967295)", &idx))
seq = argv[idx]->arg;
idx = 0;
@ -17382,8 +17381,7 @@ static int lcommunity_list_unset_vty(struct vty *vty, int argc,
int idx = 0;
char *seq = NULL;
argv_find(argv, argc, "(1-4294967295)", &idx);
if (idx)
if (argv_find(argv, argc, "(1-4294967295)", &idx))
seq = argv[idx]->arg;
idx = 0;

View File

@ -0,0 +1,16 @@
@@
identifier idx;
identifier argv;
identifier argc;
expression e1;
expression e2;
@@
- argv_find(argv, argc, e1, &idx);
if (
- idx
+ argv_find(argv, argc, e1, &idx)
)
{
e2;
}