Page MenuHomeFreeBSD

pfsync: Expose PFSYNCF_OK flag to userspace
ClosedPublic

Authored by kp on Apr 23 2021, 1:55 PM.

Details

Summary

Add 'syncok' field to ifconfig's pfsync interface output. This allows
userspace to figure out when pfsync has completed the initial bulk
import.

MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

kp requested review of this revision.Apr 23 2021, 1:55 PM
donner added inline comments.
sbin/ifconfig/ifpfsync.c
209–213

How about "defer: on (loaded)" in order to keep the line count.

sbin/ifconfig/ifpfsync.c
209–213

I initially considered adding it as 'syncok: 1' behind the 'defer: ...' line, but kept it on its own line to avoid breaking ifconfig parsers.
The same objection applies to '(loaded)'.

Sadly we don't yet have libxo support in ifconfig, so people tend to grep/awk/sed/... the ifconfig output, and if we add a line we're much less likely to break those parsers than if we add something to an existing output line.

This revision is now accepted and ready to land.Apr 23 2021, 8:34 PM
This revision was automatically updated to reflect the committed changes.