summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2021-01-25 09:17:34 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2021-01-25 09:17:34 +0000
commit6812ba2ded1c612d7489905ac464a59fd9ed33f9 (patch)
tree2ccbcf8bd1d01bca7aa5f6d0ce6cf960ac5c771c /usr.sbin
parentb8b88c514c682cb37d86080785fde5bc222085ec (diff)
Adjust code since bgpd added an extra argument to aspath_verify() to
reject AS_SET segments. In bgpctl this is always off. OK benno@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bgpctl/output.c6
-rw-r--r--usr.sbin/bgpctl/output_json.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/bgpctl/output.c b/usr.sbin/bgpctl/output.c
index 2d49cb3b2e2..f986fd3dc78 100644
--- a/usr.sbin/bgpctl/output.c
+++ b/usr.sbin/bgpctl/output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: output.c,v 1.11 2020/12/30 07:31:19 claudio Exp $ */
+/* $OpenBSD: output.c,v 1.12 2021/01/25 09:17:33 claudio Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -647,8 +647,8 @@ show_attr(u_char *data, size_t len, struct parse_result *res)
case ATTR_ASPATH:
case ATTR_AS4_PATH:
/* prefer 4-byte AS here */
- e4 = aspath_verify(data, alen, 1);
- e2 = aspath_verify(data, alen, 0);
+ e4 = aspath_verify(data, alen, 1, 0);
+ e2 = aspath_verify(data, alen, 0, 0);
if (e4 == 0 || e4 == AS_ERR_SOFT) {
path = data;
} else if (e2 == 0 || e2 == AS_ERR_SOFT) {
diff --git a/usr.sbin/bgpctl/output_json.c b/usr.sbin/bgpctl/output_json.c
index 3b20533266b..0e317685583 100644
--- a/usr.sbin/bgpctl/output_json.c
+++ b/usr.sbin/bgpctl/output_json.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: output_json.c,v 1.5 2020/12/30 07:31:19 claudio Exp $ */
+/* $OpenBSD: output_json.c,v 1.6 2021/01/25 09:17:33 claudio Exp $ */
/*
* Copyright (c) 2020 Claudio Jeker <claudio@openbsd.org>
@@ -598,8 +598,8 @@ json_attr(u_char *data, size_t len, struct parse_result *res)
case ATTR_ASPATH:
case ATTR_AS4_PATH:
/* prefer 4-byte AS here */
- e4 = aspath_verify(data, alen, 1);
- e2 = aspath_verify(data, alen, 0);
+ e4 = aspath_verify(data, alen, 1, 0);
+ e2 = aspath_verify(data, alen, 0, 0);
if (e4 == 0 || e4 == AS_ERR_SOFT) {
path = data;
} else if (e2 == 0 || e2 == AS_ERR_SOFT) {