openbsd
7 years agohigh scores printed too far to the right, move it left a little
tedu [Sun, 28 May 2017 20:34:33 +0000 (20:34 +0000)]
high scores printed too far to the right, move it left a little

7 years agotypo in comment
mlarkin [Sun, 28 May 2017 20:20:00 +0000 (20:20 +0000)]
typo in comment

7 years agoPrint when we send or recv an EOR marker.
claudio [Sun, 28 May 2017 20:15:02 +0000 (20:15 +0000)]
Print when we send or recv an EOR marker.
Req by and OK benno@

7 years agoIntroduce log_peer_info() and make log_peer_warn() log at LOG_ERR instead
claudio [Sun, 28 May 2017 20:14:15 +0000 (20:14 +0000)]
Introduce log_peer_info() and make log_peer_warn() log at LOG_ERR instead
of LOG_CRIT (which should only be used for fatal).
OK benno@

7 years agoClose imsg pipes later in the process. The shutdown code still tires to
claudio [Sun, 28 May 2017 20:10:59 +0000 (20:10 +0000)]
Close imsg pipes later in the process. The shutdown code still tires to
send imsgs and so the SE and RDE crashed because of this late in shutdown.
OK benno@ phessler@

7 years agoset autoconfprivacy flag; prodding naddy
florian [Sun, 28 May 2017 19:57:38 +0000 (19:57 +0000)]
set autoconfprivacy flag; prodding naddy

7 years agoChange so that sessions created detached (-d or no client) are always
nicm [Sun, 28 May 2017 19:46:55 +0000 (19:46 +0000)]
Change so that sessions created detached (-d or no client) are always
80x24 and the status line is not applied until they attach. Also make -x
and -y work for control clients whether the session is detached or not.

7 years agoinstall new manpage, noted by tb@
benno [Sun, 28 May 2017 19:44:52 +0000 (19:44 +0000)]
install new manpage, noted by tb@

7 years agoplease read operator(7) for this information.
benno [Sun, 28 May 2017 19:42:26 +0000 (19:42 +0000)]
please read operator(7) for this information.

7 years agodocument /usr/share/misc/airport contents and rules, after lengthy
benno [Sun, 28 May 2017 19:26:33 +0000 (19:26 +0000)]
document /usr/share/misc/airport contents and rules, after lengthy
hackroom discussion about train stations.
ok mlarkin, feedback deraadt

7 years agotypo
mlarkin [Sun, 28 May 2017 19:15:18 +0000 (19:15 +0000)]
typo

7 years agopasto, typos, spelling; ok florian@
naddy [Sun, 28 May 2017 19:13:13 +0000 (19:13 +0000)]
pasto, typos, spelling; ok florian@

7 years agoAlso recalculate session sizes when refreh-client -C is used. GitHub
nicm [Sun, 28 May 2017 19:00:52 +0000 (19:00 +0000)]
Also recalculate session sizes when refreh-client -C is used. GitHub
issue 947.

7 years agoThe High Council of Deciders has determined that railway stations, even
tedu [Sun, 28 May 2017 18:57:40 +0000 (18:57 +0000)]
The High Council of Deciders has determined that railway stations, even
those with IATA codes, are not airports and therefore do not qualify for
inclusion in this file.

7 years agoCheck also whether the interfaces is matched when pipex check PPPoE
yasuoka [Sun, 28 May 2017 18:55:25 +0000 (18:55 +0000)]
Check also whether the interfaces is matched when pipex check PPPoE
packets.  This fixes the problem when pipex connects with pppoe(4)
through pair(4).

7 years agoMove check later to mitigate a possible race.
ajacoutot [Sun, 28 May 2017 18:51:27 +0000 (18:51 +0000)]
Move check later to mitigate a possible race.

7 years agoUse interface index and if_{put,get} instead of ifnet pointer.
yasuoka [Sun, 28 May 2017 18:43:51 +0000 (18:43 +0000)]
Use interface index and if_{put,get} instead of ifnet pointer.

7 years agoUse interface index instead of ifnet pointer.
yasuoka [Sun, 28 May 2017 18:42:00 +0000 (18:42 +0000)]
Use interface index instead of ifnet pointer.

7 years agoadd HWD - Hayward Executive Airport. After extensive discussion, the
mlarkin [Sun, 28 May 2017 18:35:58 +0000 (18:35 +0000)]
add HWD - Hayward Executive Airport. After extensive discussion, the
decision was made that a missed approach at the DH counts as "being at
the airport"

ok phessler, deraadt

7 years agoconvert to UTF-8
tedu [Sun, 28 May 2017 18:31:35 +0000 (18:31 +0000)]
convert to UTF-8

7 years agoDo not allow NULL callback at rendezvous and clear callback
visa [Sun, 28 May 2017 17:12:48 +0000 (17:12 +0000)]
Do not allow NULL callback at rendezvous and clear callback
pointer at the end to catch errors faster.

7 years agoLet opencvs show ignored files on import, not showing them is just confusing.
joris [Sun, 28 May 2017 17:11:34 +0000 (17:11 +0000)]
Let opencvs show ignored files on import, not showing them is just confusing.

ok stsp@

7 years agoDon't allow opencvs to commit towards tags that are not branches.
joris [Sun, 28 May 2017 17:01:10 +0000 (17:01 +0000)]
Don't allow opencvs to commit towards tags that are not branches.

Gets rid of the old logic that wasn't working and replaced it with
a simplified version.

ok stsp@

7 years agoTeach opencvs status to display the sticky tag according to what it really
joris [Sun, 28 May 2017 16:58:54 +0000 (16:58 +0000)]
Teach opencvs status to display the sticky tag according to what it really
represents if it is a branch or a revision.

ok stsp@

7 years agoBring the opencvs log message template inline with other cvs implementations.
joris [Sun, 28 May 2017 16:57:01 +0000 (16:57 +0000)]
Bring the opencvs log message template inline with other cvs implementations.

ok stsp@

7 years agoLimit the nested header chain for IPv6 extensions headers and for
bluhm [Sun, 28 May 2017 16:55:54 +0000 (16:55 +0000)]
Limit the nested header chain for IPv6 extensions headers and for
authentication headers in the IPv4 case.  This prevents spending
excessive cpu time on crafted packets.
OK henning@

7 years agotweak previous;
jmc [Sun, 28 May 2017 16:52:27 +0000 (16:52 +0000)]
tweak previous;

7 years agoFix bad white spaces, wrap long lines, kill some empty lines.
bluhm [Sun, 28 May 2017 16:43:45 +0000 (16:43 +0000)]
Fix bad white spaces, wrap long lines, kill some empty lines.

7 years agoget a new privacy address before the old one expires
florian [Sun, 28 May 2017 16:36:53 +0000 (16:36 +0000)]
get a new privacy address before the old one expires

7 years agoNo need to constantly re-add the default route. It will not expire
florian [Sun, 28 May 2017 15:58:02 +0000 (15:58 +0000)]
No need to constantly re-add the default route. It will not expire
like the prefixes.  We might want to check if someone deleted the
route by hand though.

7 years agoFix checks for seconds and timezones in generalized times.
jmatthew [Sun, 28 May 2017 15:48:49 +0000 (15:48 +0000)]
Fix checks for seconds and timezones in generalized times.
Fixing the CHECK_RANGE macro in r1.4 revealed that the seconds check
accidentally relied on the macro being broken.  While looking into this I
noticed that the timezone check was also wrong, treating the timezone as
optional for generalized times.

investigation and diff mostly by Seiya Kawashima.

7 years agoUse fast path if remote call is not needed.
visa [Sun, 28 May 2017 15:46:06 +0000 (15:46 +0000)]
Use fast path if remote call is not needed.

Note that rendezvous calls are no longer necessarily
serialized systemwide.

7 years agoRemove a redundant assignment introduced in revision 1.219 but favor the
anton [Sun, 28 May 2017 15:36:45 +0000 (15:36 +0000)]
Remove a redundant assignment introduced in revision 1.219 but favor the
assignment outside of the conditional.

ok stsp@

7 years agowe're not hardcoded to table 0 any more
henning [Sun, 28 May 2017 15:16:52 +0000 (15:16 +0000)]
we're not hardcoded to table 0 any more

7 years agoso far, bgpd was hardcoded to use rtable 0 for nexthop verification.
henning [Sun, 28 May 2017 15:16:33 +0000 (15:16 +0000)]
so far, bgpd was hardcoded to use rtable 0 for nexthop verification.
instead, use the rtable bgpd was started in (route -T <n> exec / rc.d
daemon_rtable) for nexthop verification and as default Adj-RIB-In and
Loc-RIB. This allows multiple bgpds in different rdomains on the same
machine - bgp router virtualization if you like buzzwords.
initial version written under contract more than a year ago, it took us
a while to wrap our brains around the bgpd <-> rdomain interactions -
1) RIBs, 2) nexthop verification and 3) tcp sockets.
ok & input phessler claudio benno

7 years agomips64_multicast_ipi() excludes current CPU.
visa [Sun, 28 May 2017 15:16:08 +0000 (15:16 +0000)]
mips64_multicast_ipi() excludes current CPU.
The caller does not have to do that.

7 years agoDon't check np->port for NULL - it's an array, it's never NULL.
akfaew [Sun, 28 May 2017 15:15:21 +0000 (15:15 +0000)]
Don't check np->port for NULL - it's an array, it's never NULL.

OK bluhm@

7 years agoAdd missing NET_UNLOCK() in error path.
mpi [Sun, 28 May 2017 15:03:53 +0000 (15:03 +0000)]
Add missing NET_UNLOCK() in error path.

Spotted by sashan@

7 years agoPf was handling IPv4 and IPv6 differently regarding AH extension
bluhm [Sun, 28 May 2017 14:54:00 +0000 (14:54 +0000)]
Pf was handling IPv4 and IPv6 differently regarding AH extension
headers.  pf_walk_header6() steps over it and detects the real
protocol.  So to implement a minimal header walking function
pf_walk_header() for IPv4.  It does the header checks and jumps
over AH.  Then pf does not understand AH as a protocol, it is just
an extension that authenticates the packet.  Move some header and
option checks to pf_walk_header() for consistency with IPv6.  This
also improves the header check for IPv4 packets in ICMP payload.
OK henning@

7 years agoElegant and reliable link status checking courtesy of mpi@.
krw [Sun, 28 May 2017 14:37:48 +0000 (14:37 +0000)]
Elegant and reliable link status checking courtesy of mpi@.

Less of unreliable ioctl(SIOCGIFMEDIA), more getifaddrs().

ok mpi@

7 years agotrunk_port_destroy() needs the NET_LOCK().
mpi [Sun, 28 May 2017 14:26:38 +0000 (14:26 +0000)]
trunk_port_destroy() needs the NET_LOCK().

It brings the interface down and restore the original lladdr.

Found by Hrvoje Popovski

7 years agoIf a function is not found in the CTF data, do not assume it takes no
mpi [Sun, 28 May 2017 14:24:19 +0000 (14:24 +0000)]
If a function is not found in the CTF data, do not assume it takes no
argument.

7 years agoCall bpf_mtap_af() a bit earlier in ipip_input(). This prepares
bluhm [Sun, 28 May 2017 13:59:05 +0000 (13:59 +0000)]
Call bpf_mtap_af() a bit earlier in ipip_input().  This prepares
upcoming diffs, no functional change.
OK mpi@

7 years agoBuild i386 kernels with -ffreestanding, matching amd64 and various
jsg [Sun, 28 May 2017 13:20:37 +0000 (13:20 +0000)]
Build i386 kernels with -ffreestanding, matching amd64 and various
other platforms.

ok visa@ kettenis@

7 years agoRemove all splnet/splx from pipex(4) and pppx(4) and replace some of
yasuoka [Sun, 28 May 2017 12:51:33 +0000 (12:51 +0000)]
Remove all splnet/splx from pipex(4) and pppx(4) and replace some of
them by NET_LOCK/NET_UNLOCK.  Also make the timeout for pipex_timer
run with a thread context and replace pipex softintr by NETISR_PIPEX.

ok mpi

7 years agoLeaving IP multicast group requires the NET_LOCK().
mpi [Sun, 28 May 2017 12:47:24 +0000 (12:47 +0000)]
Leaving IP multicast group requires the NET_LOCK().

Grab the lock before calling carpdetach().

ok bluhm@

7 years agoclang warns on unused labels. Place a recently introduced label under
jsg [Sun, 28 May 2017 12:22:54 +0000 (12:22 +0000)]
clang warns on unused labels.  Place a recently introduced label under
ifdef IPSEC to fix the clang build when IPSEC is not defined.

ok deraadt@ bluhm@

7 years agoImplement an XON/XOFF protocol between the RDE and the SE to throttle
claudio [Sun, 28 May 2017 12:21:36 +0000 (12:21 +0000)]
Implement an XON/XOFF protocol between the RDE and the SE to throttle
per control session and peer the generation of imsg in the RDE. This
reduces the memory pressure in the SE substantially and also a bit in
the RDE. Makes the RDE more responsive for bgpctl commands.
Tested by me with 100 peers * 2000 prefixes and by phessler@ on an AMS-IX
border router with 200+ session. Convergance time got quite a bit better.
OK phessler@

7 years agoMerge two functions to lookup ELF sections by name.
mpi [Sun, 28 May 2017 11:41:52 +0000 (11:41 +0000)]
Merge two functions to lookup ELF sections by name.

ok claudio@, jasper@

7 years agoreinstate the description of "mask-source" to "listen on socket": my changes
jmc [Sun, 28 May 2017 11:17:33 +0000 (11:17 +0000)]
reinstate the description of "mask-source" to "listen on socket": my changes
two revisions previous inadvertently removed it;

ok gilles

7 years agoFix some spurious fatal firmware errors in iwm(4).
stsp [Sun, 28 May 2017 11:03:48 +0000 (11:03 +0000)]
Fix some spurious fatal firmware errors in iwm(4).

If we are not in SCAN state anymore by the time hardware signals completion
of a scan command, exit the scan completion handler immediately instead of
calling ieee80211_end_scan().

Tested by tb@ and myself.
ok mpi@ tb@ zhuk@

7 years agouse __func__ in log messages. fix some whitespace while here.
benno [Sun, 28 May 2017 10:39:15 +0000 (10:39 +0000)]
use __func__ in log messages. fix some whitespace while here.
From Hiltjo Posthuma hiltjo -AT codemadness -DOT- org, thanks!
ok florian, claudio

7 years agouse __func__ in log messages.
benno [Sun, 28 May 2017 10:37:26 +0000 (10:37 +0000)]
use __func__ in log messages.
From Hiltjo Posthuma hiltjo -AT codemadness -DOT- org, thanks!
ok florian, claudio

7 years agoIndent and rename var; no functional change.
ajacoutot [Sun, 28 May 2017 10:12:42 +0000 (10:12 +0000)]
Indent and rename var; no functional change.

7 years agostyle(9) some variable declarations
benno [Sun, 28 May 2017 10:06:13 +0000 (10:06 +0000)]
style(9) some variable declarations
ok florian@

7 years agoReduce differences between the two pfctl_osfp.c files.
akfaew [Sun, 28 May 2017 10:06:12 +0000 (10:06 +0000)]
Reduce differences between the two pfctl_osfp.c files.

Apply three commits from pfctl/pfctl_osfp.c

OK bluhm@

7 years agocheck_tos() gets a parameter so i can remove another global var.
benno [Sun, 28 May 2017 10:04:27 +0000 (10:04 +0000)]
check_tos() gets a parameter so i can remove another global var.
ok florian@

7 years agointroduce struct tr_conf to keep all of the configuration.
benno [Sun, 28 May 2017 10:01:52 +0000 (10:01 +0000)]
introduce struct tr_conf to keep all of the configuration.
Functions needing access to any of those vars get it passed as a parameter.
result: even less global vars.
ok florian@

7 years agomove as many globals as possible into the main function - thats the
benno [Sun, 28 May 2017 10:00:00 +0000 (10:00 +0000)]
move as many globals as possible into the main function - thats the
only place where they are used.
Only exception: v6flags - make it an argument to usage()
ok florian@

7 years agoRemove unused flag IWM_FLAG_STOPPED.
stsp [Sun, 28 May 2017 09:59:58 +0000 (09:59 +0000)]
Remove unused flag IWM_FLAG_STOPPED.
ok tedu@ of course

7 years agoUse membar_enter_after_atomic() and membar_exit_before_atomic().
mpi [Sun, 28 May 2017 09:45:25 +0000 (09:45 +0000)]
Use membar_enter_after_atomic() and membar_exit_before_atomic().

7 years agoRemove useless splnet()/splx() dances.
mpi [Sun, 28 May 2017 09:38:32 +0000 (09:38 +0000)]
Remove useless splnet()/splx() dances.

Data structures modified in the ioctl path are protected by the NET_LOCK().

ok sashan@

7 years agopropose and configure default gateway
florian [Sun, 28 May 2017 09:35:56 +0000 (09:35 +0000)]
propose and configure default gateway

7 years agoProtect the global array of interfaces with the NET_LOCK().
mpi [Sun, 28 May 2017 09:35:13 +0000 (09:35 +0000)]
Protect the global array of interfaces with the NET_LOCK().

ok sashan@

7 years agoWhen a daemon reaches its timeout when starting, display "timeout" instead
ajacoutot [Sun, 28 May 2017 09:31:45 +0000 (09:31 +0000)]
When a daemon reaches its timeout when starting, display "timeout" instead
of "ok" so the user is warned and has a chance to fix it (most of the time
due to bogus flags). Daemons reaching the timeout without being able to
start are still marked as "failed" (which should also give a clue to the
user that some investigation is needed).

prodded by beck@ a while ago
discussed with and ok sthen@

7 years agoRename ip_local() to ip_deliver() and give it the same parameters
bluhm [Sun, 28 May 2017 09:25:51 +0000 (09:25 +0000)]
Rename ip_local() to ip_deliver() and give it the same parameters
as the pr_input functions.  Add an assert that IPv4 delivery ends
in IP proto done to assure that IPv4 protocol functions work like
IPv6.
OK mpi@

7 years agoRemove _mode variable and use AI_MODE directly instead. Use the
rpe [Sun, 28 May 2017 09:24:56 +0000 (09:24 +0000)]
Remove _mode variable and use AI_MODE directly instead. Use the
exit code of ftp consistently to determine success of fetching the
response file.

discussed with and OK tb@

7 years agomark up "masquerade";
jmc [Sun, 28 May 2017 09:00:24 +0000 (09:00 +0000)]
mark up "masquerade";

7 years agosplit the two "listen on" directives into two separate items;
jmc [Sun, 28 May 2017 08:59:05 +0000 (08:59 +0000)]
split the two "listen on" directives into two separate items;
the markup that we were using wouldn;t have worked with groff anyway
but, more worringly, it didn;t work with mandoc either;

7 years agoDo a better job of not printing sequences we cannot reverse in DELETE or
deraadt [Sun, 28 May 2017 08:51:06 +0000 (08:51 +0000)]
Do a better job of not printing sequences we cannot reverse in DELETE or
KILL.  Therefore we can do a better job cleaning up.
testing by benno

7 years agoUse intr_disable()/intr_restore() to reduce differences with sparc64
mpi [Sun, 28 May 2017 08:47:19 +0000 (08:47 +0000)]
Use intr_disable()/intr_restore() to reduce differences with sparc64
mp_lock.

ok kettenis@, visa@

7 years agoDrop useless lines continuation; no functional change.
ajacoutot [Sun, 28 May 2017 08:38:10 +0000 (08:38 +0000)]
Drop useless lines continuation; no functional change.

7 years agoetc/netstart: use colon separator instead of dot with chown
awolk [Sun, 28 May 2017 08:07:33 +0000 (08:07 +0000)]
etc/netstart: use colon separator instead of dot with chown

OK jung@, deraadt@, jmc@

7 years agochown: Remove SUPPORT_DOT ifdef - it's on by default for 22 years
awolk [Sun, 28 May 2017 08:03:36 +0000 (08:03 +0000)]
chown: Remove SUPPORT_DOT ifdef - it's on by default for 22 years

The old syntax was deprecated 25 years ago when the utility was
first standardised in IEEE Std 1003.2-1992 ("POSIX.2"). There was
no POSIX version of chown with the dot separator.

Let's stop pretending that it will ever go away.

OK jung@, deraadt@, jmc@

7 years agoCatch up with pfctl/pfctl_osfp.c, no binary change.
akfaew [Sun, 28 May 2017 07:40:12 +0000 (07:40 +0000)]
Catch up with pfctl/pfctl_osfp.c, no binary change.

OK deraadt@

7 years agoFix cursor position while removing characters from the command line.
anton [Sun, 28 May 2017 07:27:01 +0000 (07:27 +0000)]
Fix cursor position while removing characters from the command line.

While here, remove a condition that becomes redundant.

ok schwarze@ tb@

7 years agoprint_ioctl() is unused if not debugging. Found with clang, after
akfaew [Sun, 28 May 2017 07:17:53 +0000 (07:17 +0000)]
print_ioctl() is unused if not debugging. Found with clang, after
marking the function "static". Use OSFP_DEBUG, in a similar
fashion to OPT_DEBUG (pfctl_optimize.c).

OK bluhm@

7 years agoremove bogus atomic_swap_64 code from i386
jsg [Sun, 28 May 2017 01:33:26 +0000 (01:33 +0000)]
remove bogus atomic_swap_64 code from i386

xchg can't handle 64 bit values on i386.  gcc errors if the code
is called, clang errors if it is included.

ok mlarkin@ kettenis@

7 years agouse pread and pwrite to save code and syscalls. ok mlarkin
tedu [Sat, 27 May 2017 23:58:16 +0000 (23:58 +0000)]
use pread and pwrite to save code and syscalls. ok mlarkin

7 years agoFix the carp mode 'balancing ip-stealth'. Set the link state UP
bluhm [Sat, 27 May 2017 21:55:52 +0000 (21:55 +0000)]
Fix the carp mode 'balancing ip-stealth'.  Set the link state UP
if at least one vhid is in state MASTER.
from Florian Riehm; OK florian@

7 years agofix previous as noted by mpi, thx florian
benno [Sat, 27 May 2017 21:44:22 +0000 (21:44 +0000)]
fix previous as noted by mpi, thx florian

7 years agomove sending of pflow packet into a task, seperated from the data
benno [Sat, 27 May 2017 21:06:06 +0000 (21:06 +0000)]
move sending of pflow packet into a task, seperated from the data
collection by a mbuf queue. with help from mpi@
ok florian@

7 years agoremove devel/waf gone 2 years ago, may not come back but still gives nightmares
jung [Sat, 27 May 2017 20:18:04 +0000 (20:18 +0000)]
remove devel/waf gone 2 years ago, may not come back but still gives nightmares

ok ajacoutot

7 years agoOn i386 and amd64, atomic instructions include an implicit memory barrier.
kettenis [Sat, 27 May 2017 20:12:12 +0000 (20:12 +0000)]
On i386 and amd64, atomic instructions include an implicit memory barrier.

ok mikeb@, visa@, mpi@

7 years agoOk turns out we still want to keep the rc_bg variable around but we need
ajacoutot [Sat, 27 May 2017 19:55:48 +0000 (19:55 +0000)]
Ok turns out we still want to keep the rc_bg variable around but we need
to know which daemon cannot background themselves (actually we want to
know the opposite, but there are much more). However, it's only needed in
_rc_wait and rc.subr still does its magic without the need to add `&'.

7 years agoAdd membar_enter_after_atomic(9) and membar_exit_before_atomic(9) APIs to
kettenis [Sat, 27 May 2017 19:47:08 +0000 (19:47 +0000)]
Add membar_enter_after_atomic(9) and membar_exit_before_atomic(9) APIs to
allow important optimizations on architectures where atomic instructions
include and implied memory barrier.

ok mikeb@, visa@, mpi@

7 years agoMove includes.
akfaew [Sat, 27 May 2017 19:38:38 +0000 (19:38 +0000)]
Move includes.

This reduces the diff with usr.sbin/tcpdump/pfctl_osfp.c. The change
from tcpdump is newer, so change pfctl. No binary change.

OK deraadt@

7 years agonvme: Don't set prp1 for DEL_IOCQ
sf [Sat, 27 May 2017 19:27:45 +0000 (19:27 +0000)]
nvme: Don't set prp1 for DEL_IOCQ

NVM_ADMIN_DEL_IOCQ does not need prp1 (just as NVM_ADMIN_DEL_IOSQ).
Remove what is likely a cut'n'paste error from the *_ADD_* code.

tested by claudio@
ok jmatthew@

7 years agoAlso test arrays of double and long long.
millert [Sat, 27 May 2017 18:54:09 +0000 (18:54 +0000)]
Also test arrays of double and long long.

7 years agoPush the NET_LOCK down into PF_KEY so that it can be treated like PF_ROUTE.
claudio [Sat, 27 May 2017 18:50:53 +0000 (18:50 +0000)]
Push the NET_LOCK down into PF_KEY so that it can be treated like PF_ROUTE.
Only pfkeyv2_send() needs the NET_LOCK() so grab it at the start and release
at the end.  This should allow to push the locks down in other places.
OK mpi@, bluhm@

7 years agoProtect the global list of softc with the NET_LOCK().
mpi [Sat, 27 May 2017 18:39:17 +0000 (18:39 +0000)]
Protect the global list of softc with the NET_LOCK().

ok sashan@

7 years agouse sizeof("constant string") to avoid magic number
florian [Sat, 27 May 2017 18:38:07 +0000 (18:38 +0000)]
use sizeof("constant string") to avoid magic number

7 years agoprint router preference
florian [Sat, 27 May 2017 18:37:09 +0000 (18:37 +0000)]
print router preference

7 years agoProtect the global list of softc with the NET_LOCK().
mpi [Sat, 27 May 2017 18:36:20 +0000 (18:36 +0000)]
Protect the global list of softc with the NET_LOCK().

While here remove superfluous splnet()/splx() in the ioctl routine.

ok sashan@

7 years agoRemove useless splnet()/splx() dances.
mpi [Sat, 27 May 2017 18:33:21 +0000 (18:33 +0000)]
Remove useless splnet()/splx() dances.

pfsyncioctl() is executed with the NET_LOCK() held which is enough.

ok sashan@

7 years agoAllow an administrator to disable the bgp loop detection algorithm,
phessler [Sat, 27 May 2017 18:12:23 +0000 (18:12 +0000)]
Allow an administrator to disable the bgp loop detection algorithm,
which is useful in very limited situations.

Angry dragons and grues will hunt for you, if you use it.

OK claudio@ sthen@ benno@

7 years agoallow only one network <prefix> statement per for the same prefix.
benno [Sat, 27 May 2017 18:04:07 +0000 (18:04 +0000)]
allow only one network <prefix> statement per for the same prefix.
ok florian@ phessler@

7 years agoUse copyin32(9) to atomically copy the futex from user space.
kettenis [Sat, 27 May 2017 16:42:41 +0000 (16:42 +0000)]
Use copyin32(9) to atomically copy the futex from user space.

On !MULTIPROCESSOR kernels we still fall back on copyin(9), but that is
fine.  This will break m88k MULTIPROCESSOR kernels.

ok deraadt@, mpi@, visa@

7 years agoPut an assert that M_PKTHDR is set before accessing m_pkthdr in the
bluhm [Sat, 27 May 2017 16:41:10 +0000 (16:41 +0000)]
Put an assert that M_PKTHDR is set before accessing m_pkthdr in the
mbuf functions.
OK claudio@

7 years agoGenerate a fake ack (or is it an alternative ack?) internally.
florian [Sat, 27 May 2017 16:16:49 +0000 (16:16 +0000)]
Generate a fake ack (or is it an alternative ack?) internally.
This allows slaacd to configure addresses in the absence of
netcfgd and might be a less scary step forward to move
stateless address autoconfiguration out of the kernel.

This intentionally a compile time option and will go away
once we figure out how to do proposals.