]> git.feebdaed.xyz Git - 0xmirror/libreswan.git/commitdiff
ipsec briefstatus: show IGNORING when !listening
authorAndrew Cagney <cagney@gnu.org>
Wed, 17 Dec 2025 19:55:25 +0000 (14:55 -0500)
committerAndrew Cagney <cagney@gnu.org>
Wed, 17 Dec 2025 19:57:02 +0000 (14:57 -0500)
programs/pluto/state.c

index fbba601b7f2ce2b30a60b05ed80a704a821b14ca..cb35e12dcd669f2332badf051ae6290b31490b40 100644 (file)
@@ -1647,9 +1647,18 @@ void jam_humber_uintmax(struct jambuf *buf,
 void whack_briefstatus(const struct whack_message *wm UNUSED, struct show *s)
 {
        show_separator(s);
-       show(s, "State Information: DDoS cookies %s, %s new IKE connections",
-            require_ddos_cookies() ? "REQUIRED" : "not required",
-            (drop_new_exchanges(show_logger(s)) == NULL ? "Accepting" : "NOT ACCEPTING"));
+       SHOW_JAMBUF(s, buf) {
+               jam_string(buf, "State Information: ");
+               /*DDoS*/
+               jam_string(buf, "DDoS cookies ");
+               jam_string(buf, (require_ddos_cookies() ? "REQUIRED" : "not required"));
+               /* IKE */
+               jam_string(buf, ", ");
+               jam_string(buf, (drop_new_exchanges(show_logger(s)) != NULL ? "NOT ACCEPTING" :
+                                listening ? "Accepting" :
+                                "IGNORING"));
+               jam_string(buf, " new IKE connections");
+       }
 
        show(s, "IKE SAs: total("PRI_CAT"), half-open("PRI_CAT"), open("PRI_CAT"), authenticated("PRI_CAT"), anonymous("PRI_CAT")",
                  total_ike_sa(),