From 9a09a64bb4160a5bb79cdf91bd95b7f77966f62e Mon Sep 17 00:00:00 2001 From: Pavel Machek Date: Thu, 25 May 2000 14:58:38 +0000 Subject: Use ? in path matching to avoid /* trap. --- filter/config.Y | 2 +- filter/test.conf | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'filter') diff --git a/filter/config.Y b/filter/config.Y index 0bbc325..b81bd6c 100644 --- a/filter/config.Y +++ b/filter/config.Y @@ -277,7 +277,7 @@ switch_body: /* EMPTY */ { $$ = NULL; } bgp_one: NUM { $$ = $1; } - | '*' { $$ = PM_ANY; } + | '?' { $$ = PM_ANY; } ; bgp_path: diff --git a/filter/test.conf b/filter/test.conf index c7fe415..7e67464 100644 --- a/filter/test.conf +++ b/filter/test.conf @@ -45,8 +45,8 @@ clist l; print "4 = ", p2.len; p2 = prepend( p2, 5 ); print "Should be false: ", p2 ~ p; - print "Should be true: ", p2 ~ / * 4 3 2 1 /, p2, / * 4 3 2 1 /; - print "Should be true: ", p2 ~ / * 4 3 * 1 /, p2, / * 4 3 * 1 /; + print "Should be true: ", p2 ~ / ? 4 3 2 1 /, p2, / ? 4 3 2 1 /; + print "Should be true: ", p2 ~ / ? 4 3 ? 1 /, p2, / ? 4 3 ? 1 /; print "5 = ", p2.len; l = - empty -; -- cgit v1.2.3