From 4b43781e7dde06fcda56873f63a47d7adbe5c5ac Mon Sep 17 00:00:00 2001 From: Henning Brauer Date: Thu, 8 Feb 2018 02:26:40 +0000 Subject: show current synflood detection watermarks in pfctl -vsi, for the lack of a more appropriate place. ok claudio benno procter --- sbin/pfctl/pfctl_parser.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sbin/pfctl/pfctl_parser.c') diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index f0e43882790..03c0f8eeab7 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl_parser.c,v 1.318 2017/11/28 16:05:47 bluhm Exp $ */ +/* $OpenBSD: pfctl_parser.c,v 1.319 2018/02/08 02:26:39 henning Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -515,7 +515,7 @@ const char *pf_fcounters[FCNT_MAX+1] = FCNT_NAMES; const char *pf_scounters[FCNT_MAX+1] = FCNT_NAMES; void -print_status(struct pf_status *s, int opts) +print_status(struct pf_status *s, struct pfctl_watermarks *synflwats, int opts) { char statline[80], *running, *debug; time_t runtime = 0; @@ -632,6 +632,11 @@ print_status(struct pf_status *s, int opts) printf("%14s\n", ""); } } + if (opts & PF_OPT_VERBOSE) { + printf("Adaptive Syncookies Watermarks\n"); + printf(" %-25s %14d states\n", "start", synflwats->hi); + printf(" %-25s %14d states\n", "end", synflwats->lo); + } } void -- cgit v1.2.3