Move the 'Last received shutdown reason:' output a bit down where it makes
authorclaudio <claudio@openbsd.org>
Thu, 11 Jan 2024 14:34:49 +0000 (14:34 +0000)
committerclaudio <claudio@openbsd.org>
Thu, 11 Jan 2024 14:34:49 +0000 (14:34 +0000)
more sense.

usr.sbin/bgpctl/output.c

index b17813f..816e0b3 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: output.c,v 1.45 2024/01/11 13:09:41 claudio Exp $ */
+/*     $OpenBSD: output.c,v 1.46 2024/01/11 14:34:49 claudio Exp $ */
 
 /*
  * Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -388,10 +388,6 @@ show_neighbor_full(struct peer *p, struct parse_result *res)
 
        show_neighbor_msgstats(p);
        printf("\n");
-       if (p->stats.last_reason[0]) {
-               printf("  Last received shutdown reason: \"%s\"\n",
-                   log_reason(p->stats.last_reason));
-       }
 
        errstr = fmt_errstr(p->stats.last_sent_errcode,
            p->stats.last_sent_suberr);
@@ -401,6 +397,10 @@ show_neighbor_full(struct peer *p, struct parse_result *res)
            p->stats.last_rcvd_suberr);
        if (errstr)
                printf("  Last error received: %s\n", errstr);
+       if (p->stats.last_reason[0]) {
+               printf("  Last received shutdown reason: \"%s\"\n",
+                   log_reason(p->stats.last_reason));
+       }
 
        if (p->state >= STATE_OPENSENT) {
                printf("  Local host:  %20s, Local port:  %5u\n",