Re: net80211: remove redundant assignment to ic_curmode

2019-08-25 Thread Kevin Lo
On Sun, Aug 25, 2019 at 03:11:52PM +0200, Stefan Sperling wrote: > > This assigment to ic_curmode is redundant because it already occurs > inside ieee80211_setmode(), and channel information in selbs and ni > is equivalent after node_copy(). > > ok? ok kevlo@

Re: FAQ: aarch64 stable packages

2019-08-25 Thread Solene Rapenne
On Sun, Aug 25, 2019 at 09:09:58PM +0200, Alessandro Gallo wrote: > Hi, > > Looks like stable packages for aarch64 are now available (?): > > https://ftp.openbsd.org/pub/OpenBSD/6.5/packages-stable/aarch64 > > The following diff updates the relevant section of the FAQ: > > Index: faq10.html >

mg(1): dired: snprintf(), unlike strlcpy(), returns int, not size_t

2019-08-25 Thread Joachim Nilsson
--- a/src/dired.c +++ b/src/dired.c @@ -478,9 +478,9 @@ d_copy(int f, int n) topath = adjustname(toname, TRUE); if (topath && stat(topath, ) == 0) { if (S_ISDIR(statbuf.st_mode)) { - off = snprintf(toname, sizeof(toname), "%s/%s", +

mg(1): Strings must be at least 2 chars for terminating NUL character

2019-08-25 Thread Joachim Nilsson
--- a/src/interpreter.c +++ b/src/interpreter.c @@ -269,7 +269,7 @@ static int foundlist(char *defstr) { struct varentry *vt, *v1 = NULL; - const char e[1] = "e", t[1] = "t"; + const char e[2] = "e", t[2] = "t"; char*p, *vnamep, *vendp = NULL,

mg(1): Make sure we don't deref NULL ptr in skipwhite()

2019-08-25 Thread Joachim Nilsson
--- a/src/interpreter.c +++ b/src/interpreter.c @@ -139,7 +139,10 @@ multiarg(char *funstr) return (dobeep_msgs("Command takes no arguments: ", cmdp)); /* now find the first argument */ - p = fendp + 1; + if (fendp) + p = fendp + 1; + else +

mg(1): strchr() may return NULL

2019-08-25 Thread Joachim Nilsson
The new Scheme-like interpreter may do a NULL pointer deref. when strchr() fails. Check pointer before NUL terminating. --- a/src/interpreter.c +++ b/src/interpreter.c @@ -122,10 +122,12 @@ multiarg(char *funstr) *fendp = '\0'; return(excline(cmdp));

mg(1): Only deref vendp if not NULL

2019-08-25 Thread Joachim Nilsson
The new Scheme-like interpreter can end up with a NULL pointer dereference if the for-loop exits immediately. --- a/src/interpreter.c +++ b/src/interpreter.c @@ -335,7 +335,10 @@ foundlist(char *defstr) spc = 0; } } - *vendp = '\0'; + +

FAQ: aarch64 stable packages

2019-08-25 Thread Alessandro Gallo
Hi, Looks like stable packages for aarch64 are now available (?): https://ftp.openbsd.org/pub/OpenBSD/6.5/packages-stable/aarch64 The following diff updates the relevant section of the FAQ: Index: faq10.html === RCS file:

Re: net80211: keep nodes cached across scans

2019-08-25 Thread Jason McIntyre
On Sun, Aug 25, 2019 at 03:18:46PM +0200, Stefan Sperling wrote: > This has been very stable for me on an iwm(4) client device. > > Has anyone tested this in other contexts? > Could somebody please test this in hostap mode? > > Thanks, > Stefan > i ran this on iwn and athn, both in client

Re: roaming fix for iwm(4) and iwn(4)

2019-08-25 Thread Stefan Sperling
On Sun, Aug 25, 2019 at 02:53:58PM +0200, Stefan Sperling wrote: > I've seen iwm(4) get stuck trying to associate to 2 GHz APs only and > never trying available 5 GHz ones. This happens because net80211 sets > a fixed mode during association attempts (11g in my case). If roaming > fails, the

Re: net80211: keep nodes cached across scans

2019-08-25 Thread Stefan Sperling
This has been very stable for me on an iwm(4) client device. Has anyone tested this in other contexts? Could somebody please test this in hostap mode? Thanks, Stefan On Sat, Aug 17, 2019 at 12:01:24AM +0200, Stefan Sperling wrote: > When a scan begins we currently toss away everything we have >

net80211: remove redundant assignment to ic_curmode

2019-08-25 Thread Stefan Sperling
This assigment to ic_curmode is redundant because it already occurs inside ieee80211_setmode(), and channel information in selbs and ni is equivalent after node_copy(). ok? diff refs/heads/roaming refs/heads/assignment blob - 905396f216158f9497fc28be19737e61595adce3 blob +

Re: flex {c,m}alloc() checks

2019-08-25 Thread Otto Moerbeek
On Sun, Aug 25, 2019 at 08:32:04PM +0800, Michael Mikonos wrote: > Hello, > > I noticed that flex is too trusting and assumes > calloc/malloc will always succeed. Hopefully I > caught all of them. > I tried to follow the existing idiom of > calling flexerror() and passing strings via > the _()

roaming fix for iwm(4) and iwn(4)

2019-08-25 Thread Stefan Sperling
I've seen iwm(4) get stuck trying to associate to 2 GHz APs only and never trying available 5 GHz ones. This happens because net80211 sets a fixed mode during association attempts (11g in my case). If roaming fails, the interface remains stuck in that mode (and the mode is never upgraded to 11n if

flex {c,m}alloc() checks

2019-08-25 Thread Michael Mikonos
Hello, I noticed that flex is too trusting and assumes calloc/malloc will always succeed. Hopefully I caught all of them. I tried to follow the existing idiom of calling flexerror() and passing strings via the _() macro. OK? - Michael Index: dfa.c

ansify flex

2019-08-25 Thread Michael Mikonos
Hello, Upstream flex already updated function declarations to ANSI. The following patch applies this change to the in-tree version. Does it look OK? - Michael Index: ccl.c === RCS file: /cvs/src/usr.bin/lex/ccl.c,v retrieving