aboutsummaryrefslogtreecommitdiff
path: root/sbin/ifconfig
diff options
context:
space:
mode:
authorKristof Provost <kp@FreeBSD.org>2021-04-23 12:24:59 +0000
committerKristof Provost <kp@FreeBSD.org>2021-04-26 12:31:17 +0000
commit5f5bf88949df421ec3ccd7e14a999e8d8b9251bf (patch)
tree90602ac8de5a4ed6fe71a21062238a1a0369e128 /sbin/ifconfig
parent5632f585355ad380cb9ef932c419e2efdb1fc46b (diff)
downloadsrc-5f5bf88949df421ec3ccd7e14a999e8d8b9251bf.tar.gz
src-5f5bf88949df421ec3ccd7e14a999e8d8b9251bf.zip
pfsync: Expose PFSYNCF_OK flag to userspace
Add 'syncok' field to ifconfig's pfsync interface output. This allows userspace to figure out when pfsync has completed the initial bulk import. Reviewed by: donner MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D29948
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r--sbin/ifconfig/ifpfsync.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/ifconfig/ifpfsync.c b/sbin/ifconfig/ifpfsync.c
index 6df38c1ac997..60e3d4360aa3 100644
--- a/sbin/ifconfig/ifpfsync.c
+++ b/sbin/ifconfig/ifpfsync.c
@@ -206,7 +206,10 @@ pfsync_status(int s)
if (preq.pfsyncr_syncdev[0] != '\0' ||
preq.pfsyncr_syncpeer.s_addr != htonl(INADDR_PFSYNC_GROUP)) {
printf("maxupd: %d ", preq.pfsyncr_maxupdates);
- printf("defer: %s\n", preq.pfsyncr_defer ? "on" : "off");
+ printf("defer: %s\n",
+ (preq.pfsyncr_defer & PFSYNCF_DEFER) ? "on" : "off");
+ printf("\tsyncok: %d\n",
+ (preq.pfsyncr_defer & PFSYNCF_OK) ? 1 : 0);
}
}