diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2018-09-26 14:38:20 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2018-09-26 14:38:20 +0000 |
commit | 4d8781d2bb0eebc708e9192a1b07ce45cbb49ae6 (patch) | |
tree | 7988fe99072eb197cf608069a9c094e409e098d5 | |
parent | a423f245c87dbce2ff3d0d6a18de6585a48aaefb (diff) |
Instead of checking that a segement is not of type AS_SET do the check
that it is actually AS_SEQUENCE. No functional change those are the only
two types bgpd supports here.
-rw-r--r-- | usr.sbin/bgpd/util.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/bgpd/util.c b/usr.sbin/bgpd/util.c index c1436cfc184..503c13031ba 100644 --- a/usr.sbin/bgpd/util.c +++ b/usr.sbin/bgpd/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.39 2018/09/20 11:45:59 claudio Exp $ */ +/* $OpenBSD: util.c,v 1.40 2018/09/26 14:38:19 claudio Exp $ */ /* * Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org> @@ -387,10 +387,10 @@ aspath_match(void *data, u_int16_t len, struct filter_as *f, u_int32_t neighas) /* * Just extract the rightmost AS * but if that segment is an AS_SET then the rightmost - * AS of a previous non AS_SET segment should be used. - * Because of that simply skip AS_SET segments. + * AS of a previous AS_SEQUENCE segment should be used. + * Because of that just look at AS_SEQUENCE segments. */ - if (seg[0] != AS_SET) + if (seg[0] == AS_SEQUENCE) as = aspath_extract(seg, seg_len - 1); /* not yet in the final segment */ if (!final) |