@@ -5866,13 +5866,6 @@ static int parse_rtlist(struct bgp *bgp, struct vty *vty, int argc,
5866
5866
* the ecommunity parser.
5867
5867
*/
5868
5868
if ((argv [i ]-> arg )[0 ] == '*' ) {
5869
- if (!is_import ) {
5870
- vty_out (vty ,
5871
- "%% Wildcard '*' only applicable for import\n" );
5872
- ret = CMD_WARNING ;
5873
- continue ;
5874
- }
5875
-
5876
5869
(argv [i ]-> arg )[0 ] = '0' ;
5877
5870
is_wildcard = true;
5878
5871
}
@@ -5950,6 +5943,16 @@ DEFUN (bgp_evpn_vrf_rt,
5950
5943
return CMD_WARNING_CONFIG_FAILED ;
5951
5944
}
5952
5945
5946
+ if (rt_type != RT_TYPE_IMPORT ) {
5947
+ for (int i = 2 ; i < argc ; i ++ ) {
5948
+ if ((argv [i ]-> arg )[0 ] == '*' ) {
5949
+ vty_out (vty ,
5950
+ "%% Wildcard '*' only applicable for import\n" );
5951
+ return CMD_WARNING_CONFIG_FAILED ;
5952
+ }
5953
+ }
5954
+ }
5955
+
5953
5956
/* Add/update the import route-target */
5954
5957
if (rt_type == RT_TYPE_BOTH || rt_type == RT_TYPE_IMPORT )
5955
5958
tmp_ret = parse_rtlist (bgp , vty , argc , argv , 2 , true, true);
@@ -6056,6 +6059,16 @@ DEFUN (no_bgp_evpn_vrf_rt,
6056
6059
}
6057
6060
}
6058
6061
6062
+ if (rt_type != RT_TYPE_IMPORT ) {
6063
+ for (int i = 3 ; i < argc ; i ++ ) {
6064
+ if ((argv [i ]-> arg )[0 ] == '*' ) {
6065
+ vty_out (vty ,
6066
+ "%% Wildcard '*' only applicable for import\n" );
6067
+ return CMD_WARNING_CONFIG_FAILED ;
6068
+ }
6069
+ }
6070
+ }
6071
+
6059
6072
if (rt_type == RT_TYPE_BOTH || rt_type == RT_TYPE_IMPORT )
6060
6073
tmp_ret = parse_rtlist (bgp , vty , argc , argv , 3 , false, true);
6061
6074
0 commit comments