Re: uplcom(4): add adapter to manual

2017-08-07 Thread Jeremie Courreges-Anglas
On Mon, Aug 07 2017, Anton Lindqvist wrote: > Hi, > I recently got an Aten UC232A (Prolific chipset) adapter which is > supported by uplcom. > > Comments? OK? ok jca@ > Index: uplcom.4 > === > RCS file:

Re: ifstated: consistent use of log.c

2017-08-06 Thread Jeremie Courreges-Anglas
On Thu, Aug 03 2017, Rob Pierce wrote: > As a result ifstated.c no longer needs err.h. > > Index: ifstated.c > === > RCS file: /cvs/src/usr.sbin/ifstated/ifstated.c,v > retrieving revision 1.56 > diff -u -p -r1.56

Re: switchd: no need to include err.h

2017-08-06 Thread Jeremie Courreges-Anglas
On Thu, Aug 03 2017, Rob Pierce wrote: > switchd no longer requires err.h. ok jca@ You could also stop including errno.h and syslog.h in parse.y. > Index: packet.c > === > RCS file:

Re: ifstated: improve routing socket error handling

2017-08-06 Thread Jeremie Courreges-Anglas
On Sun, Aug 06 2017, Rob Pierce wrote: > Improve error checking during processing of routing messages. Handling of > RTM_DESYNC encouraged by deraadt. Regression tests pass. > > I have another diff ready to go that handles interface depature, but I thought > it best to separate

Re: delete ICMP6_DST_UNREACH_NOTNEIGHBOR

2017-08-03 Thread Jeremie Courreges-Anglas
On Thu, Aug 03 2017, Florian Obser wrote: > sthen did a code search for me, thanks! > nothing in ports uses this. ok jca@ -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE

Re: dhcpd: remove unused structs

2017-08-03 Thread Jeremie Courreges-Anglas
On Tue, Aug 01 2017, Rob Pierce wrote: > I can confirm that the following structs have not been used since at least > OpenBSD 4.9. From Edgar Pettijohn. > > Ok? ok Looks like youncould trim this file some more (untested): @@ -315,20 +290,6 @@ struct protocol { void

Re: [patch/route] Allow short commands

2017-07-27 Thread Jeremie Courreges-Anglas
On Thu, Jul 27 2017, Stuart Henderson wrote: > On 2017/07/27 19:53, Denis Fondras wrote: >> Thank you for your comment. >> >> > This will lead to usage and documentation issues (aside from your >> > diff not including a manpage change): >> > >> >> You are right, I missed

Re: w: Remove XXX'ed check

2017-07-27 Thread Jeremie Courreges-Anglas
On Thu, Jul 27 2017, Klemens Nanni wrote: > Only main() calls pr_args() in L330 with ep->kp as argument which in > turn is set in L257 or L266 for every utmp entry. kp is checked against > NULL already in L229. > > Even if kp was somehow NULL chances are high we'd fail before

Re: whois(1): follow ICANN change to field names

2017-07-26 Thread Jeremie Courreges-Anglas
On Wed, Jul 26 2017, "Todd C. Miller" <todd.mil...@courtesan.com> wrote: > On Wed, 26 Jul 2017 17:19:42 +0200, Jeremie Courreges-Anglas wrote: > >> On Wed, Jul 26 2017, Stuart Henderson <s...@spacehopper.org> wrote: >> > the https://www.icann.org/resour

Re: whois(1): follow ICANN change to field names

2017-07-26 Thread Jeremie Courreges-Anglas
On Wed, Jul 26 2017, Stuart Henderson wrote: > the https://www.icann.org/resources/pages/rdds-labeling-policy-2017-02-01-en > changes have gone live (at least for com/net), so whois(1) no longer chases > referrals. OK to change the string to the new one? Would it make sense

Re: test: Add "<" and ">" to grammar comment, adjust alignment

2017-07-24 Thread Jeremie Courreges-Anglas
On Mon, Jul 24 2017, Klemens Nanni wrote: > Add missing operators and make the grammar more readable while using > spaces and tabs consistently. > > Feedback? Comments? I have added < and > but didn't touch anything else. I believe that the existing comment is readable ebnf

ksh: use RB trees as freelists

2017-07-24 Thread Jeremie Courreges-Anglas
This is not ripe yet, but I figured I'd share it. Since some time I find ksh(1) slow at startup. I use HISTFILE=~/.ksh_history and HISTSIZE=2; currently my ksh_history is 24487 lines long. Even if you're above HISTSIZE lines, ksh will avoid truncating your HISTFILE until it has grown by

Re: getdelim(3): perror -> err in example

2017-07-22 Thread Jeremie Courreges-Anglas
On Sun, Jul 23 2017, Ingo Schwarze <schwa...@usta.de> wrote: > Hi Jeremie, > > Jeremie Courreges-Anglas wrote on Sun, Jul 23, 2017 at 12:43:14AM +0200: > >> getline(3) and perror(3) are in posix, but fgetln(3) and err(3) come >> from 4.4BSD (according to their manp

Re: simple ifstated pledge

2017-07-22 Thread Jeremie Courreges-Anglas
On Sat, Jul 22 2017, Rob Pierce <r...@2keys.ca> wrote: > On Sun, Jul 23, 2017 at 12:26:53AM +0200, Jeremie Courreges-Anglas wrote: >> On Sat, Jul 22 2017, Rob Pierce <r...@2keys.ca> wrote: >> > With the most recent commit ifstated can now be pledged in a stra

Re: getdelim(3): perror -> err in example

2017-07-22 Thread Jeremie Courreges-Anglas
On Sat, Jul 22 2017, Anton Lindqvist wrote: > Hi, > This changes the behavior of the example but makes it consistent with > the example in fgetln(3) and many other manuals. > > Comments? OK? getline(3) and perror(3) are in posix, but fgetln(3) and err(3) come from

Re: simple ifstated pledge

2017-07-22 Thread Jeremie Courreges-Anglas
On Sat, Jul 22 2017, Rob Pierce wrote: > With the most recent commit ifstated can now be pledged in a straight forward > manner. A better pledge is possible with more work. > > Does it make sense to get this one in now? Regress tests pass. I think this is the way to go. ok jca@

pflogd: cope with interface departure

2017-07-22 Thread Jeremie Courreges-Anglas
If you destroy the interface pflogd(8) listens on, you get killed because socket(2) is denied by the current pledge(2) restrictions: pflogd(15868): syscall 97 "inet" The ioctl(SIOCGIFDATA) call would be fatal too. The diff below just uses if_nametoindex(3), which is always allowed. The

newsyslog: simplify mail sending

2017-07-22 Thread Jeremie Courreges-Anglas
I have nothing against asprintf(3), but the openmail function looks needlessly complicated. ok? Index: newsyslog.c === RCS file: /d/cvs/src/usr.bin/newsyslog/newsyslog.c,v retrieving revision 1.107 diff -u -p -p -u -r1.107

ifstated: no need for ioctl(SIOCGIFDATA)

2017-07-21 Thread Jeremie Courreges-Anglas
getifaddrs(3) can already give us access to the link state of the interface, no need for an additional ioctl(2) call. Bonus: getifaddrs(3) and its underlying syscalls can be allowed by pledge(2), this is not the case for SIOCGIFDATA. Diff tested by Rob Pierce, regress tests pass. The extra

newsyslog: skip invalid newsyslog.conf entries

2017-07-17 Thread Jeremie Courreges-Anglas
On Sat, Jul 15 2017, Jeremie Courreges-Anglas <j...@wxcvbn.org> wrote: > "Todd C. Miller" <todd.mil...@courtesan.com> writes: > >> On Sat, 15 Jul 2017 00:24:05 +0200, Jeremie Courreges-Anglas wrote: >> >>> Wouldn't it be better if we at le

Re: Move newsyslog to TAILQ*

2017-07-14 Thread Jeremie Courreges-Anglas
"Todd C. Miller" <todd.mil...@courtesan.com> writes: > On Sat, 15 Jul 2017 00:24:05 +0200, Jeremie Courreges-Anglas wrote: > >> Wouldn't it be better if we at least tried to properly free what was >> allocated in parse_file()? > > I'm not sure it is w

Re: Move newsyslog to TAILQ*

2017-07-14 Thread Jeremie Courreges-Anglas
"Todd C. Miller" <todd.mil...@courtesan.com> writes: > On Fri, 14 Jul 2017 22:59:58 +0200, Jeremie Courreges-Anglas wrote: > >> "Todd C. Miller" <todd.mil...@courtesan.com> writes: >> >> > On Fri, 14 Jul 2017 22:15:49 +02

Re: Move newsyslog to TAILQ*

2017-07-14 Thread Jeremie Courreges-Anglas
Alexander Bluhm <alexander.bl...@gmx.net> writes: > On Fri, Jul 14, 2017 at 10:15:49PM +0200, Jeremie Courreges-Anglas wrote: >> I find this more readable. > > yes, it is > >> /* Step 4, compress the log.0 file if configured to do so and free */ >> -wh

Re: Move newsyslog to TAILQ*

2017-07-14 Thread Jeremie Courreges-Anglas
"Todd C. Miller" <todd.mil...@courtesan.com> writes: > On Fri, 14 Jul 2017 22:15:49 +0200, Jeremie Courreges-Anglas wrote: > >> the proposal in >> >> https://marc.info/?l=openbsd-misc=150001966325010=2 >> >> made me look at newsyslog and i

Move newsyslog to TAILQ*

2017-07-14 Thread Jeremie Courreges-Anglas
Hi, the proposal in https://marc.info/?l=openbsd-misc=150001966325010=2 made me look at newsyslog and its manually linked lists. Here's a stab at using TAILQs instead. Notes: - no attempt is made to free unused entries. - "free(p)" below isn't enough to properly deallocate the memory used

Re: ypldap debugging tweak

2017-07-12 Thread Jeremie Courreges-Anglas
Kurt Mosiejczuk writes: > While trying out ypldap (using ypldap -dv) I got a bit confused at one point > because I just saw "flattening trees" and nothing else. My LDAP source does > have a *lot* of users, so thought maybe it was crunching for a bit. Nope. > My config

Re: Remove getopt from vipw

2017-07-12 Thread Jeremie Courreges-Anglas
Matthew Martin writes: > As far as I can tell the only thing gained from using getopt is handling > vipw -- > as vipw takes no flags or arguments, is not intended for non-interactive > use, and is not POSIX, I don't see a reason -- should be handled. I don't see a reason

Re: relayd ipv6 ttl check_icmp / check_tcp

2017-07-12 Thread Jeremie Courreges-Anglas
Kapetanakis Giannis <bil...@edu.physics.uoc.gr> writes: > On 12/07/17 22:00, Jeremie Courreges-Anglas wrote: >> The tweak I had in mind: consistently use "ttl" for all the >> get/setsockopt calls. >> >> ok? > > nice, > you can also replace size

Re: relayd ipv6 ttl check_icmp / check_tcp

2017-07-12 Thread Jeremie Courreges-Anglas
Jeremie Courreges-Anglas <j...@wxcvbn.org> writes: > Kapetanakis Giannis <bil...@edu.physics.uoc.gr> writes: > >> On 10/07/17 17:22, Jeremie Courreges-Anglas wrote: >>> Using -1 for IPV6_UNICAST_HOPS is correct. >>> >>> Note that you can al

Re: SSHFP with EDNS0/DNSSEC

2017-07-12 Thread Jeremie Courreges-Anglas
Eric Faurot writes: > On Wed, Jul 12, 2017 at 07:45:36AM +0200, Christian Barthel wrote: >> Hi, >> >> earlier this year, jca@ worked on support for DNSSEC and the EDNS0 >> extension [1] and committed this work at [2] (thanks!). I tried this >> with SSHFP records to check

Re: relayd ipv6 ttl check_icmp / check_tcp

2017-07-10 Thread Jeremie Courreges-Anglas
Kapetanakis Giannis <bil...@edu.physics.uoc.gr> writes: > On 10/07/17 17:22, Jeremie Courreges-Anglas wrote: >> Using -1 for IPV6_UNICAST_HOPS is correct. >> >> Note that you can also use -1 for IP_TTL on OpenBSD, sadly some systems >> out there don't support it

Re: relayd ipv6 ttl check_icmp / check_tcp

2017-07-10 Thread Jeremie Courreges-Anglas
Kapetanakis Giannis writes: > On 04/07/17 23:56, Sebastian Benoit wrote: >> Florian Obser(flor...@openbsd.org) on 2017.07.04 19:27:15 +: >>> On Fri, Jun 23, 2017 at 01:52:52PM +0300, Kapetanakis Giannis wrote: Hi, Using relayd's redirect/forward on

Re: armv7 alignment faults

2017-07-03 Thread Jeremie Courreges-Anglas
Artturi Alm writes: > Hi, > > i think i've noted about this before, around 13months ago freebsd > first disabled alignment faults, and they haven't enabled them since. > deja vu, or not, i don't recall if the last diff like below did go > anywhere, nor if it got discussed

Re: TIOCSTI

2017-06-28 Thread Jeremie Courreges-Anglas
Theo de Raadt writes: > Back around 1989, Ken Stauffer and I found a kernel security hole in > SunOS (the "open 3" bug) and used it along with TIOCSTI. > > That bug was fixed at least twice: we reported it and it was fixed in > SunOS, then when *BSD code became available I

Re: clang: ignore -fno-force-addr

2017-04-25 Thread Jeremie Courreges-Anglas
"Ted Unangst" <t...@tedunangst.com> writes: > Jeremie Courreges-Anglas wrote: >> >> clang already recognizes (and ignores) -fforce-addr but errors out >> on -fno-force-addr. This breaks the build of ports/databases/qdbm: >> >> >> http

Re: uip_socket.c: issues when using sendmsg() with small send buffers and the new 6.1 control message (IP_SENDSRCADDR)

2017-04-25 Thread Jeremie Courreges-Anglas
"Markert, Alexander" writes: > Hi, Hi, > the length of the data to be sent and in addition the length of the > associated control message (e.g. the source address: IP_SENDSRCADDR) musn't > exceed the maximum size of the socket's send buffer (SO_SNDBUF). >

clang: ignore -fno-force-addr

2017-04-19 Thread Jeremie Courreges-Anglas
clang already recognizes (and ignores) -fforce-addr but errors out on -fno-force-addr. This breaks the build of ports/databases/qdbm: http://build-failures.rhaalovely.net/amd64-clang/2017-04-14/databases/qdbm.log Fixing the port is easy, but so is ignoring -fno-force-addr. -fno-force-addr

Additional errno values

2017-04-10 Thread Jeremie Courreges-Anglas
We have a bunch of patches in ports to deal with EPROTO and EBADMSG not being defined. It would be nice to get rid of those. The diff below also adds the also missing ENOTRECOVERABLE and EOWNERDEAD. Thoughts? (Dunno if there is a point describing verbosely what those new errno values mean on

snmpd agentx fixes

2017-04-09 Thread Jeremie Courreges-Anglas
Hi, when implementing support for multiple listening sockets, I broke AgentX support in a rather silly way. AgentX support is only used by relayd in base. Rivo Nurges (in cc) contacted me about this. Thanks to him and reyk@ for helping me reproduce the issue. The config below helps reproduce

Re: rtadvd: asprintf

2017-04-05 Thread Jeremie Courreges-Anglas
Just to make things clear, Jeremie Courreges-Anglas <j...@wxcvbn.org> writes: > The last commit to this file fixed two (void)asprintf calls. Fix the > two remaining calls: depend on the ret buffer being set to NULL on I meant "don't depend on..." here, sorry for the

rtadvd: asprintf

2017-04-04 Thread Jeremie Courreges-Anglas
The last commit to this file fixed two (void)asprintf calls. Fix the two remaining calls: depend on the ret buffer being set to NULL on failure. ok? Index: dump.c === RCS file: /d/cvs/src/usr.sbin/rtadvd/dump.c,v retrieving

rtadvd: recvmsg/sendmsg return value

2017-04-04 Thread Jeremie Courreges-Anglas
Said functions return an ssize_t. Comparing (size_t < 0) isn't going to give good results. The type change in ra_output() deserves its own commit. Also, use the same type and the same name for both return values; "i" is too generic. ra_input()/rs_input() take an int, but I don't think we need

Re: sync root.mail

2017-04-01 Thread Jeremie Courreges-Anglas
Marc Espie <es...@nerim.net> writes: > On Thu, Mar 30, 2017 at 09:00:41PM +0200, Jeremie Courreges-Anglas wrote: >> Marc Espie <es...@nerim.net> writes: >> >> > On Wed, Mar 29, 2017 at 09:40:32PM +0200, Christian Weisgerber wrote: >> >&g

Re: usermod.8 patch

2017-03-31 Thread Jeremie Courreges-Anglas
Edgar Pettijohn writes: > usermod(8) doesn't have an option for setting defaults. Here is a patch > to correct the manual. I think the current wording is fine; no need for an option to set _default_ values. > Index: usermod.8 >

Re: sync root.mail

2017-03-30 Thread Jeremie Courreges-Anglas
Marc Espie writes: > On Wed, Mar 29, 2017 at 09:40:32PM +0200, Christian Weisgerber wrote: >> Antoine Jacoutot: >> >> > Why not just: >> > >> > # pkg_add -v rsync chromium emacs--no_x11 >> > >> > So we don't have to change it each release? >> >> Because people won't let

etherip(4) vs IPsec

2017-03-21 Thread Jeremie Courreges-Anglas
Stuart Henderson writes: > On 2017/02/13 09:54, Jason Tubnor wrote: >> Hi, >> >> Upon implementation of etherip(4) over an iked(8) connection, I had issues >> with passing etherip traffic over the connection. >> >> The -current man page states: >> >> "The sysctl(3)

Re: ip_ipip.c / gif(4) percpu counters

2017-03-09 Thread Jeremie Courreges-Anglas
Martin Pieuchot <m...@openbsd.org> writes: > On 08/03/17(Wed) 12:03, Jeremie Courreges-Anglas wrote: >> [...] >> So here's a refreshed diff that initializes the counters directly from >> ip_init(). I remove the ipip_init() wrapper to make it clear that >> ip_

etherip(4) counters tweak

2017-03-07 Thread Jeremie Courreges-Anglas
The diff below renames the members of struct etheripstat to match other *stat counters: "etherip_foo" -> "etherips_foo". It also moves them all to u_int64_t to mkae the conversion to percpu counters cleaner. https://codesearch.debian.net/search?q=etheripstat returns no match and shells/nsh

ip_ipip.c / gif(4) percpu counters

2017-03-07 Thread Jeremie Courreges-Anglas
I failed to find a nice place where to initialize the counters. The code that uses counters is reachable even if gif(4) isn't compiled in. I can think of 3 obvious ways to call the init function. 1. call ipip_init() through .pr_init. The idea would be to call ipip_init() once per protosw

Re: Fix style.9 offenders in includes

2017-03-07 Thread Jeremie Courreges-Anglas
Frederic Cambus writes: > Hi tech@, > > Here is a diff to fix style.9 offenders in includes. > > Prototypes should not have variable names associated with the types. IIRC some people just disagree with this rule. Variable names can help the developer, but can also clash with

Re: ntp_update_second - removed unused var

2017-03-06 Thread Jeremie Courreges-Anglas
David Hill writes: > Hello - > > time_t *sec is unused in ntp_update_second. > OK? ok jca@ > Index: kern/kern_tc.c > === > RCS file: /cvs/src/sys/kern/kern_tc.c,v > retrieving revision 1.30 > diff -u -p -r1.30

Re: in_pcballoc IPv6 hash

2017-03-06 Thread Jeremie Courreges-Anglas
Alexander Bluhm writes: > Hi, > > Initially all inpcb, including the IPv6 ones, are hooked into the > IPv4 hash. They cannot be used before bind(2) and then they are > rehashed and rehooked, so this is not noticed. Nevertheless I think > this is a bug and they should

Re: 61.html - document resolver(3) support for EDNS0 and DNSSEC

2017-03-06 Thread Jeremie Courreges-Anglas
I have committed a similar diff, thanks. -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE

Re: asr: support for RES_USE_DNSSEC

2017-02-27 Thread Jeremie Courreges-Anglas
"Peter J. Philipp" writes: > On Mon, Feb 27, 2017 at 10:26:48AM +0100, Peter J. Philipp wrote: >> I had a patch somewhere for TSIG as well somewhere, give me some time to >> find it. TSIG can secure the channel as well, but my implementation wasn't >> all that pretty. > > Here

Re: asr: support for RES_USE_DNSSEC

2017-02-27 Thread Jeremie Courreges-Anglas
"Peter J. Philipp" <p...@centroid.eu> writes: > On Mon, Feb 27, 2017 at 12:35:33AM +0100, Jeremie Courreges-Anglas wrote: >> Setting the AD flag for a query is possible, however those semantics are >> newer than the EDNS0 extension. As far as I know, rfc6840

Re: asr: support for RES_USE_DNSSEC

2017-02-26 Thread Jeremie Courreges-Anglas
Jeremie Courreges-Anglas <j...@wxcvbn.org> writes: > This flag is useful for software that wants to rely on the resolver to > perform DNSSEC validation. Among the use cases there are DANE and SSHFP > records, and the obvious interfaces that I think are useful are > res_mkquery

Re: asr: support for RES_USE_DNSSEC

2017-02-26 Thread Jeremie Courreges-Anglas
"Peter J. Philipp" writes: > Hi, > > I'm not the best in reading patches, so I'm going to query you. Does > your patch check for the "AD" flag from the resolver? The patch doesn't change anything here. We don't look at that flag for res_mkquery, the application is supposed

Re: asr: support for RES_USE_DNSSEC

2017-02-26 Thread Jeremie Courreges-Anglas
Eric Faurot <e...@faurot.net> writes: > On Sat, Feb 25, 2017 at 07:24:48PM +0100, Jeremie Courreges-Anglas wrote: >> Jeremie Courreges-Anglas <j...@wxcvbn.org> writes: >> >> > This flag is useful for software that wants to rely on the resolver to >> &

Re: asr: support for RES_USE_DNSSEC

2017-02-25 Thread Jeremie Courreges-Anglas
Jeremie Courreges-Anglas <j...@wxcvbn.org> writes: > This flag is useful for software that wants to rely on the resolver to > perform DNSSEC validation. Among the use cases there are DANE and SSHFP > records, and the obvious interfaces that I think are useful are > res_mkquery

asr: support for RES_USE_DNSSEC

2017-02-25 Thread Jeremie Courreges-Anglas
This flag is useful for software that wants to rely on the resolver to perform DNSSEC validation. Among the use cases there are DANE and SSHFP records, and the obvious interfaces that I think are useful are res_mkquery and getrrsetbyname. The latter still doesn't support DNSSEC, another diff

tcpdump: DNSSEC DO flag

2017-02-25 Thread Jeremie Courreges-Anglas
tcpdump-4.9.0 now prints that bit as "DO" instead of "OK". ok / objections? Index: print-domain.c === RCS file: /d/cvs/src/usr.sbin/tcpdump/print-domain.c,v retrieving revision 1.23 diff -u -p -p -u -r1.23 print-domain.c ---

Re: pflow(4) percpu counters

2017-02-21 Thread Jeremie Courreges-Anglas
Jeremie Courreges-Anglas <j...@wxcvbn.org> writes: > Florian Obser <flor...@openbsd.org> writes: > >> On Sat, Feb 18, 2017 at 06:06:01PM +0100, Jeremie Courreges-Anglas wrote: >>> >>> This one is a bit weird, the driver doesn't just increment the stat

Re: pflow(4) percpu counters

2017-02-20 Thread Jeremie Courreges-Anglas
Florian Obser <flor...@openbsd.org> writes: > On Sat, Feb 18, 2017 at 06:06:01PM +0100, Jeremie Courreges-Anglas wrote: >> >> This one is a bit weird, the driver doesn't just increment the stats but >> also uses them at runtime, hence the additional helper functio

Re: asr: slightly better error reporting for getnameinfo()

2017-02-20 Thread Jeremie Courreges-Anglas
Eric Faurot writes: > Report the errno set by getifaddrs(3) if the setup for AI_ADDRCONFIG fails, > rather than a non-informative EAI_FAIL. Compare to -1 for error detection > while here. ok jca@ -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE

Re: struct ipipstat: use 64 bits counters

2017-02-20 Thread Jeremie Courreges-Anglas
Jeremie Courreges-Anglas <j...@wxcvbn.org> writes: > Using a mix of 32 and 64 bits counters leads to an ugly conversion to > percpu counters. Why not move to 64 bits counters? struct ipipstat is > afaik only used by netstat and ports/shells/nsh (I can cook a fix for > the latt

Re: c99 initialize struct protosw

2017-02-19 Thread Jeremie Courreges-Anglas
David Hill writes: > Hello - > > This moves the 'struct protosw' declarations to use C99 initializers. > Requested by mpi@ ok jca@ Just one nit, [...] > Index: net/rtsock.c > === > RCS file:

pflow(4) percpu counters

2017-02-18 Thread Jeremie Courreges-Anglas
This one is a bit weird, the driver doesn't just increment the stats but also uses them at runtime, hence the additional helper functions. ok? Index: net/if_pflow.h === RCS file: /d/cvs/src/sys/net/if_pflow.h,v retrieving revision

asr EDNS0 support

2017-02-18 Thread Jeremie Courreges-Anglas
Seems to work fine here. We already use a 4096 bytes input buffer, the edns0 option makes libc advertize this to the DNS resolver. nsd, unbound, dig(1) and ports/net/isc-bind support this feature. I'm not suggesting that we use it by default right now, but this could be a desirable change.

pfsync(4) percpu counters

2017-02-18 Thread Jeremie Courreges-Anglas
ok? Index: net/if_pfsync.c === RCS file: /d/cvs/src/sys/net/if_pfsync.c,v retrieving revision 1.244 diff -u -p -r1.244 if_pfsync.c --- net/if_pfsync.c 29 Jan 2017 19:58:47 - 1.244 +++ net/if_pfsync.c 18 Feb 2017

carp(4) percpu counters

2017-02-18 Thread Jeremie Courreges-Anglas
ok? Index: netinet/ip_carp.c === RCS file: /d/cvs/src/sys/netinet/ip_carp.c,v retrieving revision 1.301 diff -u -p -r1.301 ip_carp.c --- netinet/ip_carp.c 29 Jan 2017 19:58:47 - 1.301 +++ netinet/ip_carp.c 18 Feb 2017

struct ipipstat: use 64 bits counters

2017-02-10 Thread Jeremie Courreges-Anglas
Using a mix of 32 and 64 bits counters leads to an ugly conversion to percpu counters. Why not move to 64 bits counters? struct ipipstat is afaik only used by netstat and ports/shells/nsh (I can cook a fix for the latter). ok? Index: sys/netinet/ip_ipip.h

Re: netcat -U -z exit status

2017-02-09 Thread Jeremie Courreges-Anglas
Alexander Bluhm writes: > Hi, > > When netcat is started with -Uz, the exit status is always 1. If > the unix connect is successful, netcat should exit with 0 and close > the socket. > > ok? Makes sense, ok. -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC

Re: rip6 and icmp6stat percpu counters

2017-02-09 Thread Jeremie Courreges-Anglas
Jeremie Courreges-Anglas <j...@wxcvbn.org> writes: > In icmp6_errcount() we could save a few function calls but I preferred > to keep the conversion as mechanical as possible. Initial diff committed. The diff below should save a few bytes. ok? In

divert(4) percpu counters

2017-02-07 Thread Jeremie Courreges-Anglas
Could someone who uses divert socket confirm that this diff works fine? ok? Index: netinet/ip_divert.c === RCS file: /d/cvs/src/sys/netinet/ip_divert.c,v retrieving revision 1.43 diff -u -p -r1.43 ip_divert.c ---

Re: tcpstat percpu counters

2017-02-06 Thread Jeremie Courreges-Anglas
Jeremie Courreges-Anglas <j...@wxcvbn.org> writes: [...] I've removed the TCPSTAT_INLINE code. If we want to experiment with inlined/not inlined counters, it is probably more interesting to make that choice elsewhere. > Anyway, tcpstat diff below, a bit ugly because that struct

rip6 and icmp6stat percpu counters

2017-02-06 Thread Jeremie Courreges-Anglas
In icmp6_errcount() we could save a few function calls but I preferred to keep the conversion as mechanical as possible. Works fine here on amd64 (I can test armv7 soon). ok? Index: netinet/icmp6.h === RCS file:

Re: netcat: IPv6 address support for proxy

2017-02-04 Thread Jeremie Courreges-Anglas
Klemens Nanni <k...@posteo.org> writes: > On Sun, Feb 05, 2017 at 12:27:19AM +0100, Jeremie Courreges-Anglas wrote: >>The colons used in IPv6 addresses conflicts with the proxy port >>specification. Do the right thing for -x ::1:8080, [::1] and >>[::1]:8080. > Wit

netcat: IPv6 address support for proxy

2017-02-04 Thread Jeremie Courreges-Anglas
The colons used in IPv6 addresses conflicts with the proxy port specification. Do the right thing for -x ::1:8080, [::1] and [::1]:8080. ok? Index: netcat.c === RCS file: /d/cvs/src/usr.bin/nc/netcat.c,v retrieving revision 1.171

Re: remove AF_UNIX SOCK_RAW "support"

2017-02-04 Thread Jeremie Courreges-Anglas
Philip Guenther writes: > It's not specified what AF_UNIX 'raw' sockets mean anyway. FreeBSD and > NetBSD have removed this entry in unixsw[], so it's clear it's not being > used in the ecosystem, so let's kill it too. > > ok? ok jca@ -- jca | PGP : 0x1524E7EE / 5135

Re: dhcpd.conf(5): "domain name" -> "hostname" for next-server option

2017-02-04 Thread Jeremie Courreges-Anglas
Jason McIntyre writes: > On Sat, Feb 04, 2017 at 06:14:35PM +, Andrew Grillet wrote: >> Hi >> >> "a name that can be looked up in the DNS" >> >> Please can this phrase be used in the man page -it is a really good >> explanation. >> > > ...but an awkward phrasing,

Re: dhcpd.conf(5): "domain name" -> "hostname" for next-server option

2017-02-04 Thread Jeremie Courreges-Anglas
Theo Buehler writes: > On Wed, Jan 11, 2017 at 09:30:15PM +0100, Theo Buehler wrote: >> The TOK_NEXT_SERVER case in parse_statement() calls >> parse_ip_addr_or_hostname(), >> so I think the next-server option wants a host name, not a domain name: > > Any takers? I previously

Re: ip6stat percpu counters

2017-02-01 Thread Jeremie Courreges-Anglas
Jeremie Courreges-Anglas <j...@wxcvbn.org> writes: > Updated diff that addresses Martin's points: > - kill IPv6 mbuf stats; don't change the ip6stat structure yet - there > are already other fields that are useless > - add ip6stat_add() > > Keep the M_COUNTERS change

Re: per cpu counters for icmp

2017-01-31 Thread Jeremie Courreges-Anglas
Jonathan Matthew writes: > This is much like the other per cpu counter conversions, except the counter > enum has gaps in it to match the arrays in struct icmpstat. I missed this mail and implemented basically the same diff. :-/ So your diff looks fine to me, the difference

tcpstat percpu counters (and kernel size growth)

2017-01-31 Thread Jeremie Courreges-Anglas
Maybe I'm comparing apples and oranges, but I got curious and compared the size of various kernels on amd64: * -current GENERIC: textdatabss dec hex 9197408 269192 684032 101506329ae2e8 * percpu tcpstat, not inlined, GENERIC: textdatabss dec hex

Re: sys/dev/uaudio.c: Fix broken links

2017-01-31 Thread Jeremie Courreges-Anglas
Michael Reed writes: I'm not sure how, but the patch got corrupted (it didn't apply with just ''patch < uaudio.diff'', there are missing newlines). Anyway, committed. Thanks, -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE

Re: ip6stat percpu counters

2017-01-31 Thread Jeremie Courreges-Anglas
Updated diff that addresses Martin's points: - kill IPv6 mbuf stats; don't change the ip6stat structure yet - there are already other fields that are useless - add ip6stat_add() Keep the M_COUNTERS change separate for now, I can send an updated diff later if needed. Additionally, - stop

Re: counters api: always use M_COUNTERS

2017-01-31 Thread Jeremie Courreges-Anglas
Jeremie Courreges-Anglas <j...@wxcvbn.org> writes: > As proposed by mpi@ in > > http://marc.info/?l=openbsd-tech=148585429014645=2 > > I think that choosing a "proper" type doesn't bring much information, > and having one parameter less makes things simpler.

Re: ip6stat percpu counters

2017-01-31 Thread Jeremie Courreges-Anglas
Martin Pieuchot <m...@openbsd.org> writes: > On 30/01/17(Mon) 22:14, Jeremie Courreges-Anglas wrote: >> Very lightly tested. I used the existing percpu counters as examples. > > I like it. > >> I don't like the hardcoding of "32" in ip6_input() but

percpu counters: replace KASSERT with CTASSERT

2017-01-30 Thread Jeremie Courreges-Anglas
CTASSERT is more useful when the result of the test is known at compile time. Build-tested on amd64 and armv7, ok? Index: net/rtsock.c === RCS file: /d/cvs/src/sys/net/rtsock.c,v retrieving revision 1.220 diff -u -p -r1.220

ip6stat percpu counters

2017-01-30 Thread Jeremie Courreges-Anglas
Very lightly tested. I used the existing percpu counters as examples. I don't like the hardcoding of "32" in ip6_input() but I am not sure how to solve it nicely; the easiest way would be to just kill those ipv6-specific mbuf stats. Would anyone miss them? Mbuf statistics:

rtwn: correct free size

2017-01-30 Thread Jeremie Courreges-Anglas
If fw_loadpage fails, the size passed to free(9) is bogus. Always pass the size returned by load_firmware instead. I hit this a few days ago, ok? Index: rtwn.c === RCS file: /d/cvs/src/sys/dev/ic/rtwn.c,v retrieving revision 1.12

armv7 stack size bump

2017-01-24 Thread Jeremie Courreges-Anglas
The following diff applies to armv7 the same stack limits as on i386. Not touching MAXDSIZ for now. Comments / ok? Index: arch/armv7/include/vmparam.h === RCS file: /d/cvs/src/sys/arch/armv7/include/vmparam.h,v retrieving revision

Re: freestanding take 2, part 2

2017-01-24 Thread Jeremie Courreges-Anglas
Mark Kettenis writes: > So here is a diff that starts using -ffreestanding on amd64 and brings > arm64 and armv7 (which are already using -ffreestanding) in line with > amd64. > > I'd like to get this in to give it some exposure before I start > converting the other

Re: document that RES_USE_EDNS0 and RES_USE_DNSSEC currently do nothing

2017-01-24 Thread Jeremie Courreges-Anglas
Jason McIntyre writes: > On Tue, Jan 24, 2017 at 09:02:46AM +0100, Kirill Miazine wrote: >> >> Let's give it another try: >> > > a little inconsistency here... we already note that edns does nothing in > resolv.conf(5) but that file makes no mention of dnssec. so i'm not

Re: document that RES_USE_EDNS0 and RES_USE_DNSSEC currently do nothing

2017-01-24 Thread Jeremie Courreges-Anglas
Kirill Miazine writes: > * Kirill Miazine [2017-01-24 08:26]: >>> Index: lib/libc/net/resolver.3 >>> === >>> RCS file: /cvs/src/lib/libc/net/resolver.3,v >>> retrieving revision 1.33 >>> diff -u -p -r1.33 resolver.3

Re: rtwn: fix iq calibration

2017-01-22 Thread Jeremie Courreges-Anglas
Stefan Sperling writes: > FreeBSD committed a couple of interesting things in r307529 > https://svnweb.freebsd.org/base?view=revision=r307529 > Unfortunately the commit is a giant patch bomb which makes > it hard to pick out individual fixes :-( > > This patch extracts what I

route monitor & RTM_IFINFO mtu

2017-01-17 Thread Jeremie Courreges-Anglas
Since setting the MTU of an interface now sends an RTM_IFINFO message, it would make sense to also print the new interface MTU in monitor mode. ok? Index: route.c === RCS file: /d/cvs/src/sbin/route/route.c,v retrieving revision

Re: ripd(8) use after free

2017-01-11 Thread Jeremie Courreges-Anglas
Jeremie Courreges-Anglas <j...@wxcvbn.org> writes: > Claudio Jeker <cje...@diehard.n-r-g.com> writes: > >> On Fri, Dec 23, 2016 at 04:16:11PM +0100, Jeremie Courreges-Anglas wrote: >>> >>> In the neighbor fsm, NBR_ACT_DEL frees the neighbor structure.

arm: remove pio.h and isa_machdep.h

2016-12-30 Thread Jeremie Courreges-Anglas
As discussed, these files aren't used and aren't useful. make build + make release are ok with this. (Well, make release is ok until COPY/usr/local/share/u-boot/am335x_boneblack/MLO/usr/mdec/am335x/MLO cp: /usr/local/share/u-boot/am335x_boneblack/MLO: No such file or directory

Re: syslogd block signals

2016-12-30 Thread Jeremie Courreges-Anglas
Alexander Bluhm writes: > On Mon, Dec 26, 2016 at 04:54:54PM -0700, Theo de Raadt wrote: >> I think programs should only block the absolutely critical things, and this >> is overreach. > > Yes, blocking SIGINT and SIGQUIT is not clever. I thought there > were races with

<    1   2   3   4   5   6   7   8   9   >