openbsd
9 years agoit is perhaps better style to not call close() on -1, even if harmless
tedu [Thu, 15 Oct 2015 22:21:28 +0000 (22:21 +0000)]
it is perhaps better style to not call close() on -1, even if harmless

9 years agomake sure req is zeroed in tcp case
tedu [Thu, 15 Oct 2015 22:17:43 +0000 (22:17 +0000)]
make sure req is zeroed in tcp case

9 years agobetter memory handling of the request/cache chain
tedu [Thu, 15 Oct 2015 22:12:26 +0000 (22:12 +0000)]
better memory handling of the request/cache chain

9 years agodo not insert entry into cache until it's fully formed
tedu [Thu, 15 Oct 2015 21:59:54 +0000 (21:59 +0000)]
do not insert entry into cache until it's fully formed

9 years agodoh, not all requests are the same size. check len first.
tedu [Thu, 15 Oct 2015 21:56:52 +0000 (21:56 +0000)]
doh, not all requests are the same size. check len first.

9 years agoassert is the wrong tool
tedu [Thu, 15 Oct 2015 21:39:15 +0000 (21:39 +0000)]
assert is the wrong tool

9 years agothe inet sockets don't work well with inet6 addrs. pick family from addr.
tedu [Thu, 15 Oct 2015 21:35:27 +0000 (21:35 +0000)]
the inet sockets don't work well with inet6 addrs. pick family from addr.
detected by naddy

9 years agoeverybody can build rebound
tedu [Thu, 15 Oct 2015 21:27:37 +0000 (21:27 +0000)]
everybody can build rebound

9 years agono mail for _rebound. deraadt
tedu [Thu, 15 Oct 2015 21:25:44 +0000 (21:25 +0000)]
no mail for _rebound. deraadt

9 years agointroduce logerr, since most logging is followed by exit
tedu [Thu, 15 Oct 2015 21:25:05 +0000 (21:25 +0000)]
introduce logerr, since most logging is followed by exit

9 years agodon't allow NSD to pick up libevent from /usr/local if the libevent2
sthen [Thu, 15 Oct 2015 21:22:11 +0000 (21:22 +0000)]
don't allow NSD to pick up libevent from /usr/local if the libevent2
package is installed.

9 years agonow with _rebound user, we can try a little harder at privdrop
tedu [Thu, 15 Oct 2015 21:20:09 +0000 (21:20 +0000)]
now with _rebound user, we can try a little harder at privdrop

9 years ago_rebound user and group (52)
tedu [Thu, 15 Oct 2015 21:19:06 +0000 (21:19 +0000)]
_rebound user and group (52)

9 years agomake the HUP interlocking in the parent work better.
tedu [Thu, 15 Oct 2015 20:58:14 +0000 (20:58 +0000)]
make the HUP interlocking in the parent work better.

9 years agotrivial KNF
deraadt [Thu, 15 Oct 2015 20:47:11 +0000 (20:47 +0000)]
trivial KNF

9 years agoIn syslogd replace the dprintf() macro with a logdebug() function
bluhm [Thu, 15 Oct 2015 20:26:47 +0000 (20:26 +0000)]
In syslogd replace the dprintf() macro with a logdebug() function
as dprintf(3) is in libc now and does something different.
OK guenther@

9 years agoPledge login_token with "stdio rpath wpath cpath fattr getpw tty".
bluhm [Thu, 15 Oct 2015 20:14:23 +0000 (20:14 +0000)]
Pledge login_token with "stdio rpath wpath cpath fattr getpw tty".
OK deraadt@

9 years agojust a space in usage, from deraadt
tedu [Thu, 15 Oct 2015 20:13:57 +0000 (20:13 +0000)]
just a space in usage, from deraadt

9 years agoRemove an unused included header (sys/stat.h).
mmcc [Thu, 15 Oct 2015 20:01:53 +0000 (20:01 +0000)]
Remove an unused included header (sys/stat.h).

9 years agoadd a hint about the config file, until it changes
tedu [Thu, 15 Oct 2015 19:51:45 +0000 (19:51 +0000)]
add a hint about the config file, until it changes

9 years agochild can be pledged down a bit to just sockets and io
tedu [Thu, 15 Oct 2015 19:49:22 +0000 (19:49 +0000)]
child can be pledged down a bit to just sockets and io

9 years agoWhen using a pf rule with both nat-to and rdr-to, it could happen
bluhm [Thu, 15 Oct 2015 19:48:44 +0000 (19:48 +0000)]
When using a pf rule with both nat-to and rdr-to, it could happen
that the nated source port was reused as destination port.  Do not
initialize nport at the beginning of the function, but where it is
needed.
OK sashan@

9 years agoimport rebound, a lightweight dns proxy, for further polishing
tedu [Thu, 15 Oct 2015 19:43:30 +0000 (19:43 +0000)]
import rebound, a lightweight dns proxy, for further polishing

9 years agoIntroduce an unsigned char variable for the ctype function calls.
mmcc [Thu, 15 Oct 2015 19:36:50 +0000 (19:36 +0000)]
Introduce an unsigned char variable for the ctype function calls.

ok millert@

9 years agoDon't Xr flock, since that is not the locking method used.
deraadt [Thu, 15 Oct 2015 19:35:24 +0000 (19:35 +0000)]
Don't Xr flock, since that is not the locking method used.
ok millert

9 years agoRemove disklabel -B (NUMBOOT) support. All the platforms which used to need
miod [Thu, 15 Oct 2015 19:31:15 +0000 (19:31 +0000)]
Remove disklabel -B (NUMBOOT) support. All the platforms which used to need
it are now using MI installboot for that purpose.

ok krw@ deraadt@

9 years agoAvoid a race between fopen(3) and fchmod(2). Use umask(2) and
bluhm [Thu, 15 Oct 2015 19:30:03 +0000 (19:30 +0000)]
Avoid a race between fopen(3) and fchmod(2).  Use umask(2) and
unlink(2) and fopen(3) to prevent an attacker to open an old file
with wrong permissions before the secret is written into it.  This
also guarantees that a new file with correct permissions is created.
Without fchmod(2) "fattr" can be removed from pledge.
with and OK deraadt@

9 years agoNo need to create links for xxboot now that MI installboot is the preferred
miod [Thu, 15 Oct 2015 19:29:32 +0000 (19:29 +0000)]
No need to create links for xxboot now that MI installboot is the preferred
way to install boot blocks.

9 years agoUse MI installboot instead of disklabel -B to install boot blocks.
miod [Thu, 15 Oct 2015 19:28:31 +0000 (19:28 +0000)]
Use MI installboot instead of disklabel -B to install boot blocks.
ok krw@ deraadt@

9 years agoAdd an extra argument to bootstrap() to allow for a limited overlap between an
miod [Thu, 15 Oct 2015 19:27:30 +0000 (19:27 +0000)]
Add an extra argument to bootstrap() to allow for a limited overlap between an
existing partition and the boot blocks span, and update all callers to require
an overlap limit of zero sectors (thus not changing their behaviour).

Then, add proper support for vax: copy the 2nd-stage boot block to /boot and
install the 1st-stage boot block at the beginning of the disk, retaining the
disklabel; allow for an overlap of up to 16 sectors, which is perfectly fine
as long as your `a' partition is FFS.

Note that regular installs will not even have such an overlap, because the
default OpenBSD span on a disk on vax starts at sector 16, but installation
media use sperific layout which require this.

ok krw@

9 years agoadd missing comma and missing range restriction, found by smilint
sthen [Thu, 15 Oct 2015 19:18:01 +0000 (19:18 +0000)]
add missing comma and missing range restriction, found by smilint

9 years agorelaydMIBObjects, not relaydMIBOjbects. From Rob Pierce.
sthen [Thu, 15 Oct 2015 19:15:02 +0000 (19:15 +0000)]
relaydMIBObjects, not relaydMIBOjbects. From Rob Pierce.

9 years agoRemove some unnecessary NULL-checks before free(). Change two bzero()
mmcc [Thu, 15 Oct 2015 18:40:38 +0000 (18:40 +0000)]
Remove some unnecessary NULL-checks before free(). Change two bzero()
calls on pf data to explicit_bzero().

ok mikeb@

9 years agoAdd TIOCFLUSH to "tty" in support of tcflush()
deraadt [Thu, 15 Oct 2015 17:55:41 +0000 (17:55 +0000)]
Add TIOCFLUSH to "tty" in support of tcflush()

9 years agoExposing FIOASYNC in pledge "ioctl" is a mistake; remove it, cannot find safe uses...
deraadt [Thu, 15 Oct 2015 17:50:05 +0000 (17:50 +0000)]
Exposing FIOASYNC in pledge "ioctl" is a mistake; remove it, cannot find safe uses of it

9 years agoPlegde x99token with "stdio rpath wpath cpath fattr getpw tty".
bluhm [Thu, 15 Oct 2015 17:23:09 +0000 (17:23 +0000)]
Plegde x99token with "stdio rpath wpath cpath fattr getpw tty".
with and OK deraadt@

9 years agoHandle F_ISATTY in the fcntl() stub as well
deraadt [Thu, 15 Oct 2015 16:38:04 +0000 (16:38 +0000)]
Handle F_ISATTY in the fcntl() stub as well
ok guenther

9 years agoremove '!' (subshell) and 'v' (edit) commands from ramdisk more(1) command.
deraadt [Thu, 15 Oct 2015 16:10:57 +0000 (16:10 +0000)]
remove '!' (subshell) and 'v' (edit) commands from ramdisk more(1) command.
first off, ^Z job control was added to BSD unix sometime around 1980 and is
a much better mechanism since the parent shell can contain what is going on.
!command support becomes a visible defect when programs are pledge'd
secondly this saves space.
ok miod tobias

9 years agocorrects pledge code for fsck_ffs and fsck_ext2fs
semarie [Thu, 15 Oct 2015 15:11:10 +0000 (15:11 +0000)]
corrects pledge code for fsck_ffs and fsck_ext2fs

on filesystem error, fsck will try to display username of inode, resulting need
of "getpw" for not SMALL version.

add a missed (?) -DSMALL in distrib/special/ for fsck_ffs and fsck_ext2fs

found by hard way by ajacoutot@

OK millert@

9 years agoLet the rx path of cnmac run without the kernel lock. To avoid the need
visa [Thu, 15 Oct 2015 14:06:04 +0000 (14:06 +0000)]
Let the rx path of cnmac run without the kernel lock. To avoid the need
of a mutex, the path no longer cleans up the queue of tx requests.

ok mpi@

9 years agoFix previous. The port number is not included in sc_src and it is
yasuoka [Thu, 15 Oct 2015 13:59:21 +0000 (13:59 +0000)]
Fix previous.  The port number is not included in sc_src and it is
checked already at beginning of the loop.

ok reyk

9 years agoin6_pcbconnect() returns EADDRNOTAVAIL when
vgross [Thu, 15 Oct 2015 10:27:18 +0000 (10:27 +0000)]
in6_pcbconnect() returns EADDRNOTAVAIL when
all the ports in the range portfirst .. portlast
are in use.

ok millert@, mpi@

9 years agoiobuf_queue() should return the number of bytes it queued on success, not 0
gilles [Thu, 15 Oct 2015 08:29:41 +0000 (08:29 +0000)]
iobuf_queue() should return the number of bytes it queued on success, not 0

ok eric@

9 years agoLet "all" as an argument for "resume envelope", "pause envelope"
sunil [Thu, 15 Oct 2015 08:18:23 +0000 (08:18 +0000)]
Let "all" as an argument for "resume envelope", "pause envelope"
and "remove" subcommands.

seems potentially useful millert@, Ok gilles@

9 years agoA classic case for bzero() -> explicit_bzero()
mmcc [Thu, 15 Oct 2015 06:35:54 +0000 (06:35 +0000)]
A classic case for bzero() -> explicit_bzero()

ok deraadt@

9 years agoCast arguments of ctype functions to Char, a lexism defined as unsigned
mmcc [Thu, 15 Oct 2015 05:57:09 +0000 (05:57 +0000)]
Cast arguments of ctype functions to Char, a lexism defined as unsigned
char.

Part of a larger attempt to audit ctype function argument types with
Coccinelle.

ok deraadt@

9 years agoFIOCLEX & FIONCLEX should be in base ioctl set
deraadt [Thu, 15 Oct 2015 04:58:54 +0000 (04:58 +0000)]
FIOCLEX & FIONCLEX should be in base ioctl set

9 years agogive up; include stdlib.h from the .h file, sigh
deraadt [Thu, 15 Oct 2015 04:41:09 +0000 (04:41 +0000)]
give up; include stdlib.h from the .h file, sigh

9 years agofsck_ffs has a ^T signal handler which opens /dev/tty late. Hoist that
deraadt [Thu, 15 Oct 2015 03:10:05 +0000 (03:10 +0000)]
fsck_ffs has a ^T signal handler which opens /dev/tty late.  Hoist that
opening to before the pledge, and cache the fd.
looked over by millert

9 years agolock needs pledge(proc exec) to use bsd auth system. from trondd
tedu [Thu, 15 Oct 2015 02:35:04 +0000 (02:35 +0000)]
lock needs pledge(proc exec) to use bsd auth system. from trondd

9 years agoFix a crash that occurs when printing the filename in a malformed NFS
lteo [Thu, 15 Oct 2015 02:33:25 +0000 (02:33 +0000)]
Fix a crash that occurs when printing the filename in a malformed NFS
request packet.

From Kevin Reay who obtained the fix from the tcpdump.org repo (part of
commit 6191f36146f5d286304e9b6e893477fe509d83ab).

ok canacar@ sthen@

9 years agoAdd missing includes to make the pf(4) man page example program compile
lteo [Thu, 15 Oct 2015 02:26:27 +0000 (02:26 +0000)]
Add missing includes to make the pf(4) man page example program compile
again.

Spotted by and based on a diff from Jack J. Woehr.

9 years agoavoid using a var uninitialised
jsg [Thu, 15 Oct 2015 01:14:33 +0000 (01:14 +0000)]
avoid using a var uninitialised
ok jung@

9 years agoFALTHROUGH->FALLTHROUGH in comment, ok deraadt a few days ago
sthen [Wed, 14 Oct 2015 23:15:37 +0000 (23:15 +0000)]
FALTHROUGH->FALLTHROUGH in comment, ok deraadt a few days ago

9 years agoDocument flock request
millert [Wed, 14 Oct 2015 22:39:04 +0000 (22:39 +0000)]
Document flock request

9 years agoAdd a dummy "flock" request that will allow file locking. It is
millert [Wed, 14 Oct 2015 22:34:47 +0000 (22:34 +0000)]
Add a dummy "flock" request that will allow file locking.  It is
not currently enforced but we want the kernel to be able to parse
it for an upcoming diff in the next few days.

9 years agosmtpd in tree is no longer neither 5.4.4, nor 5.4.5, bump SMTPD_VERSION
gilles [Wed, 14 Oct 2015 22:16:38 +0000 (22:16 +0000)]
smtpd in tree is no longer neither 5.4.4, nor 5.4.5, bump SMTPD_VERSION

9 years agowhitespaces
gilles [Wed, 14 Oct 2015 22:01:43 +0000 (22:01 +0000)]
whitespaces

9 years agobetter fix for overrun reported by Qualys Security.
tedu [Wed, 14 Oct 2015 21:54:10 +0000 (21:54 +0000)]
better fix for overrun reported by Qualys Security.
buf is at all times kept nul terminated, so there is no need to enforce
this again upon exit. (no need to move buf around after we exahust space.)
ok beck miod

9 years agoSMTPD_MAXPATHLEN -> PATH_MAX, this was unnoticed as file is not linked
gilles [Wed, 14 Oct 2015 21:30:40 +0000 (21:30 +0000)]
SMTPD_MAXPATHLEN -> PATH_MAX, this was unnoticed as file is not linked

9 years agoimsg_read() may return EAGAIN, handle it in mproc_dispatch()
gilles [Wed, 14 Oct 2015 21:27:29 +0000 (21:27 +0000)]
imsg_read() may return EAGAIN, handle it in mproc_dispatch()

9 years agoBail out early if we have no buf_len
beck [Wed, 14 Oct 2015 21:25:16 +0000 (21:25 +0000)]
Bail out early if we have no buf_len
ok miod@

9 years agowhitespace + only log TRACE_MPROC if not IMSG_STAT_{IN,DE}CREMENT
gilles [Wed, 14 Oct 2015 21:18:19 +0000 (21:18 +0000)]
whitespace + only log TRACE_MPROC if not IMSG_STAT_{IN,DE}CREMENT

9 years agofix a memory leak reported by Qualys Security.
tedu [Wed, 14 Oct 2015 21:12:10 +0000 (21:12 +0000)]
fix a memory leak reported by Qualys Security.
move the bndec variable in tighter since it's not used elsewhere in the
loop, then always free it after use.
ok bcook miod

9 years agoremove a handful of log_warn that we should handle at a different place to
gilles [Wed, 14 Oct 2015 21:05:31 +0000 (21:05 +0000)]
remove a handful of log_warn that we should handle at a different place to
make them really useful

9 years agowhitespace
gilles [Wed, 14 Oct 2015 21:04:37 +0000 (21:04 +0000)]
whitespace

9 years agofix define and enhanced status code reason for 5.5.0
gilles [Wed, 14 Oct 2015 21:02:11 +0000 (21:02 +0000)]
fix define and enhanced status code reason for 5.5.0

9 years agoEnsure we don't write a 0 byte past end of the buffer in the error case.
beck [Wed, 14 Oct 2015 21:02:08 +0000 (21:02 +0000)]
Ensure we don't write a 0 byte past end of the buffer in the error case.
ok bcook@ deraadt@

9 years agoUse a strict $PATH of "/usr/bin:/usr/local/bin" to run the (de)compressors
deraadt [Wed, 14 Oct 2015 20:57:28 +0000 (20:57 +0000)]
Use a strict $PATH of "/usr/bin:/usr/local/bin" to run the (de)compressors
(gzip, compress, bzip2) rather than following the user's path.  This
seems easier than hardcoding the paths elsewhere and using basename().

pax/tar is pledged itself, but it can spawn one of these programs if
asked.  The three found at the strict path use pledge "stdio" very early
during startup, providing a warm fuzzy pledge->exec->no-pledge->pledge
interlock.  For bzip2, this assumes use of the ports/packages version
installed to /usr/local/bin, which has been pledged by sthen@.

Doing a 'tar tvfz hostile.tgz' becomes a bit safer, since an attacker
finding a buffer overflow or use after free has significantly fewer
system calls available (only pledge "stdio" in the decompressor).

ok millert sthen

9 years agowe dump esc_code if we have an esc_class, code may be (and actually was)
gilles [Wed, 14 Oct 2015 20:57:17 +0000 (20:57 +0000)]
we dump esc_code if we have an esc_class, code may be (and actually was)
confused as a pasto, so add a comment to make it clear that this is not
an error

9 years agoAllow group wheel to read the mail log. OK gilles@ sthen@
millert [Wed, 14 Oct 2015 20:54:07 +0000 (20:54 +0000)]
Allow group wheel to read the mail log.  OK gilles@ sthen@

9 years agowhitespace
gilles [Wed, 14 Oct 2015 20:51:53 +0000 (20:51 +0000)]
whitespace

9 years agowhitespace
gilles [Wed, 14 Oct 2015 20:45:30 +0000 (20:45 +0000)]
whitespace

9 years agopledge() privileged process
gilles [Wed, 14 Oct 2015 19:56:58 +0000 (19:56 +0000)]
pledge() privileged process

ok deraadt@

9 years agopledge() pony and lookup
gilles [Wed, 14 Oct 2015 19:39:16 +0000 (19:39 +0000)]
pledge() pony and lookup

ok deraadt@

9 years agosync
deraadt [Wed, 14 Oct 2015 19:14:32 +0000 (19:14 +0000)]
sync

9 years agoworse, need even more includes...
deraadt [Wed, 14 Oct 2015 17:54:46 +0000 (17:54 +0000)]
worse, need even more includes...

9 years agoCheck mmap and read return values. While at it, remove unused duplicated file.
tobias [Wed, 14 Oct 2015 17:29:44 +0000 (17:29 +0000)]
Check mmap and read return values. While at it, remove unused duplicated file.

ok millert@

9 years agoTo specify a source address ping uses -I while ping6 uses -S. Switch
florian [Wed, 14 Oct 2015 17:26:01 +0000 (17:26 +0000)]
To specify a source address ping uses -I while ping6 uses -S. Switch
ping6 -I to the ping-alike semantics.
sthen@ thinks this is OK

9 years agopledge "stdio rpath" is good enough for these mainline BSD auth login
deraadt [Wed, 14 Oct 2015 17:06:58 +0000 (17:06 +0000)]
pledge "stdio rpath" is good enough for these mainline BSD auth login
programs.
(I am very surprised pledge ended up working for programs like this)
ok semarie millert

9 years agoSince the fsck_* programs now only handle one filesystem, this creates
deraadt [Wed, 14 Oct 2015 16:58:55 +0000 (16:58 +0000)]
Since the fsck_* programs now only handle one filesystem, this creates
a point where open() and disklabel reading have completed.  After that
point, pledge "stdio".

As a result, an fsck of a hostile partition (noone ever does that, or
do they? :) is done by a program with SUBSTANTIALLY less system call
exposure.
ok semarie

9 years agoCopy permissions AND ownership when -o will override an input file.
tobias [Wed, 14 Oct 2015 16:42:51 +0000 (16:42 +0000)]
Copy permissions AND ownership when -o will override an input file.

with input by and ok deraadt@, millert@, tim@

9 years agosync
deraadt [Wed, 14 Oct 2015 16:29:37 +0000 (16:29 +0000)]
sync

9 years agounfortunately rewritelabel() just before termination does a non-permitted
deraadt [Wed, 14 Oct 2015 15:54:49 +0000 (15:54 +0000)]
unfortunately rewritelabel() just before termination does a non-permitted
ioctl to rewrite the label, in support of the old-school "frag info in
the disklabel" concept.  disklabel folk, please come talk to me...

9 years agosync with httpd - no functional change, just C99 types
reyk [Wed, 14 Oct 2015 14:51:57 +0000 (14:51 +0000)]
sync with httpd - no functional change, just C99 types

9 years agoOnly accept one filesystem/device as argument for checking. Few people
deraadt [Wed, 14 Oct 2015 14:33:45 +0000 (14:33 +0000)]
Only accept one filesystem/device as argument for checking.  Few people
will be calling these directly, and not for the multiple filesystem case.
fsck(8) is generally the parent and will handle things.
ok semarie; this change will also help a goal jsing has

9 years agoWhen pledged with "fattr", allow chown to supplimentary groups. This
deraadt [Wed, 14 Oct 2015 14:24:03 +0000 (14:24 +0000)]
When pledged with "fattr", allow chown to supplimentary groups.  This
came out of a discussion regarding "sort foo -o foo".
ok semarie

9 years agoadd includes for crc32() and uuid_dec_be() missed in rev 1.11
jsg [Wed, 14 Oct 2015 14:13:12 +0000 (14:13 +0000)]
add includes for crc32() and uuid_dec_be() missed in rev 1.11
ok krw@

9 years agoInit a variable in the recently added carp_vhe_match() function clang
jsg [Wed, 14 Oct 2015 13:59:31 +0000 (13:59 +0000)]
Init a variable in the recently added carp_vhe_match() function clang
and mpi believe could be used uninitialised.

ok mpi@

9 years agogc lst_ForEachNodeWhile, which isn't actually in use anywhere
espie [Wed, 14 Oct 2015 13:52:11 +0000 (13:52 +0000)]
gc lst_ForEachNodeWhile, which isn't actually in use anywhere

9 years agomake sure we use stdbool.h
espie [Wed, 14 Oct 2015 13:50:22 +0000 (13:50 +0000)]
make sure we use stdbool.h
Mostly diff by Daniel Dickman, who told me to commit in his stead,
as he's tied up at work.

9 years agoinclude err.h for the err() calls added in rev 1.46
jsg [Wed, 14 Oct 2015 13:32:44 +0000 (13:32 +0000)]
include err.h for the err() calls added in rev 1.46

9 years agoDon't use the NONE enum value where NULL was intended. Found with clang.
jsg [Wed, 14 Oct 2015 13:27:50 +0000 (13:27 +0000)]
Don't use the NONE enum value where NULL was intended.  Found with clang.
ok renato@

9 years agobugfix: add ${.CURDIR} to deal with obj symlinks
vgross [Wed, 14 Oct 2015 13:23:25 +0000 (13:23 +0000)]
bugfix: add ${.CURDIR} to deal with obj symlinks

9 years agounbreak regress/sbin/newfs
semarie [Wed, 14 Oct 2015 13:22:56 +0000 (13:22 +0000)]
unbreak regress/sbin/newfs

/dev/prandom is no more since Nov 30, 2008

OK otto@

9 years agobugfix : use ${.CURDIR} to cope with obj symlinks
vgross [Wed, 14 Oct 2015 13:17:33 +0000 (13:17 +0000)]
bugfix : use ${.CURDIR} to cope with obj symlinks

9 years agoadd regress tests for automatic port allocation.
vgross [Wed, 14 Oct 2015 12:47:07 +0000 (12:47 +0000)]
add regress tests for automatic port allocation.
- enable ipv4
- leave ipv6 disabled

9 years agoadd regress tests for automatic port allocation
vgross [Wed, 14 Oct 2015 12:38:52 +0000 (12:38 +0000)]
add regress tests for automatic port allocation

9 years agoReset the RTF_CONNECTED flag when cloning an entry.
mpi [Wed, 14 Oct 2015 10:18:03 +0000 (10:18 +0000)]
Reset the RTF_CONNECTED flag when cloning an entry.

While here check for RTF_CLONED insted of RTM_RESOLVE when adding an
entry.

Found while debugging naddy@'s NFS vs em(4) vs rtisvalid(9) issue.

9 years agoRewrite the logic around the dymanic array of routing tables to help
mpi [Wed, 14 Oct 2015 10:09:30 +0000 (10:09 +0000)]
Rewrite the logic around the dymanic array of routing tables to help
turning rtable_get(9) MP-safe.

Use only one per-AF array, as suggested by claudio@, pointing to an
array of pointers to the routing table heads.

Routing tables are now allocated/initialized per-AF.  This will let
us allocate routing table on-demand instead of always having an
AF_INET, AF_MPLS and AF_INET table as soon as a new rtableID is used.

This also get rid of the "void ***" madness.

ok dlg@, jmatthew@