bgpd merge struct rib_desc and rib

2019-08-14 Thread Claudio Jeker
There is no reason anymore for this double wrapping of structs. Remove it to make the code simpler. OK? -- :wq Claudio Index: rde.c === RCS file: /cvs/src/usr.sbin/bgpd/rde.c,v retrieving revision 1.485 diff -u -p -r1.485 rde.c ---

Re: bgpd merge struct rib_desc and rib

2019-08-14 Thread Sebastian Benoit
Claudio Jeker(cje...@diehard.n-r-g.com) on 2019.08.14 09:14:34 +0200: > There is no reason anymore for this double wrapping of structs. > Remove it to make the code simpler. nice change and reads ok /B. > OK? > -- > :wq Claudio > > Index: rde.c >

Re: Use `if (retval == -1)' instead of 'if (retval < 0)'

2019-08-14 Thread YASUOKA Masahiko
I don't see any problem. ok yasuoka On Wed, 14 Aug 2019 16:12:01 +0900 (JST) Masato Asou wrote: > Additional information. > > From: Masato Asou > Subject: Use `if (retval == -1)' instead of 'if (retval < 0)' > Date: Wed, 14 Aug 2019 13:42:13 +0900 (JST) > >> Hi tech, >> >> Use `if (retval

Re: Use `if (retval == -1)' instead of 'if (retval < 0)'

2019-08-14 Thread Masato Asou
Additional information. From: Masato Asou Subject: Use `if (retval == -1)' instead of 'if (retval < 0)' Date: Wed, 14 Aug 2019 13:42:13 +0900 (JST) > Hi tech, > > Use `if (retval == -1)' instead of 'if (retval < 0)' when check the > return value of system call. > > How about it? > > RCS

ber.c: Document ber_scanf_element moving forward

2019-08-14 Thread Martijn van Duren
This one stumped me for longer than I'd like to admit. The problem I faced was that I expected ber_scanf_elements(..., "{Se{", ...) to work if "e" is an nstring. This was not the case because "e" doesn't increment ber and { is tested against the nstring. Because I can see value in having it this

Re: iwm(4): fix ccmp decrypt edge cases

2019-08-14 Thread richard . n . procter
Hi Stefan, On Wed, 14 Aug 2019, Stefan Sperling wrote: > On Tue, Aug 13, 2019 at 10:47:24AM -0300, Martin Pieuchot wrote: > > if the crash is because of a missing key, put one :) > > Yes, you've convinced me. With this patch we install the CCMP key > to both firmware and net80211. Until

Re: iwm(4): fix ccmp decrypt edge cases

2019-08-14 Thread richard . n . procter
On Thu, 15 Aug 2019, richard.n.proc...@gmail.com wrote: > Hi Stefan, > > On Wed, 14 Aug 2019, Stefan Sperling wrote: > > > On Tue, Aug 13, 2019 at 10:47:24AM -0300, Martin Pieuchot wrote: > > > if the crash is because of a missing key, put one :) > > > > Yes, you've convinced me. With this

bgpd change the way ribs are allocated

2019-08-14 Thread Claudio Jeker
Currently all RIBs in the RDE are stored in an array which is resized on demand. This does not work well when you plan to store pointers to RIB elements in the RDE. Since I want this I changed the RDE to use an array of pointers to individual RIB elements instead. This way pointers to the elements

Re: ber.c: Document ber_scanf_element moving forward

2019-08-14 Thread Claudio Jeker
On Wed, Aug 14, 2019 at 02:37:14PM +0200, Martijn van Duren wrote: > This one stumped me for longer than I'd like to admit. > The problem I faced was that I expected > ber_scanf_elements(..., "{Se{", ...) to work if "e" is an nstring. > This was not the case because "e" doesn't increment ber and {

snmpd: skip getnext mib if OID_NOTSET

2019-08-14 Thread Martijn van Duren
Found this when testing getnext sysServices. Without patch: $ snmp get -On -v2c -cpublic 127.0.0.1 sysServices.0 .1.3.6.1.2.1.1.7.0 = No Such Object available on this agent at this OID $ snmp getnext -On -v2c -cpublic 127.0.0.1 sysServices .1.3.6.1.2.1.1.7.0 = INTEGER: 0 $ snmp getnext -On -v2c

Re: relayd - HTTP Desync Attacks

2019-08-14 Thread Pablo Caballero
"In order to achieve this, the function kv_extend should be modified in order to alter..." Wrong! The header (already added to desc->http_headers) gets modified correctly through the desc->http_lastheader pointer. I'm going to stop making assumptions... I have to get my hands on a working OBSD

Re: installer: clean up clean_old()

2019-08-14 Thread Christian Weisgerber
On 2019-08-13, "Theo de Raadt" wrote: >> Could you add '&& -d /mnt/usr/lib/clang' to check whether the directory >> exists before trying to cd into it (similarly for /mnt/usr/bin/gcc and >> gcc-libs)? > > Then might as well just -d only, and skip the -f Seriously, why bother with a check in the

Re: installer: clean up clean_old()

2019-08-14 Thread Theo de Raadt
Christian Weisgerber wrote: > > But then people who mangle their system with symbolic links will lose > > At most a symlink will be removed and the directory still exists > somewhere else. *shrug* > I don't think we should worry about such corner cases on nonstandard > systems. If it is

Re: ber.c: Document ber_scanf_element moving forward

2019-08-14 Thread Martijn van Duren
On 8/14/19 3:35 PM, Claudio Jeker wrote: > On Wed, Aug 14, 2019 at 02:37:14PM +0200, Martijn van Duren wrote: >> This one stumped me for longer than I'd like to admit. >> The problem I faced was that I expected >> ber_scanf_elements(..., "{Se{", ...) to work if "e" is an nstring. >> This was not

Re: ber.c: Document ber_scanf_element moving forward

2019-08-14 Thread Martijn van Duren
On 8/14/19 4:48 PM, Claudio Jeker wrote: > On Wed, Aug 14, 2019 at 04:37:48PM +0200, Martijn van Duren wrote: >> On 8/14/19 3:35 PM, Claudio Jeker wrote: >>> On Wed, Aug 14, 2019 at 02:37:14PM +0200, Martijn van Duren wrote: This one stumped me for longer than I'd like to admit. The

Re: ber.c: Document ber_scanf_element moving forward

2019-08-14 Thread Claudio Jeker
On Wed, Aug 14, 2019 at 04:37:48PM +0200, Martijn van Duren wrote: > On 8/14/19 3:35 PM, Claudio Jeker wrote: > > On Wed, Aug 14, 2019 at 02:37:14PM +0200, Martijn van Duren wrote: > >> This one stumped me for longer than I'd like to admit. > >> The problem I faced was that I expected > >>

Re: ber.c: Document ber_scanf_element moving forward

2019-08-14 Thread Claudio Jeker
On Wed, Aug 14, 2019 at 04:51:10PM +0200, Martijn van Duren wrote: > On 8/14/19 4:48 PM, Claudio Jeker wrote: > > On Wed, Aug 14, 2019 at 04:37:48PM +0200, Martijn van Duren wrote: > >> On 8/14/19 3:35 PM, Claudio Jeker wrote: > >>> On Wed, Aug 14, 2019 at 02:37:14PM +0200, Martijn van Duren

Re: ber.c: Document ber_scanf_element moving forward

2019-08-14 Thread Theo de Raadt
Martijn van Duren wrote: > On 8/14/19 4:48 PM, Claudio Jeker wrote: > > On Wed, Aug 14, 2019 at 04:37:48PM +0200, Martijn van Duren wrote: > >> On 8/14/19 3:35 PM, Claudio Jeker wrote: > >>> On Wed, Aug 14, 2019 at 02:37:14PM +0200, Martijn van Duren wrote: > This one stumped me for longer

Re: installer: clean up clean_old()

2019-08-14 Thread Theo Buehler
> This sets an array to the expansion of the glob, which is an > alphabetically sorted list, drops the last element, and rm(1)s > the rest. Nice. reads & works ok

ber_set_writecallback: document arguments correctly

2019-08-14 Thread Martijn van Duren
The argument list for ber_set_writecallback is wrong. OK? martijn Index: ber_set_header.3 === RCS file: /cvs/src/lib/libutil/ber_set_header.3,v retrieving revision 1.2 diff -u -p -r1.2 ber_set_header.3 --- ber_set_header.321

Re: ber_set_writecallback: document arguments correctly

2019-08-14 Thread Martijn van Duren
I overlooked that even the argument type to cb is wrong. On 8/14/19 7:54 PM, Martijn van Duren wrote: > The argument list for ber_set_writecallback is wrong. > > OK? > > martijn > Index: ber_set_header.3 === RCS file:

Re: iwm(4): fix ccmp decrypt edge cases

2019-08-14 Thread Stefan Sperling
On Tue, Aug 13, 2019 at 10:47:24AM -0300, Martin Pieuchot wrote: > if the crash is because of a missing key, put one :) Yes, you've convinced me. With this patch we install the CCMP key to both firmware and net80211. Until firmware confirms that the key has been installed, we do software

Re: installer: clean up clean_old()

2019-08-14 Thread Christian Weisgerber
On 2019-08-14, Christian Weisgerber wrote: > clean_old() { > local _cver > > rm -rf /mnt/usr/lib/gcc-lib/!(*$VNAME) > _cver=$(cd /mnt/usr/lib/clang 2>/dev/null && ls -r | sed -e 1q) && > rm -rf /mnt/usr/lib/clang/!($_cver) > rm -rf