From: tb Date: Wed, 18 Oct 2023 07:10:24 +0000 (+0000) Subject: rpki-client: move inherit in {ip,as}_warn() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=76dbb2b671d3f253dd35699074fbe97c1e35697d;p=openbsd rpki-client: move inherit in {ip,as}_warn() While alphabetic order makes sense, having inherit between individual AS and IP entries and ranges makes little sense. Use the order that we have elsewhere. ok claudio job --- diff --git a/usr.sbin/rpki-client/as.c b/usr.sbin/rpki-client/as.c index 68941ad90d1..6f64a73b8d4 100644 --- a/usr.sbin/rpki-client/as.c +++ b/usr.sbin/rpki-client/as.c @@ -1,4 +1,4 @@ -/* $OpenBSD: as.c,v 1.14 2023/10/18 07:04:24 tb Exp $ */ +/* $OpenBSD: as.c,v 1.15 2023/10/18 07:10:24 tb Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons * @@ -143,13 +143,13 @@ as_warn(const char *fn, const struct cert_as *cert, const char *msg) case CERT_AS_ID: warnx("%s: AS %u: %s", fn, cert->id, msg); break; - case CERT_AS_INHERIT: - warnx("%s: AS (inherit): %s", fn, msg); - break; case CERT_AS_RANGE: warnx("%s: AS range %u--%u: %s", fn, cert->range.min, cert->range.max, msg); break; + case CERT_AS_INHERIT: + warnx("%s: AS (inherit): %s", fn, msg); + break; default: warnx("%s: corrupt cert", fn); break; diff --git a/usr.sbin/rpki-client/ip.c b/usr.sbin/rpki-client/ip.c index 3d41bb1d06f..a7541723a51 100644 --- a/usr.sbin/rpki-client/ip.c +++ b/usr.sbin/rpki-client/ip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip.c,v 1.30 2023/10/18 07:08:19 tb Exp $ */ +/* $OpenBSD: ip.c,v 1.31 2023/10/18 07:10:24 tb Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons * @@ -342,13 +342,13 @@ ip_warn(const char *fn, const struct cert_ip *cert, const char *msg) ip_addr_print(&cert->ip, cert->afi, buf, sizeof(buf)); warnx("%s: %s: %s", fn, buf, msg); break; - case CERT_IP_INHERIT: - warnx("%s: (inherit): %s", fn, msg); - break; case CERT_IP_RANGE: ip_addr_range_print(&cert->range, cert->afi, buf, sizeof(buf)); warnx("%s: %s: %s", fn, buf, msg); break; + case CERT_IP_INHERIT: + warnx("%s: (inherit): %s", fn, msg); + break; default: warnx("%s: corrupt cert", fn); break;