From 073fc3de19dfe1b4c557ff19a2518fe62b25f5a4 Mon Sep 17 00:00:00 2001 From: claudio Date: Mon, 25 Jan 2021 09:17:33 +0000 Subject: [PATCH] Adjust code since bgpd added an extra argument to aspath_verify() to reject AS_SET segments. In bgpctl this is always off. OK benno@ --- usr.sbin/bgpctl/output.c | 6 +++--- usr.sbin/bgpctl/output_json.c | 6 +++--- 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 @@ -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 @@ -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) { -- 2.20.1