From: claudio Date: Tue, 1 Oct 2024 18:33:16 +0000 (+0000) Subject: Use auth_conf.method instead of auth_state.method. The latter is always 0. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d3e7ac1607c7712be912c3f531b3d47c39edb5c5;p=openbsd Use auth_conf.method instead of auth_state.method. The latter is always 0. --- diff --git a/usr.sbin/bgpctl/output.c b/usr.sbin/bgpctl/output.c index 13b90254fb0..24793e12539 100644 --- a/usr.sbin/bgpctl/output.c +++ b/usr.sbin/bgpctl/output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: output.c,v 1.55 2024/10/01 11:50:15 claudio Exp $ */ +/* $OpenBSD: output.c,v 1.56 2024/10/01 18:33:16 claudio Exp $ */ /* * Copyright (c) 2003 Henning Brauer @@ -302,7 +302,7 @@ show_neighbor_full(struct peer *p, struct parse_result *res) ina.s_addr = htonl(p->remote_bgpid); printf(" BGP version 4, remote router-id %s", inet_ntoa(ina)); - printf("%s\n", fmt_auth_method(p->auth_state.method)); + printf("%s\n", fmt_auth_method(p->auth_conf.method)); } printf(" BGP state = %s", statenames[p->state]); if (p->conf.down) { diff --git a/usr.sbin/bgpctl/output_json.c b/usr.sbin/bgpctl/output_json.c index 27d400e7571..0f51749cb32 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.47 2024/10/01 11:50:15 claudio Exp $ */ +/* $OpenBSD: output_json.c,v 1.48 2024/10/01 18:33:16 claudio Exp $ */ /* * Copyright (c) 2020 Claudio Jeker @@ -240,9 +240,9 @@ json_neighbor_full(struct peer *p) json_do_uint("max_out_prefix_restart", p->conf.max_out_prefix_restart); } - if (p->auth_state.method != AUTH_NONE) + if (p->auth_conf.method != AUTH_NONE) json_do_string("authentication", - fmt_auth_method(p->auth_state.method)); + fmt_auth_method(p->auth_conf.method)); json_do_bool("ttl_security", p->conf.ttlsec); json_do_uint("holdtime", p->conf.holdtime); json_do_uint("min_holdtime", p->conf.min_holdtime);