From c340d1a433cb7e4bd3cbeca5bc16566f746bd3fc Mon Sep 17 00:00:00 2001 From: Guillaume Mazoyer Date: Fri, 13 Jun 2014 16:07:03 +0200 Subject: Use quoted aspath-regex for Juniper. --- routers/juniper.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/routers/juniper.php b/routers/juniper.php index ff42e41..c4bceb1 100644 --- a/routers/juniper.php +++ b/routers/juniper.php @@ -41,10 +41,10 @@ final class Juniper extends Router { case 'as-path-regex': if (match_aspath_regex($parameters)) { - $commands[] = 'show route aspath-regex '.$parameters. - ' protocol bgp table inet.0'; - $commands[] = 'show route aspath-regex '.$parameters. - ' protocol bgp table inet6.0'; + $commands[] = 'show route aspath-regex "'.$parameters. + '" protocol bgp table inet.0'; + $commands[] = 'show route aspath-regex "'.$parameters. + '" protocol bgp table inet6.0'; } else { throw new Exception('The parameter is not an AS-Path regular expression like ".*XXXX YYYY.*".'); } @@ -52,10 +52,10 @@ final class Juniper extends Router { case 'as': if (match_as($parameters)) { - $commands[] = 'show route aspath-regex ^'.$parameters. - '$ protocol bgp table inet.0'; - $commands[] = 'show route aspath-regex ^'.$parameters. - '$ protocol bgp table inet6.0'; + $commands[] = 'show route aspath-regex "^'.$parameters. + '$" protocol bgp table inet.0'; + $commands[] = 'show route aspath-regex "^'.$parameters. + '$" protocol bgp table inet6.0'; } else { throw new Exception('The parameter is not an AS number.'); } -- cgit v1.2.3