diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2004-03-12 21:21:40 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2004-03-12 21:21:40 +0000 |
commit | 9872ec4b58fa1b6825c9db2c2364b56b4a59fa52 (patch) | |
tree | be22615faeab76433f82b2e486e61458143716af /usr.sbin/bgpd/rde_attr.c | |
parent | c282f900e7096a4b0b4d1f83f80970e419870814 (diff) |
bgpctl has a empty-as keyword so make this actually work. Handle AS_EMPTY
in aspath_match().
Diffstat (limited to 'usr.sbin/bgpd/rde_attr.c')
-rw-r--r-- | usr.sbin/bgpd/rde_attr.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/rde_attr.c b/usr.sbin/bgpd/rde_attr.c index fc35e3cb05e..155ec52cc02 100644 --- a/usr.sbin/bgpd/rde_attr.c +++ b/usr.sbin/bgpd/rde_attr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde_attr.c,v 1.23 2004/03/12 21:14:35 claudio Exp $ */ +/* $OpenBSD: rde_attr.c,v 1.24 2004/03/12 21:21:39 claudio Exp $ */ /* * Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org> @@ -947,6 +947,13 @@ aspath_match(struct aspath *a, enum as_spec type, u_int16_t as) u_int16_t len, seg_size; u_int8_t i, seg_type, seg_len; + if (type == AS_EMPTY) { + if (a->hdr.len == 0) + return (1); + else + return (0); + } + final = 0; seg = a->data; for (len = a->hdr.len; len > 0; len -= seg_size, seg += seg_size) { |