Re: introduce 'pfctl -FR' to reset settings to defaults

2019-04-06 Thread Klemens Nanni
On Sat, Apr 06, 2019 at 02:37:05AM +0200, Alexandr Nedvedicky wrote: > updated diff is attached. I'll commit the change after unlock. OK kn with comments inline. > + pf.ifname = strdup("none"); > + if (pf.ifname == NULL) > + warn("%s: Warning: can't reset loginterface\n", __fun

Re: introduce 'pfctl -FR' to reset settings to defaults

2019-04-06 Thread Gleydson Soares
+void > +pfctl_reset(int dev, int opts) > +{ > + struct pfctlpf; > + struct pfr_buffer t; > + int i; > + > + pf.dev = dev; > + pfctl_init_options(&pf); > + > + /* Force reset upon pfctl_load_options() */ > + pf.debug_set = 1; > + pf.reass_set = 1; >