Re: FreeBSD if_wg POINTTOPOINT and MULTICAST behaviour

2021-04-19 Thread Toke Høiland-Jørgensen
Stefan Haller writes: > On Mon, Apr 19, 2021 at 01:42:58PM -0600, Jason A. Donenfeld wrote: >> On Mon, Apr 19, 2021 at 1:42 PM Stefan Haller wrote: >> > >> > On Mon, Apr 19, 2021 at 08:25:46PM +0200, Toke Høiland-Jørgensen wrote: >> > > Stefan, any chance you could test this patch to Bird

Re: FreeBSD if_wg POINTTOPOINT and MULTICAST behaviour

2021-04-19 Thread Stefan Haller
On Mon, Apr 19, 2021 at 01:42:58PM -0600, Jason A. Donenfeld wrote: > On Mon, Apr 19, 2021 at 1:42 PM Stefan Haller wrote: > > > > On Mon, Apr 19, 2021 at 08:25:46PM +0200, Toke Høiland-Jørgensen wrote: > > > Stefan, any chance you could test this patch to Bird (*instead of* the > > > previous

Re: FreeBSD if_wg POINTTOPOINT and MULTICAST behaviour

2021-04-19 Thread Jason A. Donenfeld
On Mon, Apr 19, 2021 at 1:42 PM Stefan Haller wrote: > > On Mon, Apr 19, 2021 at 08:25:46PM +0200, Toke Høiland-Jørgensen wrote: > > Stefan, any chance you could test this patch to Bird (*instead of* the > > previous one that removes the check from the Babel code)? > > The patch is working on

Re: FreeBSD if_wg POINTTOPOINT and MULTICAST behaviour

2021-04-19 Thread Stefan Haller
On Mon, Apr 19, 2021 at 08:25:46PM +0200, Toke Høiland-Jørgensen wrote: > Stefan, any chance you could test this patch to Bird (*instead of* the > previous one that removes the check from the Babel code)? The patch is working on FreeBSD 13.0. Kind regards, Stefan

Re: FreeBSD if_wg POINTTOPOINT and MULTICAST behaviour

2021-04-19 Thread Toke Høiland-Jørgensen
Toke Høiland-Jørgensen writes: > Stefan Haller writes: > >> Hi Jason, >> >> On Thu, Apr 15, 2021 at 06:05:03PM -0600, Jason A. Donenfeld wrote: >>> I spent the day playing around with bird and babel and sorted out >>> FreeBSD's v6 situation. Basically, ff00::/8 addresses are treated >>>

Re: FreeBSD if_wg POINTTOPOINT and MULTICAST behaviour

2021-04-16 Thread Jason A. Donenfeld
On Fri, Apr 16, 2021 at 9:17 AM Jason A. Donenfeld wrote: > > I set up a lab and will do some testing with version before and after > > the change, maybe for FRR it's enough to set NBMA or similar. > > Could you send a minimal bird config that's broken so that I can > reproduce the problem and

Re: FreeBSD if_wg POINTTOPOINT and MULTICAST behaviour

2021-04-16 Thread Jason A. Donenfeld
Hi Michael, On 4/16/21, Muenz, Michael wrote: > Am 16.04.2021 um 10:57 schrieb Stefan Haller: >> After applying Toke's patch for bird and your Wireguard patch in >> a7a84a17faf784 everything is working as before (with minor config >> changes). >> >> Just for the record, my previous configuration

Re: FreeBSD if_wg POINTTOPOINT and MULTICAST behaviour

2021-04-16 Thread Muenz, Michael
Am 16.04.2021 um 10:57 schrieb Stefan Haller: After applying Toke's patch for bird and your Wireguard patch in a7a84a17faf784 everything is working as before (with minor config changes). Just for the record, my previous configuration looked like this (using POINTTOPOINT interfaces, I use

Re: FreeBSD if_wg POINTTOPOINT and MULTICAST behaviour

2021-04-16 Thread Toke Høiland-Jørgensen
Stefan Haller writes: > Hi Jason, > > On Thu, Apr 15, 2021 at 06:05:03PM -0600, Jason A. Donenfeld wrote: >> I spent the day playing around with bird and babel and sorted out >> FreeBSD's v6 situation. Basically, ff00::/8 addresses are treated >> differently, and they're blocked unless the

Re: FreeBSD if_wg POINTTOPOINT and MULTICAST behaviour

2021-04-16 Thread Stefan Haller
Hi Jason, On Thu, Apr 15, 2021 at 06:05:03PM -0600, Jason A. Donenfeld wrote: > I spent the day playing around with bird and babel and sorted out > FreeBSD's v6 situation. Basically, ff00::/8 addresses are treated > differently, and they're blocked unless the interface sets > IFF_MULTICAST. So

Re: FreeBSD if_wg POINTTOPOINT and MULTICAST behaviour

2021-04-15 Thread Jason A. Donenfeld
Hey Stefan, Toke, I spent the day playing around with bird and babel and sorted out FreeBSD's v6 situation. Basically, ff00::/8 addresses are treated differently, and they're blocked unless the interface sets IFF_MULTICAST. So I've committed

Re: FreeBSD if_wg POINTTOPOINT and MULTICAST behaviour

2021-04-15 Thread Toke Høiland-Jørgensen
"Jason A. Donenfeld" writes: > Hi Stefan, > > Sounds like Toke has come up with the optimal solution, so I think > I'll drop the "link1" patch/hack. > > One thing I was wondering though, mostly for my own curiosity, is what > config you're using that shows the problem, and how does the problem >

Re: FreeBSD if_wg POINTTOPOINT and MULTICAST behaviour

2021-04-15 Thread Jason A. Donenfeld
Hi Stefan, Sounds like Toke has come up with the optimal solution, so I think I'll drop the "link1" patch/hack. One thing I was wondering though, mostly for my own curiosity, is what config you're using that shows the problem, and how does the problem manifest? I just put this in bird.conf:

Re: FreeBSD if_wg POINTTOPOINT and MULTICAST behaviour

2021-04-15 Thread Toke Høiland-Jørgensen
Stefan Haller writes: > Hi Toke, > > On Thu, Apr 15, 2021 at 12:14:04AM +0200, Toke Høiland-Jørgensen wrote: >> That's because the babel protocol code is checking for Bird's internal >> MULTICAST flag, which is set like: >> >> else if (fl & IFF_POINTOPOINT)/* PtP */ >> f.flags |=

Re: FreeBSD if_wg POINTTOPOINT and MULTICAST behaviour

2021-04-15 Thread Stefan Haller
Hi Toke, On Thu, Apr 15, 2021 at 12:14:04AM +0200, Toke Høiland-Jørgensen wrote: > That's because the babel protocol code is checking for Bird's internal > MULTICAST flag, which is set like: > > else if (fl & IFF_POINTOPOINT)/* PtP */ > f.flags |= IF_MULTICAST; > else if (fl &

Re: FreeBSD if_wg POINTTOPOINT and MULTICAST behaviour

2021-04-15 Thread Toke Høiland-Jørgensen
"Jason A. Donenfeld" writes: > Hey Toke, > > Regarding POINTTOPOINT flag in Linux vs FreeBSD -- apparently FreeBSD > routes everything differently simply by virtue of the interface having > that flag, whereas on Linux, PTP routing mode is only switched on if > you actually add an address with a

Re: FreeBSD if_wg POINTTOPOINT and MULTICAST behaviour

2021-04-14 Thread Jason A. Donenfeld
Hey Toke, Regarding POINTTOPOINT flag in Linux vs FreeBSD -- apparently FreeBSD routes everything differently simply by virtue of the interface having that flag, whereas on Linux, PTP routing mode is only switched on if you actually add an address with a dest peer. So for FreeBSD, the different

Re: FreeBSD if_wg POINTTOPOINT and MULTICAST behaviour

2021-04-14 Thread Stefan Haller
Hi Jason, Thanks for your clarification. I understand that setting this flag would be a false promise to userspace, because generally Wireguard is point-to-multipoint and doesn't copy messages to multiple peers (which is not exactly necessary in my case, where only a single peer is configured on

FreeBSD if_wg POINTTOPOINT and MULTICAST behaviour

2021-04-14 Thread Stefan Haller
Hello everyone! Today I tried switching to the if_wg kernel module. I observed that the behaviour of the tunnel interface was changed to drop the POINTTOPOINT and MULTICAST flags (8801509656e9). For some reason the bird2 routing daemon is not picking up my interface if there is only a /32

Re: FreeBSD if_wg POINTTOPOINT and MULTICAST behaviour

2021-04-14 Thread Toke Høiland-Jørgensen
Stefan Haller writes: > Hi Jason, > > Thanks for your clarification. I understand that setting this flag would > be a false promise to userspace, because generally Wireguard is > point-to-multipoint and doesn't copy messages to multiple peers (which > is not exactly necessary in my case, where

Re: FreeBSD if_wg POINTTOPOINT and MULTICAST behaviour

2021-04-14 Thread Jason A. Donenfeld
Hi Stefan, WireGuard does not do multicast, so we probably won't set that flag. You'll want to use babble over unicast anyway. As far as the `ifconfig wg0 link1` trick I added yesterday goes... I'm not totally convinced I'll keep that yet for the next snapshot. Does bird completely ignore