summaryrefslogtreecommitdiff
path: root/bgpd/bgp_route.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_route.c')
-rw-r--r--bgpd/bgp_route.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 66c479cd73..7850666085 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -9992,6 +9992,12 @@ static int bgp_show_regexp(struct vty *vty, struct bgp *bgp, const char *regstr,
regex_t *regex;
int rc;
+ if (!config_bgp_aspath_validate(regstr)) {
+ vty_out(vty, "Invalid character in as-path access-list %s\n",
+ regstr);
+ return CMD_WARNING_CONFIG_FAILED;
+ }
+
regex = bgp_regcomp(regstr);
if (!regex) {
vty_out(vty, "Can't compile regexp %s\n", regstr);