There is no easy way to set ipfilter optionlist variables during boot.
Add plumbing to the rc script to support this.
Original by: G. Paul Ziemba <p-fbsd-bugs@ziemba.us>
PR: 130555
MFC 1 week
Differential D47346
ipfilter: Set ipf -T optionlist at boot cy on Oct 30 2024, 7:36 PM. Authored by Tags None Referenced Files
Details There is no easy way to set ipfilter optionlist variables during boot. Original by: G. Paul Ziemba <p-fbsd-bugs@ziemba.us> Running here
Diff Detail
Event Timeline
Comment Actions Fixed, plus another change.
Comment Actions This update makes the following changes:
Comment Actions I would have just added: if [ -n "${ifilter_optionlist}" ]; then if ${ipfilter_program:-/sbin/ipf} -V | grep -q 'Running: yes'; then ${ipfilter_program:-/sbin/ipf} -D fi ${ipfilter_program:-/sbin/ipf} -T "${ipfilter_optionlist}" fi But the current code does the job well and it's arguably more explicit. Comment Actions Sorry, thinking more about it, this is essentially an rc patch.
EDIT: Not suggesting that it should be changed/added in this review. Comment Actions No. Unless ipfilter options can/should be shared with other rc scripts, this is specific to ipfilter.
The PR just wants ipfilter options to be set at boot. One could do it as in this revision or a new rc script. Best to be done here, as one could change the optionlist and service ipfilter restart. |