Re: [PATCH] freebsd: Implement selection of FIB (routing table) for tunneled packets

2021-04-17 Thread Jason A. Donenfeld
Hi Frank, On Sat, Apr 17, 2021 at 9:23 AM Frank Behrens wrote: > > > Am 17.04.2021 um 17:00 schrieb Jason A. Donenfeld: > > Does this actually fix or change anything? Don't new sockets have > > fib==0 right out of the gate already? > > New sockets inherit the fib from the current process. If you

Re: [PATCH] freebsd: Implement selection of FIB (routing table) for tunneled packets

2021-04-17 Thread Frank Behrens
Am 17.04.2021 um 17:00 schrieb Jason A. Donenfeld: Does this actually fix or change anything? Don't new sockets have fib==0 right out of the gate already? New sockets inherit the fib from the current process. If you create the wg interface from a process with different fib, that fib will

Re: [PATCH] freebsd: Implement selection of FIB (routing table) for tunneled packets

2021-04-17 Thread Jason A. Donenfeld
Hi Frank, On 4/17/21, Frank Behrens wrote: > Hi Jason! > > Am 13.04.2021 um 04:57 schrieb Jason A. Donenfeld: >> Can you let me know if this fixes the issue? >> >> https://git.zx2c4.com/wireguard-freebsd/commit/?id=cdb18ebf44a5babb57cddccd6b33e9f19cfdf365 > > It looks better, but a little too

Re: [PATCH] freebsd: Implement selection of FIB (routing table) for tunneled packets

2021-04-17 Thread Frank Behrens
Hi Jason! Am 13.04.2021 um 04:57 schrieb Jason A. Donenfeld: Can you let me know if this fixes the issue? https://git.zx2c4.com/wireguard-freebsd/commit/?id=cdb18ebf44a5babb57cddccd6b33e9f19cfdf365 It looks better, but a little too much optimized. ;-) The fix is in

Re: [PATCH] freebsd: Implement selection of FIB (routing table) for tunneled packets

2021-04-12 Thread Jason A. Donenfeld
Hi Frank, Can you let me know if this fixes the issue? https://git.zx2c4.com/wireguard-freebsd/commit/?id=cdb18ebf44a5babb57cddccd6b33e9f19cfdf365 Jason

Re: [PATCH] freebsd: Implement selection of FIB (routing table) for tunneled packets

2021-04-01 Thread Frank Behrens
Hello Jason! Am 31.03.2021 um 21:11 schrieb Jason A. Donenfeld: Thanks for the patch. Does the line `so4->so_fibnum = so6->so_fibnum = sc->sc_socket.so_fibnum;` also need to be changed too in initiation, or is that one fine? Thanks for the pointer. That part has to be changed as well. I

Re: [PATCH] freebsd: Implement selection of FIB (routing table) for tunneled packets

2021-03-31 Thread Frank Behrens
Hello Jason! Am 31.03.2021 um 21:11 schrieb Jason A. Donenfeld: Hi Frank, Thanks for the patch. Does the line `so4->so_fibnum = so6->so_fibnum = sc->sc_socket.so_fibnum;` also need to be changed too in initiation, or is that one fine? Good catch! I'll check this in the next few days (and

Re: [PATCH] freebsd: Implement selection of FIB (routing table) for tunneled packets

2021-03-31 Thread Jason A. Donenfeld
Hi Frank, Thanks for the patch. Does the line `so4->so_fibnum = so6->so_fibnum = sc->sc_socket.so_fibnum;` also need to be changed too in initiation, or is that one fine? Jason

Re: [PATCH] freebsd: Implement selection of FIB (routing table) for tunneled packets

2021-03-31 Thread Frank Behrens
Hello! Am 23.03.2021 um 06:51 schrieb Frank Behrens: Am 22.03.2021 um 19:14 schrieb Jason A. Donenfeld: Applied to git with some small modifications: https://git.zx2c4.com/wireguard-freebsd/commit/?id=0a5c6abdfaa1f4f09269a222c1720e2ff3b8aa02 Thanky you! That looks very good. I'm sorry,

Re: [PATCH] freebsd: Implement selection of FIB (routing table) for tunneled packets

2021-03-23 Thread Frank Behrens
Hi Jason! Am 22.03.2021 um 19:14 schrieb Jason A. Donenfeld: Applied to git with some small modifications: https://git.zx2c4.com/wireguard-freebsd/commit/?id=0a5c6abdfaa1f4f09269a222c1720e2ff3b8aa02 Thanky you! That looks very good. -- Frank Behrens Osterwieck, Germany

Re: [PATCH] freebsd: Implement selection of FIB (routing table) for tunneled packets

2021-03-22 Thread Jason A. Donenfeld
Hi Frank, On Sat, Mar 20, 2021 at 11:15 AM Frank Behrens wrote: > > Hi Jason, > > thanks for your response. > > Am 19.03.2021 schrieb Jason A. Donenfeld: > > In other words, you have push access to all branches beginning with fb/ . > That works, thanks. Meanwhile I pushed my branch to fb/fib. >

Re: [PATCH] freebsd: Implement selection of FIB (routing table) for tunneled packets

2021-03-20 Thread Franco Fichtner
Hi Frank, > On 20. Mar 2021, at 6:05 PM, Frank Behrens wrote: > > 3. The setting of special marks, useable in packet filter/firewall > processing. I guess, that is the meaning for "wg.. fwmark". I'm not > sure, how best to implement that for FreeBSD. For ipfw(4) there is some > functionality

Re: [PATCH] freebsd: Implement selection of FIB (routing table) for tunneled packets

2021-03-20 Thread Frank Behrens
Hi Jason, thanks for your response. Am 19.03.2021 schrieb Jason A. Donenfeld: In other words, you have push access to all branches beginning with fb/ . That works, thanks. Meanwhile I pushed my branch to fb/fib. Right now we have the `wg set wg0 fwmark ...` mapped to SO_USER_COOKIE, as I'm

Re: [PATCH] freebsd: Implement selection of FIB (routing table) for tunneled packets

2021-03-19 Thread Jason A. Donenfeld
Hey Frank, Thanks for the patch. That looks terrific. One question, though: Right now we have the `wg set wg0 fwmark ...` mapped to SO_USER_COOKIE, as I'm sure you saw there. But maybe FIB would be a better thing to use for that? We could adjust wireguard-go to do the same with the tuntap ioctl.

Re: [PATCH] freebsd: Implement selection of FIB (routing table) for tunneled packets

2021-03-19 Thread Jason A. Donenfeld
Hi again, As well, you can now do: git push g...@git.zx2c4.com:wireguard-freebsd master:fb/whatever-you-want In other words, you have push access to all branches beginning with fb/ . Poke me on IRC (I'm zx2c4) there if you want to chat about dev. Jason