Re: pf_remove_divert_state

2020-07-26 Thread YASUOKA Masahiko
Thanks, On Sat, 25 Jul 2020 15:00:07 +0200 Alexander Bluhm wrote: > On Sat, Jul 25, 2020 at 09:37:37PM +0900, YASUOKA Masahiko wrote: >> Is this part a reason why we have "divert-reply"? > > Yes. > > Divert rules pass packets to the local network stack. With divert-to > you specify the socket

Re: pf_remove_divert_state

2020-07-25 Thread Alexander Bluhm
On Sat, Jul 25, 2020 at 09:37:37PM +0900, YASUOKA Masahiko wrote: > Is this part a reason why we have "divert-reply"? Yes. Divert rules pass packets to the local network stack. With divert-to you specify the socket address. This works for incomming connections. The divert-to address can be 127.

Re: pf_remove_divert_state

2020-07-25 Thread YASUOKA Masahiko
On Sat, 25 Jul 2020 13:29:57 +0200 Alexander Bluhm wrote: > On Sat, Jul 25, 2020 at 08:20:21PM +0900, YASUOKA Masahiko wrote: >> Currently SO_BINDANY is usable without any divert or divert-reply >> rule. > > This is why we have the divert-reply feature. Just mark the states > with that keyword w

Re: pf_remove_divert_state

2020-07-25 Thread Alexander Bluhm
On Sat, Jul 25, 2020 at 08:20:21PM +0900, YASUOKA Masahiko wrote: > Currently SO_BINDANY is usable without any divert or divert-reply > rule. This is why we have the divert-reply feature. Just mark the states with that keyword when you want to use them with SO_BINDANY. See man setsockopt Is tha