diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-03-05 15:25:01 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-03-05 15:25:01 +0000 |
commit | e588841a37c4827ec10abcfa7533e356f1eb7e32 (patch) | |
tree | 6a3bd38f03bcc2f9b7a902f8eda4669ad163c044 /usr.sbin/bgpd/rde_filter.c | |
parent | c305baaf13d88ae8b5cc03c8663520d3054d1338 (diff) |
Allow to filter for ext-community attributes. Currently only perfect matches
work but that's already better then nothing. OK sthen@
Diffstat (limited to 'usr.sbin/bgpd/rde_filter.c')
-rw-r--r-- | usr.sbin/bgpd/rde_filter.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/rde_filter.c b/usr.sbin/bgpd/rde_filter.c index f6e3a179048..994e4d15b5d 100644 --- a/usr.sbin/bgpd/rde_filter.c +++ b/usr.sbin/bgpd/rde_filter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde_filter.c,v 1.61 2009/12/18 15:51:37 claudio Exp $ */ +/* $OpenBSD: rde_filter.c,v 1.62 2010/03/05 15:25:00 claudio Exp $ */ /* * Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org> @@ -302,6 +302,11 @@ rde_filter_match(struct filter_rule *f, struct rde_aspath *asp, if (community_match(asp, as, type) == 0) return (0); } + if (asp != NULL && + (f->match.ext_community.flags & EXT_COMMUNITY_FLAG_VALID)) + if (community_ext_match(asp, &f->match.ext_community, + peer->conf.remote_as) == 0) + return (0); if (f->match.prefix.addr.aid != 0) { if (f->match.prefix.addr.aid != prefix->aid) |