Re: security/wpa_supplicant: Reassoc on NWID change

2019-01-05 Thread Raf Czlonka
On Fri, Jan 04, 2019 at 10:51:50PM GMT, Stuart Henderson wrote: > > Probably obvious anyway but just checking... you haven't forced bssid > or chan via hostname.if / ifconfig have you? > It is *always* worth checking for the obvious, IMHO :^) No, hostname.if is pretty vanilla: join hom

Re: security/wpa_supplicant: Reassoc on NWID change

2019-01-05 Thread Raf Czlonka
On Fri, Jan 04, 2019 at 10:43:14PM GMT, Peter Hessler wrote: > > Yes, can you turn on debug for the interface: ifconfig iwm0 debug > (replace iwm0 with your actual wifi device if it is different). > > That will give a lot more output in the dmesg buffer, but also the > results of channel scans an

Re: security/wpa_supplicant: Reassoc on NWID change

2019-01-04 Thread Stuart Henderson
On 2019/01/04 23:43, Peter Hessler wrote: > On 2019 Jan 04 (Fri) at 17:38:56 + (+), Raf Czlonka wrote: > : > :Absolute silence when I move around - only when I move back near the AP, > :the laptop associated with first, do I get this: > : > : $ route monitor > : got message of size

Re: security/wpa_supplicant: Reassoc on NWID change

2019-01-04 Thread Peter Hessler
On 2019 Jan 04 (Fri) at 17:38:56 + (+), Raf Czlonka wrote: :On Fri, Jan 04, 2019 at 05:03:44PM GMT, Gregor Best wrote: :> Hi Raf, : :Hi Gregor, : :> > [...] :> > I've re-tested it, now that the new package includes the patch, but :> > I'm left with the same behaviour as before - when I move

Re: security/wpa_supplicant: Reassoc on NWID change

2019-01-04 Thread Raf Czlonka
On Fri, Jan 04, 2019 at 05:03:44PM GMT, Gregor Best wrote: > Hi Raf, Hi Gregor, > > [...] > > I've re-tested it, now that the new package includes the patch, but > > I'm left with the same behaviour as before - when I move around, > > the laptop does not connect to any other APs. It *does* reconn

Re: security/wpa_supplicant: Reassoc on NWID change

2019-01-04 Thread Gregor Best
Hi Raf, > [...] > I've re-tested it, now that the new package includes the patch, but > I'm left with the same behaviour as before - when I move around, > the laptop does not connect to any other APs. It *does* reconnect > to the AP it has originally associated with and, only then, do I > see any

Re: security/wpa_supplicant: Reassoc on NWID change

2019-01-04 Thread Raf Czlonka
Hi all, I've re-tested it, now that the new package includes the patch, but I'm left with the same behaviour as before - when I move around, the laptop does not connect to any other APs. It *does* reconnect to the AP it has originally associated with and, only then, do I see any output in 'wpa_cli

Re: security/wpa_supplicant: Reassoc on NWID change

2018-12-28 Thread Stuart Henderson
On 2018/12/28 19:05, Peter Hessler wrote: > I gave this a spin, and seems to work in my testing. > > I did a few suspend/resumes, manual if down/up, forced a chan NN, and > walked around to do some roaming between 8 bssids. Recovery took a > short period of time, but was as expected. > > OK I'm

Re: security/wpa_supplicant: Reassoc on NWID change

2018-12-28 Thread Peter Hessler
I gave this a spin, and seems to work in my testing. I did a few suspend/resumes, manual if down/up, forced a chan NN, and walked around to do some roaming between 8 bssids. Recovery took a short period of time, but was as expected. OK On 2018 Dec 28 (Fri) at 17:15:48 +0100 (+0100), Gregor Bes

Re: security/wpa_supplicant: Reassoc on NWID change

2018-12-28 Thread Gregor Best
Peter pointed out that my previous patch doesn't apply. Sorry for that, a fixed one is below my signature. -- Gregor Index: Makefile === RCS file: /home/cvs/ports/security/wpa_supplicant/Makefile,v retrieving revision 1.39

Re: security/wpa_supplicant: Reassoc on NWID change

2018-12-25 Thread Gregor Best
Stuart Henderson writes: > [...] > Other programs reading messages from the route socket handle this > slightly differently. They don't treat a read() as a single message, > instead they loop over it, looking at the first part, deciding whether > to act on it ("is it the right rtm_version, are we

Re: security/wpa_supplicant: Reassoc on NWID change

2018-12-25 Thread Gregor Best
Hi, > [...] > I've started using this at 35C3, and it mostly works for me. > [...] Great to hear, using it at the congress was my motivation for adding this in the first place :) > The one thing it doesn't handle for me is when I change the lladdr, but > I have some ideas for it. > > I fixed th

Re: security/wpa_supplicant: Reassoc on NWID change

2018-12-24 Thread Stuart Henderson
> ++static void > ++wpa_driver_openbsd_event_receive(int sock, void *global, void *sock_ctx) > ++{ > ++struct openbsd_driver_data *drv = sock_ctx; > ++struct rt_msghdr *rtm; > ++struct if_ieee80211_data *ifie; > ++char *rtmmsg; > ++ssize_t n; > ++ > ++rtmmsg = os_zalloc(RTM_

Re: security/wpa_supplicant: Reassoc on NWID change

2018-12-24 Thread Peter Hessler
I've started using this at 35C3, and it mostly works for me. The one thing it doesn't handle for me is when I change the lladdr, but I have some ideas for it. I fixed the whitespace, and changed the main bit to use a switch instead of an if elseif dance. This is what I am running right now, what

Re: security/wpa_supplicant: Reassoc on NWID change

2018-12-13 Thread Gregor Best
Hi Mikolaj et al, Mikolaj Kucharski writes: > > Here is debug output of one day session, with suspend in the middle > when going home, back to work and home again. > [...] > Tomorrow I may give you example of above log when walking around the > office, to compare events while switching APs. > [

Re: security/wpa_supplicant: Reassoc on NWID change

2018-12-12 Thread Mikolaj Kucharski
Gregor, Thank you for working on this. I have one comment about your code, comments inlined in your below diff. Here is debug output of one day session, with suspend in the middle when going home, back to work and home again. # grep -E 'type=0x(15|e)' wpa_supplicant.log 1544550580.320374: XXX ev

Re: security/wpa_supplicant: Reassoc on NWID change

2018-12-12 Thread Gregor Best
Hi Edd, Raf, Mikolaj, ports@ I just updated my proposed patch with Mikolaj's suggestion of also listening to RTM_IFINFO instead of just RTM_80211INFO. The patch is attached below the signature. It makes reassociation over suspend/resume work (if I resume in the same spot I suspended in, haven't

Re: security/wpa_supplicant: Reassoc on NWID change

2018-12-12 Thread Gregor Best
Hi Mikolaj, > [...] > I'm currently testing your diff with additional condition to also > handle RTM_IFINFO, as I see it happening just after resume: > > 1544537117.597172: XXX wpa_driver_openbsd_event_receive() start > 1544537117.597197: XXX evnt_rcv: name=iwn0, type=0xe > [...] Good idea. How

Re: security/wpa_supplicant: Reassoc on NWID change

2018-12-11 Thread Edd Barrett
On Tue, Dec 11, 2018 at 05:19:26PM +, Raf Czlonka wrote: > For me this happened *only* after going back near the AP the laptop > originally associated with. Ah yes. As it happens, that was when I did it too! Sorry, I wasn't clear. -- Best Regards Edd Barrett http://www.theunixzoo.co.uk

Re: security/wpa_supplicant: Reassoc on NWID change

2018-12-11 Thread Raf Czlonka
On Tue, Dec 11, 2018 at 11:35:42AM GMT, Edd Barrett wrote: > On Mon, Dec 10, 2018 at 04:31:02PM +, Raf Czlonka wrote: > > Hi Gregor, > > > > When I boot my laptop up, it connects to eduroam just fine. > > > > However, when I move around the building, it does not associate > > with any other A

Re: security/wpa_supplicant: Reassoc on NWID change

2018-12-11 Thread Mikolaj Kucharski
Comment inlined about RTM_IFINFO On Wed, Nov 28, 2018 at 06:56:46PM +0100, Gregor Best wrote: > Index: patches/patch-src_drivers_driver_openbsd_c > === > RCS file: > /home/cvs/ports/security/wpa_supplicant/patches/patch-src_drivers_d

Re: security/wpa_supplicant: Reassoc on NWID change

2018-12-11 Thread Edd Barrett
On Mon, Dec 10, 2018 at 04:31:02PM +, Raf Czlonka wrote: > Hi Gregor, > > When I boot my laptop up, it connects to eduroam just fine. > > However, when I move around the building, it does not associate > with any other AP. This was my experience too. It seems that you can sometimes jump bac

Re: security/wpa_supplicant: Reassoc on NWID change

2018-12-11 Thread Mikolaj Kucharski
Hi Gregor, I've looked into this more and from debugging perspective. I've added wpa_printf(MSG_DEBUG, "XXX ...") statements to the top of each function in src/drivers/driver_openbsd.c and also one additional just before wpa_supplicant_event() inside an if() statement. That was mostly for me so I

Re: security/wpa_supplicant: Reassoc on NWID change

2018-12-10 Thread Raf Czlonka
Hi Gregor, When I boot my laptop up, it connects to eduroam just fine. However, when I move around the building, it does not associate with any other AP. I can't even make it associate if I manually run: sh /etc/netstart While running wpa_cli(8) in another tmux(1) window, I see a const

Re: security/wpa_supplicant: Reassoc on NWID change

2018-12-10 Thread Mikolaj Kucharski
Hi Gregor, I've tested your diff in recent days and in my case most often when I change the physical location (and hence AP) I put my laptop into suspend. I've noticed that with your diff wpa supplicant is not abble to reassoc to the AP on resume. However it looks to me more like wpa supplicant pr

Re: security/wpa_supplicant: Reassoc on NWID change

2018-12-07 Thread Peter Hessler
On 2018 Dec 07 (Fri) at 16:32:53 + (+), Edd Barrett wrote: :Hi, : :On Tue, Nov 20, 2018 at 07:18:37PM +0100, Gregor Best wrote: :> I've built a little patch to security/wpa_supplicant that lets it listen to :> changes in the associated network SSID (thanks to Ken's RTM_80211INFO) and :> rea

Re: security/wpa_supplicant: Reassoc on NWID change

2018-12-07 Thread Edd Barrett
Hi, On Tue, Nov 20, 2018 at 07:18:37PM +0100, Gregor Best wrote: > I've built a little patch to security/wpa_supplicant that lets it listen to > changes in the associated network SSID (thanks to Ken's RTM_80211INFO) and > reassociate itself. > > This essentially means that now you can run `wpa_su

Re: security/wpa_supplicant: Reassoc on NWID change

2018-12-06 Thread Peter Hessler
On 2018 Nov 28 (Wed) at 18:56:46 +0100 (+0100), Gregor Best wrote: :Peter Hessler writes: : :> This looks really cool, thank you for looking at it! :> :> One thing that you may also need, is to may also need to reassoc when :> the bssid changes (roaming between different APs). Can you also test :

Re: security/wpa_supplicant: Reassoc on NWID change

2018-11-28 Thread Gregor Best
Peter Hessler writes: > This looks really cool, thank you for looking at it! > > One thing that you may also need, is to may also need to reassoc when > the bssid changes (roaming between different APs). Can you also test > that when you do your join testing? > [...] Good call. That does turn o

security/wpa_supplicant: Reassoc on NWID change

2018-11-20 Thread Gregor Best
Hi David and ports@, I've built a little patch to security/wpa_supplicant that lets it listen to changes in the associated network SSID (thanks to Ken's RTM_80211INFO) and reassociate itself. This essentially means that now you can run `wpa_supplicant` in the background and configure e.g. eduroa