settos isn't a scrub option in pfctl parse.y

2018-11-14 Thread David Gwynne
ok? Index: parse.y === RCS file: /cvs/src/sbin/pfctl/parse.y,v retrieving revision 1.687 diff -u -p -r1.687 parse.y --- parse.y 10 Nov 2018 21:22:17 - 1.687 +++ parse.y 15 Nov 2018 02:58:26 - @@ -307,7 +307,6 @@ s

Re: add an iqdrops view to systat to show interface queue drops

2018-11-14 Thread David Gwynne
On Fri, Nov 17, 2017 at 01:11:52PM -, Christian Weisgerber wrote: > On 2017-11-17, David Gwynne wrote: > > > can we have modified displays within a view? > > We already have this for the ifstat view. > > The character B changes the counter view between bytes and > bits. P

Re: ifconfig: remove unreachable strlcpy error checks

2018-11-14 Thread Klemens Nanni
On Wed, Nov 14, 2018 at 03:46:08PM -0700, Todd C. Miller wrote: > Are you sure these checks cannot be hit? For example: > > % ifconfig lo0 group jkhaksudhkashdkashdkahdksahdkjhakjshdaksjhd > ifconfig: setifgroup: group name too long > > sure looks like the check gets triggered. You are right. I

Re: ifconfig: remove unreachable strlcpy error checks

2018-11-14 Thread Todd C. Miller
Are you sure these checks cannot be hit? For example: % ifconfig lo0 group jkhaksudhkashdkashdkahdksahdkjhakjshdaksjhd ifconfig: setifgroup: group name too long sure looks like the check gets triggered. - todd

Re: ifconfig: remove unreachable strlcpy error checks

2018-11-14 Thread Theo de Raadt
Klemens Nanni wrote: > > I'm not sure I see the point of the (void) casts. In my experience this is > > a useless syntax which fails to indicate if someone recently reviewed it > > for correctness. > This is used to indicate that the otherwise relevant return value can be > safely ignored but as

Re: ifconfig: remove unreachable strlcpy error checks

2018-11-14 Thread Klemens Nanni
On Wed, Nov 14, 2018 at 03:22:49PM -0700, Theo de Raadt wrote: > Klemens Nanni wrote: > > > Thus I'd like to remove error checks that are never hit and use > > sizeof(source) instead of hardcoded IFNAMSIZ while there. > > Never use sizeof(source). Always use sizeof(dest). Which it appears > yo

Re: ifconfig: remove unreachable strlcpy error checks

2018-11-14 Thread Theo de Raadt
Klemens Nanni wrote: > Thus I'd like to remove error checks that are never hit and use > sizeof(source) instead of hardcoded IFNAMSIZ while there. Never use sizeof(source). Always use sizeof(dest). Which it appears you did. I'm not sure I see the point of the (void) casts. In my experience t

ifconfig: remove unreachable strlcpy error checks

2018-11-14 Thread Klemens Nanni
Either the name given on the command line is copied in, or we copy names out of interface structs. For the first scenario, `name' is filled and checked accordingly: 748 if (strlcpy(name, *argv, sizeof(name)) >= IFNAMSIZ) 1 errx(1, "interface name '%s' too long", *argv); For the

Patch to support AR816x/AR817x chipsets in alc(4)

2018-11-14 Thread Genadijus Paleckis
Hi all, I'm piggybacking on post from Jason Hunt https://marc.info/?l=openbsd-tech&m=146881042926430&w=2 Please find attached diff for alc(4) synced with FreeBSD alc(4). In addition to original diff this one adds support to E2200, E2400 and E2500 cards made by Attansic. I am running it for more

bread_cluster(9) & free(9) sizes

2018-11-14 Thread Martin Pieuchot
Diff below uses the, already calculated, number of read-ahead buffers to pass the correct size to free(9). While here I unified the two loops calculating this number of buffers, as we know for sure the first one isn't NULL. ok? Index: kern/vfs_bio.c ==

uhci(4) free(9) sizes

2018-11-14 Thread Martin Pieuchot
Pass the sizes of the interrupt and isochronous arrays to free(9). While here convert a malloc(9) to mallocarray(9). Untested for lack of hardware. ok? Index: uhci.c === RCS file: /cvs/src/sys/dev/usb/uhci.c,v retrieving revision 1

free(9) sizes for USB ifaces

2018-11-14 Thread Martin Pieuchot
We already have the number of available interfaces in the configuration descriptor, so use it to free the array. ok? Index: usb_subr.c === RCS file: /cvs/src/sys/dev/usb/usb_subr.c,v retrieving revision 1.140 diff -u -p -r1.140 usb_s

libpcap: add basic MPLS support

2018-11-14 Thread Denis Fondras
Add basic MPLS support in libpcap. This version simplifies protocol filtering. There is no need to check if we are in an MPLS packet for each protocol. With one change, we can check icmp/udp/tcp/host Index: gencode.c === RCS file: /c

Re: tunnels, ecn, and ipv4 header checksums

2018-11-14 Thread Claudio Jeker
On Wed, Nov 14, 2018 at 08:16:33PM +1000, David Gwynne wrote: > On Wed, Nov 14, 2018 at 11:49:02AM +1000, David Gwynne wrote: > > while looking at outgoing ttl processing and rfc 6040, i noted that gif > > and gre patched a packets ttl, but didn't update the checksum on the > > packet. > > > > i t

Re: tunnels, ecn, and ipv4 header checksums

2018-11-14 Thread David Gwynne
On Wed, Nov 14, 2018 at 11:49:02AM +1000, David Gwynne wrote: > while looking at outgoing ttl processing and rfc 6040, i noted that gif > and gre patched a packets ttl, but didn't update the checksum on the > packet. > > i think there's two issues here. firstly, we need to update the checksum > wh