Re: Build kernels with -ffreestanding?

2016-12-27 Thread Jeremie Courreges-Anglas
Mark Kettenis writes: >> Date: Sat, 24 Dec 2016 00:08:35 +0100 (CET) >> From: Mark Kettenis >> >> We already do this on some architectures, but not on amd64 for >> example. The main reason is that this disables memcpy() optimizations >> that

Re: ripd(8) use after free

2016-12-27 Thread Jeremie Courreges-Anglas
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. But >> fields of this structure are later accessed, this is mostly v

ospf6d: remove struct rroute

2016-12-27 Thread Jeremie Courreges-Anglas
struct rroute has ben removed from ospfd some time ago. struct kroute takes an additional 'metric' field. Index: kroute.c === RCS file: /d/cvs/src/usr.sbin/ospf6d/kroute.c,v retrieving revision 1.49 diff -u -p -r1.49 kroute.c ---

Re: Remove user uucp and group news from base

2016-12-26 Thread Jeremie Courreges-Anglas
Jeremie Courreges-Anglas <j...@wxcvbn.org> writes: > The net/uucp and news/leafnode ports have been tweaked to use accounts > managed in the ports tree: > > https://www.openbsd.org/faq/current.html#r20161218 > > The uucp port no longer puts its lock files in /var/s

Remove user uucp and group news from base

2016-12-26 Thread Jeremie Courreges-Anglas
The net/uucp and news/leafnode ports have been tweaked to use accounts managed in the ports tree: https://www.openbsd.org/faq/current.html#r20161218 The uucp port no longer puts its lock files in /var/spool/lock. This means that using uucp and pppd on a serial line could lead to conflicts. I

Re: ospfd - add metric and type to print_redistribute

2016-12-23 Thread Jeremie Courreges-Anglas
Claudio Jeker writes: > On Sat, Nov 19, 2016 at 11:38:56AM +, Stuart Henderson wrote: >> On 2016/11/19 10:06, Remi Locherer wrote: >> > Hi, >> > >> > In the output of ospfd -nv I miss metric and type for the redistribute >> > statement. The below patch adds this.

ripd(8) use after free

2016-12-23 Thread Jeremie Courreges-Anglas
In the neighbor fsm, NBR_ACT_DEL frees the neighbor structure. But fields of this structure are later accessed, this is mostly visible with debug output: nbr_del: neighbor ID 10.64.55.33, peerid 3 nbr_fsm: event 'RESPONSE SENT' resulted in action 'DELETE NBR' and changing state for neighbor ID

Re: ssl: move begin hidden decls

2016-12-23 Thread Jeremie Courreges-Anglas
Patrick Wildt writes: > Hi, > > I kind of think the BEGIN should be before the static since static > is still part of the function declaration (if SHA1_ASM is not set). > Otherwise clang complains. > > Comments? ok -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC

ospf6d: handle interface MTU changes

2016-12-21 Thread Jeremie Courreges-Anglas
Hi, After ospfd here's a diff to make ospf6d refresh his view of an interface's MTU at runtime. This needs a fresh kernel. The parent should pass the IFINFO message to its children first, and then decide to react to a possible interface change. Like for ospfd, the engine runs the FSM only if

Re: ripd(8) fails on P2P links

2016-12-13 Thread Jeremie Courreges-Anglas
Piotr Durlej writes: [...] > Any thoughts? Is the patch ok, wrong, accepted, rejected or unnoticed? Your diff wouldn't apply because of mangled whitespace (please don't copy/paste diffs). Here's an updated diff below (untested). Index: packet.c

Re: dhcrelay(8): filter BOOTREPLY packets

2016-12-12 Thread Jeremie Courreges-Anglas
Rafael Zalamena writes: > This diff makes dhcrelay(8) drop packets that were not meant for us. > This is a safety check suggested by jca@ to avoid relaying packets with > the address of other relays. > > ok? ok In the commit message please mention that the most likely

Re: dhcrelay(8): clean up function prototypes

2016-12-08 Thread Jeremie Courreges-Anglas
Rafael Zalamena <rzalam...@gmail.com> writes: > On Thu, Dec 08, 2016 at 06:59:18PM +0100, Jeremie Courreges-Anglas wrote: >> Rafael Zalamena <rzalam...@gmail.com> writes: >> >> [...] >> >> >> Another problem: the relay->server code

Re: dhcrelay(8): clean up function prototypes

2016-12-08 Thread Jeremie Courreges-Anglas
Rafael Zalamena writes: [...] >> Another problem: the relay->server code uses send(2) on a connected >> socket and thus has no destination IP issue. But the relay->client path >> now uses the source address from the server->relay packet. I think >> we should keep using

Re: dhcrelay(8): clean up function prototypes

2016-12-08 Thread Jeremie Courreges-Anglas
Rafael Zalamena <rzalam...@gmail.com> writes: > On Wed, Dec 07, 2016 at 09:36:24PM +0100, Jeremie Courreges-Anglas wrote: >> Rafael Zalamena <rzalam...@gmail.com> writes: >> >> > I'm implementing some features for dhcrelay and to make them fit I need >>

Re: dhcrelay(8): simplify get_interface()

2016-12-07 Thread Jeremie Courreges-Anglas
Rafael Zalamena writes: > On Wed, Dec 07, 2016 at 05:34:05PM +0100, Rafael Zalamena wrote: >> This diff simplifies the get_interface function and makes it more >> straightforward, it also makes dhcrelay(8) throw a more informative error >> message when running layer 3 mode

Re: dhcrelay(8): clean up function prototypes

2016-12-07 Thread Jeremie Courreges-Anglas
Rafael Zalamena writes: > I'm implementing some features for dhcrelay and to make them fit I need > some clean ups in the dhcrelay(8) first. This diff changes most of the > input/output functions prototypes to take one parameter with all addresses > instead of passing

Re: mira support for iwn(4)

2016-12-06 Thread Jeremie Courreges-Anglas
Stefan Sperling writes: > On Thu, Dec 01, 2016 at 07:48:07PM +0100, Stefan Sperling wrote: >> This diff adds mira support to the iwn(4) driver. >> >> I have tested this with: >> iwn0 at pci2 dev 0 function 0 "Intel WiFi Link 5100" rev 0x00: msi, MIMO 1T2R >> When reporting test

Re: dhcrelay: BROADCAST should trigger an L2 broadcast

2016-12-06 Thread Jeremie Courreges-Anglas
Patrick Wildt writes: > Hi, > > If the BROADCAST flag is set on a BOOTREPLY, the RFC specifies that > we SHOULD forward the packet not only as L3 broadcast, but also as > L2 broadcast. Apparently that helps on older machines that can't > handle L2 unicast replies. > > ok? ok

Re: dhcrelay: allow it to work as part of a chain

2016-12-05 Thread Jeremie Courreges-Anglas
Patrick Wildt writes: > Hi, > > DHCP requests can be relayed through multiple relays. There are two parts in > the RFC that we don't oblige and thus make dhcrelay impossible to use through > multiple relays. > > The BOOTREQUEST message has a gateway ip addr attribute

Re: ospfd - handling mtu changes

2016-11-29 Thread Jeremie Courreges-Anglas
Remi Locherer <remi.loche...@relo.ch> writes: > On Sat, Nov 26, 2016 at 09:39:40AM +0100, Jeremie Courreges-Anglas wrote: >> Remi Locherer <remi.loche...@relo.ch> writes: >> >> > Hi, >> > >> > I ran into problems with mtu sizes on interfaces

Re: tcpdump ether proto lldp

2016-11-28 Thread Jeremie Courreges-Anglas
"Theo de Raadt" writes: > Why? The size of an array changes, but the ABI does not change > in a visible fashion. tcpdump uses that symbol directly: /*XXX from libbpfc.a */ extern struct eproto { char *s; u_short p; } eproto_db[]; static void

Re: tcpdump ether proto lldp

2016-11-28 Thread Jeremie Courreges-Anglas
David Gwynne writes: > this diff lets me easily ask tcpdump to show me lldp packets. > > without it i have to remember the protocol id, and i cant. > > ok? ok, but please bump the minor version. > Index: nametoaddr.c >

Re: arp(8) and ndp(8) tweak

2016-11-28 Thread Jeremie Courreges-Anglas
Martin Pieuchot writes: > vether(4) has a long name. Let's extend to output of these tools to > 80 chars to make vetherX fit in the columns. ok -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE

Re: video(1): maintain image aspect ratio

2016-11-25 Thread Jeremie Courreges-Anglas
"Dmitrij D. Czarkoff" writes: > "Dmitrij D. Czarkoff" wrote: > >>Another thing that bothered me about video(1) from Xenocara is that it >>does not maintain frame aspect ratio. The diff below adds panning to >>maintain aspect ratio after resize. >>

Re: relayd: sync proc.c and fix startup fd exhaustion

2016-11-23 Thread Jeremie Courreges-Anglas
Reyk Floeter writes: > Hi, > > relayd suffers from the same issue that has been fixed in httpd: > > The new fork+exec mode uses too many fds in the parent process on > startup, for a short time, so we needed a rlimit hack in relayd.c. > rzalamena@ has fixed proc.c and I added

Re: snmpd: listen on multiple addresses

2016-11-17 Thread Jeremie Courreges-Anglas
Reyk Floeter <r...@openbsd.org> writes: > On Thu, Nov 10, 2016 at 12:57:13AM +0100, Jeremie Courreges-Anglas wrote: >> >> The following diff adds support for listening multiple addresses (thus >> for dual-stack setups). Multiple "listen on" settings are

Re: snmpd: listen on multiple addresses

2016-11-17 Thread Jeremie Courreges-Anglas
Jeremie Courreges-Anglas <j...@wxcvbn.org> writes: > The following diff adds support for listening multiple addresses (thus > for dual-stack setups). Multiple "listen on" settings are allowed, the > default is to listen on 0.0.0.0 and :: (currently, only 0.0.0.0). >

vnconfig: VNDIOCSET: File name too long

2016-11-11 Thread Jeremie Courreges-Anglas
This error is due to the relatively small storage size available to store the path to the disk image. I see no reason to use 90 bytes only and not PATH_MAX here. Since bumping the size of the struct is an incompatible change, the kernel keeps some glue to allow old programs to work on a fresh

tedu /usr/include/ssl symlink

2016-11-09 Thread Jeremie Courreges-Anglas
tedu@ proposed suppressing that symlink a while ago. The base system had been fixed at that time, and a bulk build (thanks ajacoutot@) didn't show any fallout. https://codesearch.debian.net/ doesn't report anything that might be affected. ok? Index: include/Makefile

httpd & relayd: ip ttl / minttl

2016-11-09 Thread Jeremie Courreges-Anglas
The two options metioned in the subject work on IPv4 sockets but are invalid on IPv6 sockets. Tweak code to set different socket options when dealing with a v6 socket. ok? Index: usr.sbin/httpd/server.c === RCS file:

snmpd: listen on multiple addresses

2016-11-09 Thread Jeremie Courreges-Anglas
The following diff adds support for listening multiple addresses (thus for dual-stack setups). Multiple "listen on" settings are allowed, the default is to listen on 0.0.0.0 and :: (currently, only 0.0.0.0). A single "listen on hostname" line arbitrarily supports up to 16 addresses. It also

Re: snmpd source address

2016-11-02 Thread Jeremie Courreges-Anglas
Jeremie Courreges-Anglas <j...@wxcvbn.org> writes: > Jeremie Courreges-Anglas <j...@wxcvbn.org> writes: > >> Jeremie Courreges-Anglas <j...@wxcvbn.org> writes: >> >>> Jeremie Courreges-Anglas <j...@wxcvbn.org> writes: >>> >>>

Re: step missing from "2016/10/14" followig -current?

2016-10-30 Thread Jeremie Courreges-Anglas
Peter Hessler writes: > On 2016 Oct 30 (Sun) at 12:28:36 +0100 (+0100), Ingo Schwarze wrote: > :> Everybody would have had, had it been included in /etc/skel/.cvsrc :^) > :> Worth adding? > : > :I (mildly) oppose that. Providing customization files by default > :is an

Re: iwn: stop forcing RTS for all frames in 11n mode

2016-10-28 Thread Jeremie Courreges-Anglas
Stefan Sperling writes: > This is similar to a recent change in iwm, but it only affects 11n mode > in this driver. > > The condition being removed below was added by me before the RTS threshold > was enabled in net80211. So now we should not need it anymore and removing > it

Re: snmpd(8): teach how to fork+exec

2016-10-28 Thread Jeremie Courreges-Anglas
Rafael Zalamena <rzalam...@gmail.com> writes: > On Sat, Oct 22, 2016 at 10:32:27PM +0200, Rafael Zalamena wrote: >> On Sat, Oct 22, 2016 at 08:14:16PM +0200, Jeremie Courreges-Anglas wrote: >> > Rafael Zalamena <rzalam...@gmail.com> writes: >> > > On Fri,

Re: snmpd(8): turn snmpd_env the only global

2016-10-27 Thread Jeremie Courreges-Anglas
Rafael Zalamena writes: > This diff removes all "extern struct snmpd *" lines from source files, > replaces all 'env' occurences with 'snmpd_env' and adds the extern > declaration for snmpd_env in the snmpd.h header. > > With this diff we only need to guarantee that this

Re: pstat -d fix

2016-10-22 Thread Jeremie Courreges-Anglas
Mark Kettenis writes: > If there is no modifier, we should not go down the "longformat" path. > The amount of breakage is somewhat ABI-dependent, but on armv7 > >pstat -d x ticks > > would print stack garbage. > > ok? ok > > Index: pstat.c >

Re: snmpd(8): teach how to fork+exec

2016-10-22 Thread Jeremie Courreges-Anglas
Rafael Zalamena <rzalam...@gmail.com> writes: > On Fri, Oct 21, 2016 at 01:26:36PM +0200, Jeremie Courreges-Anglas wrote: >> Rafael Zalamena <rzalam...@gmail.com> writes: >> > On Fri, Oct 14, 2016 at 06:47:09PM +0200, Rafael Zalamena wrote: >> >> On Mon

Re: security(8) doesn't know about mailbox locks

2016-10-22 Thread Jeremie Courreges-Anglas
Ingo Schwarze writes: > Hi, > > Philippe Meunier wrote on Fri, Oct 21, 2016 at 12:35:46PM -0400: > >> When cron runs /etc/daily, that script runs df and netstat and the >> output is sent by email to root. On my system, emails to root are >> forwarded to local user meunier

Re: fix ILP32 switch(4) build

2016-10-21 Thread Jeremie Courreges-Anglas
Jonathan Gray writes: > /usr/src/sys/net/switchofp.c: In function 'swofp_ox_cmp_ether_addr': > /usr/src/sys/net/switchofp.c:1758: warning: integer constant is too large for > 'long' type > /usr/src/sys/net/switchofp.c: In function 'swofp_ox_match_ether_addr': >

Re: snmpd source address

2016-10-21 Thread Jeremie Courreges-Anglas
Jeremie Courreges-Anglas <j...@wxcvbn.org> writes: > Jeremie Courreges-Anglas <j...@wxcvbn.org> writes: > >> Jeremie Courreges-Anglas <j...@wxcvbn.org> writes: >> >>> j...@wxcvbn.org (Jeremie Courreges-Anglas) writes: >>> >>>>

Re: snmpd(8): teach how to fork+exec

2016-10-21 Thread Jeremie Courreges-Anglas
Rafael Zalamena writes: > On Fri, Oct 14, 2016 at 06:47:09PM +0200, Rafael Zalamena wrote: >> On Mon, Sep 26, 2016 at 03:45:59PM +0200, Rafael Zalamena wrote: >> > Lets teach snmpd(8) how to fork+exec using the proc.c file from the latest >> > switchd(8) diff. >> > >> >

Re: minor diff for ldapd.conf.5

2016-10-17 Thread Jeremie Courreges-Anglas
Rob Pierce writes: > Fix a couple of grammar mistakes, remove a redundant word, and add a FILES > reference for the /etc/ldap/certs directory. Committed, thanks. I adjusted the FILES entries so that ldapd.conf is still listed first, and so that the description of /etc/ldap/certs

Re: landisk: simply asid lookup

2016-10-17 Thread Jeremie Courreges-Anglas
Philip Guenther writes: > It used to be that access to a process's vmspace (and thus its pmap where > the ASID can be found) was only via a thread's p_vmspace member. Now that > the process itself has a copy of that, the loops in the sh code that > iterated across threads

Fix bpf_catchpacket comment

2016-10-12 Thread Jeremie Courreges-Anglas
This function doesn't return whether listeners should be woken up, it calls bpf_wakeup as needed. ok? Index: bpf.c === RCS file: /d/cvs/src/sys/net/bpf.c,v retrieving revision 1.149 diff -u -p -p -u -r1.149 bpf.c --- bpf.c

Document ripd/ripctl -s

2016-10-12 Thread Jeremie Courreges-Anglas
As noted by Sebastien Leclerc in http://marc.info/?l=openbsd-bugs=147560563030465=2 Copied almost verbatim from ospfd/ospfctl. ok? Index: usr.sbin/ripctl/ripctl.8 === RCS file: /d/cvs/src/usr.sbin/ripctl/ripctl.8,v retrieving

Re: crontab(5): document -q flag in command

2016-10-12 Thread Jeremie Courreges-Anglas
Wouter Clarie writes: > The -q flag for the command in a crontab(5) entry was introduced in revision > 1.8 of src/usr.sbin/cron/entry.c back in 2001, but never documented. Good catch. > (Sorry, I'm no hero with mdoc, so not sure if the markup is correct.) I'm no mdoc here

Re: enforce zero options

2016-10-12 Thread Jeremie Courreges-Anglas
Jan Stary writes: > Some programs in bin/ and usr.bin/ use the following idiom > to make sure that there are no options present: > > while ((ch = getopt(argc, argv, "")) != -1) > switch (ch) { > case '?': > default: >

Re: let head(1) understand `-' as stdin

2016-10-12 Thread Jeremie Courreges-Anglas
Ingo Schwarze writes: > Hi, > > Theo de Raadt wrote on Tue, Oct 11, 2016 at 01:35:34PM -0600: >> jca@ wrote: >>> Jan Stary writes: > The diff below makes head(1) recognize `-' as a name for the standard input, as many other utilities do. > >>>

Re: libpcap: pcap_set_immediate_mode

2016-10-11 Thread Jeremie Courreges-Anglas
Lawrence Teo writes: > This imports pcap_set_immediate_mode() from mainline libpcap, which allows > a libpcap-based program to process packets as soon as they arrive. > > ok? Looks fine to me, ok jca@ -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524

Re: snmpd source address

2016-10-07 Thread Jeremie Courreges-Anglas
Jeremie Courreges-Anglas <j...@wxcvbn.org> writes: > Jeremie Courreges-Anglas <j...@wxcvbn.org> writes: > >> j...@wxcvbn.org (Jeremie Courreges-Anglas) writes: >> >>> SNMP uses UDP and snmpd listens on a single address. This means that >>

Re: Fix kbd -l

2016-09-30 Thread Jeremie Courreges-Anglas
Mark Kettenis writes: [...] >> > - for (i = 0; kbdenc_tab[i].value; i++) >> > - printf("%s\n", kbdenc_tab[i].name); >> > + for (i = 0; i < encs->nencodings; i++) { >> > + n = _tab[0]; >> > + found = 0; >> > + encoding =

Re: snmpd source address

2016-09-30 Thread Jeremie Courreges-Anglas
Jeremie Courreges-Anglas <j...@wxcvbn.org> writes: > j...@wxcvbn.org (Jeremie Courreges-Anglas) writes: > >> SNMP uses UDP and snmpd listens on a single address. This means that >> you can have issues with the source address of the replies sent by >> snmpd.

Re: snmpd source address

2016-09-30 Thread Jeremie Courreges-Anglas
j...@wxcvbn.org (Jeremie Courreges-Anglas) writes: > SNMP uses UDP and snmpd listens on a single address. This means that > you can have issues with the source address of the replies sent by > snmpd. "listen on $loopback_address": > > http://marc.info/?l=openb

/etc/rc handling of kern.securelevel=2 (was: rc.securelevel example)

2016-09-30 Thread Jeremie Courreges-Anglas
j...@wxcvbn.org (Jeremie Courreges-Anglas) writes: > Looks like it's not completely obvious how to set a custom securelevel, > at least one user went the /etc/sysctl.conf way, which has the nasty > side-effect of preventing the use of /etc/pf.conf. > > Should we add more belts

Re: Fix kbd -l

2016-09-30 Thread Jeremie Courreges-Anglas
Mark Kettenis writes: >> Date: Thu, 29 Sep 2016 14:19:43 +0200 (CEST) >> From: Mark Kettenis >> >> This diff adds a WSKBDIO_GETENCODINGS ioctl and uses it to print a >> list of supported encodings like the old kvm groveling code did. The >>

Re: read(2) on directories

2016-09-30 Thread Jeremie Courreges-Anglas
"Theo de Raadt" <dera...@openbsd.org> writes: >> On 2016-09-26, Jeremie Courreges-Anglas <j...@wxcvbn.org> wrote: >> >> >>> So I think that we agree that EISDIR is more useful, and seems safe from >> >>> a portability POV. I've b

snmpd source address

2016-09-28 Thread Jeremie Courreges-Anglas
SNMP uses UDP and snmpd listens on a single address. This means that you can have issues with the source address of the replies sent by snmpd. "listen on $loopback_address": http://marc.info/?l=openbsd-misc=147445870822415=2 seems to be unsufficient, but I don't understand why it would

Re: Remove empty #ifdef and #ifndef blocks

2016-09-27 Thread Jeremie Courreges-Anglas
Frederic Cambus writes: > Hi tech@, > > It seems some #ifdef and #ifndef blocks are no longer necessary. > > Comments? OK? Sure. Another one below, here since rev 1.1 Index: msdosfs_vfsops.c === RCS file:

Re: hide RT_TABLEID_MAX behind __BSD_VISIBLE

2016-09-26 Thread Jeremie Courreges-Anglas
Mark Kettenis <mark.kette...@xs4all.nl> writes: >> From: j...@wxcvbn.org (Jeremie Courreges-Anglas) >> Date: Mon, 26 Sep 2016 21:13:24 +0200 >> >> AFAIK this is not a standard define, so it should be unconditionally >> reachable. mkr went fine. >>

hide RT_TABLEID_MAX behind __BSD_VISIBLE

2016-09-26 Thread Jeremie Courreges-Anglas
AFAIK this is not a standard define, so it should be unconditionally reachable. mkr went fine. Thoughts? Index: socket.h === RCS file: /cvs/src/sys/sys/socket.h,v retrieving revision 1.91 diff -u -p -p -u -r1.91 socket.h ---

iked recvfromto flags

2016-09-26 Thread Jeremie Courreges-Anglas
Don't ignore the "flags" argument passed to recvfromto. Doesn't matter for now in iked (0 is passed), but this kind of code tends to be copied. ok? Index: util.c === RCS file: /cvs/src/sbin/iked/util.c,v retrieving revision 1.31

Re: read(2) on directories

2016-09-26 Thread Jeremie Courreges-Anglas
j...@wxcvbn.org (Jeremie Courreges-Anglas) writes: > j...@wxcvbn.org (Jeremie Courreges-Anglas) writes: > >> "Todd C. Miller" <todd.mil...@courtesan.com> writes: >> >>> From source inspection, Net and Free appear to allow read(2) of >>> dirs to

Re: make rdaemon less error-prone

2016-09-24 Thread Jeremie Courreges-Anglas
j...@wxcvbn.org (Jeremie Courreges-Anglas) writes: > Simple idiom: always initialize the pre-opened fd to -1, and within > rdaemon() test whether the passed fd is valid. > > ok? Updated diff after Theo suggested avoiding the fcntl call if possible. Index: usr.sbin/rta

Re: clang: kern/vfs_subr.c

2016-09-24 Thread Jeremie Courreges-Anglas
Mark Kettenis writes: > Finally a case where clang isn't entirely helpful. Because vp->v_tag > is an enum, clang thinks its value can't be bigger than 15 and that > the vp->v_tag >= nitems(vtags) check is therefore always false. But I > think we want to prevent an

Re: clang: dev/acpi/dsdt.c and dev/i2c/iatp.c

2016-09-24 Thread Jeremie Courreges-Anglas
Mark Kettenis writes: > In both cases we're comparing an array to NULL. > > Note that in dev/acpi/dsdt.c I changed the strcmp() condition to == 0; > using ! for string pointer comparison always confuses me. I can drop > that change if people consider it controversial.

Re: clang: warning fix for vmt.c

2016-09-24 Thread Jeremie Courreges-Anglas
Mark Kettenis writes: > Using a variable for the format string isn't a godd idea. > > ok? ok jca@ > > Index: dev/pv/vmt.c > === > RCS file: /cvs/src/sys/dev/pv/vmt.c,v > retrieving revision 1.9 > diff -u

Re: clang dev/pv/hyperv.c

2016-09-24 Thread Jeremie Courreges-Anglas
Mark Kettenis writes: > Another obvious mistake caught by clang. > > ok? ok jca@ > > Index: dev/pv/hyperv.c > === > RCS file: /cvs/src/sys/dev/pv/hyperv.c,v > retrieving revision 1.16 > diff -u -p -r1.16

rc.securelevel example

2016-09-24 Thread Jeremie Courreges-Anglas
Looks like it's not completely obvious how to set a custom securelevel, at least one user went the /etc/sysctl.conf way, which has the nasty side-effect of preventing the use of /etc/pf.conf. Should we add more belts and suspenders? Index: rc

make rdaemon less error-prone

2016-09-24 Thread Jeremie Courreges-Anglas
Simple idiom: always initialize the pre-opened fd to -1, and within rdaemon() test whether the passed fd is valid. ok? Index: usr.sbin/dhcrelay/dhcrelay.c === RCS file: /cvs/src/usr.sbin/dhcrelay/dhcrelay.c,v retrieving revision

Re: Remove more duplicated includes

2016-09-23 Thread Jeremie Courreges-Anglas
Frederic Cambus writes: > Hi tech@, > > A few remaining duplicated includes to remove. > > Comments? OK? ok except for ixgbe.h > Index: sys/arch/sparc64/include/asm.h > === > RCS file:

Re: rtadvd: no need for float defines

2016-09-21 Thread Jeremie Courreges-Anglas
Florian Obser writes: > OK? ok jca@, I don't think that the opposite direction (fully handling those values as floats) is worth the trouble. -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE

Re: rtadvd: consistently use MAX_ prefix

2016-09-21 Thread Jeremie Courreges-Anglas
Florian Obser writes: > OK? Looks better, but are still discrepancies (eg MAX_ROUTERLIFETIME vs. MAX_ROUTER_LIFETIME). I don't think we care much, though... ok jca@ $ grep -e MIN -e MAX rtadvd.h #define DEF_MAXRTRADVINTERVAL 600 #define MAX_ROUTERLIFETIME 9000 #define

Re: alignment error rtadvd/armv7

2016-09-21 Thread Jeremie Courreges-Anglas
Martin Brandenburg <mar...@martinbrandenburg.com> writes: > On Sun, 18 Sep 2016, Jeremie Courreges-Anglas wrote: > >> Martin Brandenburg <mar...@martinbrandenburg.com> writes: >> >> > On a PandaBoard (armv7) running -current, when I run rtadvd, it cras

Re: video(1): Don't limit maximum frame size to display size

2016-09-18 Thread Jeremie Courreges-Anglas
Gregor Best writes: > Hi, > > this is another patch to video(1). It removes the logic that forces the > video grab frame size to be <= the size of the Xv adaptor. This allows > me to grab and view frames that are 1280x1024 on my 1440x900 screen. Xv > properly scales and

Re: binutils-2.17 ownership fixes

2016-09-15 Thread Jeremie Courreges-Anglas
Theo Buehler writes: > On Sat, Sep 10, 2016 at 07:01:20PM -0700, Philip Guenther wrote: >> On Sat, 10 Sep 2016, Philip Guenther wrote: >> > Same diff as binutils, with same open question: >> > >> > > Maybe we should add ${INSTALL_STRIP} to the INSTALL_PROGRAM assignment >> >

Re: video(1): Use read(2) to read file specified with -i

2016-09-15 Thread Jeremie Courreges-Anglas
Gregor Best writes: > Hi, Hi, > video(1) fails to read files that were previously recorded with -o > somefile, unless -g (to select read(2) as the input method) is also > specified: > >$ video -o foo >^C >$ video -i foo >video: ioctl VIDIOC_REQBUFS: Bad file

Remove ip6_pcbopts

2016-09-14 Thread Jeremie Courreges-Anglas
Dead since the IPV6_PKTOPTIONS socket option was removed. ok? Index: ip6_output.c === RCS file: /cvs/src/sys/netinet6/ip6_output.c,v retrieving revision 1.214 diff -u -p -r1.214 ip6_output.c --- ip6_output.c14 Sep 2016

Re: netinet6 bcopy->memcpy

2016-09-13 Thread Jeremie Courreges-Anglas
David Hill writes: > Hello - > > Here is a diff to switch some bcopy's to memcpy's. > > Most bcopy's are on freshly alloc'd memory. Looks fine to me, ok jca@ -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE

ip6_setpktopt: dead code & param

2016-09-13 Thread Jeremie Courreges-Anglas
Since it has been introduced, ip6_setpktopt has only been called with (sticky=1, cmsg=0) or (sticky=0, cmsg=1). Let's simplify this code. Index: ip6_output.c === RCS file: /cvs/src/sys/netinet6/ip6_output.c,v retrieving revision

Re: look(1): eliminate FOLD and DICT macros

2016-09-13 Thread Jeremie Courreges-Anglas
"Todd C. Miller" writes: > There's no need to check for isascii() with ANSI ctype macros/functions. > Eliminating the macros makes the code clearer. ok jca@ -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE

date(1): fix description for -a

2016-09-12 Thread Jeremie Courreges-Anglas
It seems that date(1) used to have support for timed(8), this support has been removed in 2011. Let's remove a confusing reference to "remote time". ok? Index: date.1 === RCS file: /cvs/src/bin/date/date.1,v retrieving revision

Re: Improve error message in rcctl(8)

2016-09-06 Thread Jeremie Courreges-Anglas
li...@wrant.com writes: > Tue, 6 Sep 2016 19:54:33 + Robert Peichaer >> > Hi tech@, >> > >> > Daemon names historically match Antoine's alphanumeric proposal, and I >> > think underscore is a bit too much, if it's present use minus instead. >> > The logic behind this?

Re: Make rc scripts use [[ instead of [

2016-09-05 Thread Jeremie Courreges-Anglas
Hi, Anthony Coulter writes: > Some of the system scripts make inconsistent use of ksh-specific > features, specifically "print" and "[[" as efficient replacements for > "echo" and "[". This change makes the /etc/ksh.kshrc and all the rc > scripts use "print" and "[["

Use rdaemon() in ftp-proxy

2016-09-04 Thread Jeremie Courreges-Anglas
Similar diff for ftp-proxy: we can return a proper exit status if we can't drop privs (eg missing _ftp_proxy user). Index: ftp-proxy.c === RCS file: /cvs/src/usr.sbin/ftp-proxy/ftp-proxy.c,v retrieving revision 1.34 diff -u -p -p

Use rdaemon() in dhclient

2016-09-04 Thread Jeremie Courreges-Anglas
dhclient already uses the same pattern as rdaemon(), let's sync the implementation. No functional change intended, the extra safety check for devnull > 2 is a bonus. Index: dhclient.c === RCS file:

Use rdaemon() in dhcrelay

2016-09-04 Thread Jeremie Courreges-Anglas
(Needs a fresh dhcrelay.c) Using rdaemon(), we can delay going in the background 'til very late, that is after the chroot. Thanks to this we can catch errors like a missing _dhcp user or /var/empty directory, by returning a proper exit status. (Also, thanks to the log_perror approach in

rdaemon() in rtadvd

2016-09-03 Thread Jeremie Courreges-Anglas
rdaemon allows us to go in the background, saving stderr error messages and exit status for a longer interval in the startup step. Thoughts? Index: rtadvd.c === RCS file: /cvs/src/usr.sbin/rtadvd/rtadvd.c,v retrieving revision

Re: handle .cpp files in make depend

2016-09-03 Thread Jeremie Courreges-Anglas
Patrick Wildt writes: > Hi, > > the LLVM project apparently uses the .cpp extension for all their C++ > files. We already handle .cpp in sys.mk, but make depend does not > handle .cpp at all. This means that on "make depend" no .depend file > will be generated if there are

Re: Let iked specify its source address when sending

2016-09-03 Thread Jeremie Courreges-Anglas
Vincent Gross writes: > On Wed, 31 Aug 2016 15:26:53 +0200 > Vincent Gross wrote: > >> On Thu, 11 Aug 2016 16:57:27 +0100 >> Stuart Henderson wrote: >> >> > On 2016/06/27 13:00, Jérémie Courrèges-Anglas wrote: >> [...] >> > >

ftpd and IPv6 traffic class

2016-08-31 Thread Jeremie Courreges-Anglas
Like in nc(1) IPTOS_* (supposedly IPv4) values are used for the IPv6 path. That's not a concern in practice. Index: ftpd.c === RCS file: /cvs/src/libexec/ftpd/ftpd.c,v retrieving revision 1.221 diff -u -p -p -u -r1.221 ftpd.c ---

Re: ifconfig setinstance -> setrdomain

2016-08-31 Thread Jeremie Courreges-Anglas
Stefan Sperling writes: > 'instance' is the name of an ifconfig subcommand related to ifmedia > so the name of the setinstance() function is slightly confusing. ok -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE

Re: RSSI values

2016-08-31 Thread Jeremie Courreges-Anglas
Stefan Sperling writes: > ifconfig scan displays RSSI (received signal strength indicator) values. > > If the driver sets ic->ic_max_rssi the value is displayed as a percentage > of ic_max_rssi. Otherwise ifconfig displays the value as dBm. > > The problem in the dBm case is that

Re: remove ifdef from ftpd

2016-08-31 Thread Jeremie Courreges-Anglas
"Ted Unangst" <t...@tedunangst.com> writes: > Jeremie Courreges-Anglas wrote: >> I think that's a better choice. >> >> > >> >> >> >> > -#else >> >> > - while (fgets(line, sizeof(lin

Re: Estonian keymap

2016-08-30 Thread Jeremie Courreges-Anglas
Hi, > Updated Estonian keymap patch for current. Original from 2005 at > http://marc.info/?l=openbsd-tech=112873075504474 The tabs in your diff seem to have suffered from copy/paste (maybe your MUA is at fault). As is, the diff doesn't apply. -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293

Re: 'struct route' and syncache

2016-08-30 Thread Jeremie Courreges-Anglas
Martin Pieuchot writes: > Use 'sc_route{4,6}' directly instead of casting to the almost extinct > 'struct route *'. This help fixing remaining use of 'struct route'. > > ok? ok -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE

Re: rtadvd.conf(5) pinfoflags - bad example

2016-08-25 Thread Jeremie Courreges-Anglas
Stuart Henderson writes: > I don't see any code to support setting pinfoflags from a string, > it looks like it must be numeric. > > OK? yup > (If someone wants to add string support sometime that would be > nice, but let's fix the example in the first case). Someone(tm)

Re: pax: stop getting mode via strcmp(argv0)

2016-08-23 Thread Jeremie Courreges-Anglas
Philip Guenther writes: > pax, tar, and cpio are one binary that changes behavior based on the last > component of argv[0]. Lots of shared code, so sure, but I find the > strcmp() tests in the main code overly complex and perhaps an affront to > clear style. (It's _not_

Re: ip_icmp reference fix

2016-08-22 Thread Jeremie Courreges-Anglas
Martin Pieuchot writes: > When it comes to reference counting in the receiving path, route entries > act as proxy for interface addresses. In other words you CANNOT > dereference ``rt->rt_ifa'' after calling rtfree(9). > > Diff below fixes that in icmp_reflect(), ok? ok jca@

Re: Do not use 'struct route_in6'

2016-08-22 Thread Jeremie Courreges-Anglas
Martin Pieuchot writes: > I'd like to implement a route caching mechanism that works with PF state > keys and always pick newest more specific route when available. > > In order to do so I need to get rid of the 'struct route'. The problem > of the 'struct route' is that you

<    2   3   4   5   6   7   8   9   >