summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2018-08-29 11:43:16 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2018-08-29 11:43:16 +0000
commit28a2c3948c2ffbd4d2aecb96a8f2e554ce0364ec (patch)
tree272b9ef8ef35af634c810435dbfe314dcb078960 /usr.sbin
parent67236935584e1ab971cbf521c66b9a149a20523c (diff)
When checking for AS 0 make sure the full ASPATH is validated and don't
return on the first 0. The other AS_ERR_SOFT cases do the same and ensure that an ASPATH with an AS_ERR_SOFT is still valid enough for subsequent manipulation or inspection. OK benno@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bgpd/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/util.c b/usr.sbin/bgpd/util.c
index dabf6eb331d..2ef6330363d 100644
--- a/usr.sbin/bgpd/util.c
+++ b/usr.sbin/bgpd/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.30 2018/08/10 11:13:01 claudio Exp $ */
+/* $OpenBSD: util.c,v 1.31 2018/08/29 11:43:15 claudio Exp $ */
/*
* Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org>
@@ -464,7 +464,7 @@ aspath_verify(void *data, u_int16_t len, int as4byte)
ptr += as_size;
memcpy(&as, ptr, as_size);
if (as == 0)
- return (AS_ERR_SOFT);
+ error = AS_ERR_SOFT;
}
}
return (error); /* aspath is valid but probably not loop free */