From c8a6b9a3d199444fd45879dd5cc5ececd9624822 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Fri, 17 Apr 2009 01:48:36 +0200 Subject: Rewrite of buggy AS path matching. Old AS path maching supposes thath AS number appears only once in AS path, but that is not true. It also contains some bugs related to AS path sets. New code does not use any assumptions about semantic structure of AS path. It is asymptotically slower than the old code, but on real paths it is not significant. It also allows '?' for matching one arbitrary AS number. --- filter/filter.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'filter/filter.c') diff --git a/filter/filter.c b/filter/filter.c index 2e13c75..313d2fa 100644 --- a/filter/filter.c +++ b/filter/filter.c @@ -82,10 +82,10 @@ pm_format(struct f_path_mask *p, byte *buf, unsigned int size) return; } - if (p->any) - buf += bsprintf(buf, " *"); - else + if (p->kind == PM_ASN) buf += bsprintf(buf, " %u", p->val); + else + buf += bsprintf(buf, (p->kind == PM_ASTERISK) ? " *" : " ?"); p = p->next; } -- cgit v1.2.3