| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
ok sashan
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
time_second(9) and time_uptime(9) are widely used in the kernel to
quickly get the system UTC or system uptime as a time_t. However,
time_t is 64-bit everywhere, so it is not generally safe to use them
on 32-bit platforms: you have a split-read problem if your hardware
cannot perform atomic 64-bit reads.
This patch replaces time_second(9) with gettime(9), a safer successor
interface, throughout the kernel. Similarly, time_uptime(9) is replaced
with getuptime(9).
There is a performance cost on 32-bit platforms in exchange for
eliminating the split-read problem: instead of two register reads you
now have a lockless read loop to pull the values from the timehands.
This is really not *too* bad in the grand scheme of things, but
compared to what we were doing before it is several times slower.
There is no performance cost on 64-bit (__LP64__) platforms.
With input from visa@, dlg@, and tedu@.
Several bugs squashed by visa@.
ok kettenis@
|
|
|
|
|
|
|
|
| |
couldn't find an entry if its table is attached a table on the root.
This fixes the problem "route-to <TABLE> least-states" doesn't work.
The problem is found by IIJ.
OK sashan
|
|
|
|
| |
ok kn@
|
|
|
|
|
|
| |
These are just unhelpful case conversion.
OK sashan henning
|
|
|
|
|
|
|
| |
Replace hardcoded 0 and implicit checks with enum as done in all other
use cases of `pfra_fback'. No object change.
OK sashan
|
|
|
|
|
|
| |
(tj found fix in FreeBSD repo for us)
OK @bluhm, @henning
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't trust the value of pfra_type blindly since it's coming from
userland and sanitize it in pfr_validate_addr that is called after
every copyin and also perform the check in pfr_create_kentry before
we attempt to use the value not after.
Coverity CID 1452909, 1453097, 1453384; Severity: Minor
It can be triggered only by root by default or anyone with write
access to /dev/pf if such access is provided.
ok visa, bcook, sashan, jsg
|
|
|
|
|
|
|
| |
so that we can run these parts of pf in parallel. Also replace a
single usage of pfr_mask with a stack local variable.
ok mpi@
|
|
|
|
|
|
|
|
| |
The distinction between preempt() and yield() stays as it is usueful
to know if a thread decided to yield by itself or if the kernel told
him to go away.
ok tedu@, guenther@
|
|
|
|
|
|
| |
current process is hogging a CPU.
ok mikeb@, visa@, tedu@
|
|
|
|
| |
rectification.
|
|
|
|
|
|
| |
globals is the KERNEL_LOCK().
ok claudio@
|
|
|
|
|
|
|
|
|
| |
pfvar_priv.h. The pf_headers had to be defined in multiple .c files
before. In pfvar.h it would have unknown storage size, this file
is included in too many places. The idea is to have a private pf
header that is only included in the pf part of the kernel. For now
it contains pf_pdesc and pf_headers, it may be extended later.
discussion, input and OK henning@ procter@ sashan@
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the ioff argument to pool_init() is unused and has been for many
years, so this replaces it with an ipl argument. because the ipl
will be set on init we no longer need pool_setipl.
most of these changes have been done with coccinelle using the spatch
below. cocci sucks at formatting code though, so i fixed that by hand.
the manpage and subr_pool.c bits i did myself.
ok tedu@ jmatthew@
@ipl@
expression pp;
expression ipl;
expression s, a, o, f, m, p;
@@
-pool_init(pp, s, a, o, f, m, p);
-pool_setipl(pp, ipl);
+pool_init(pp, s, a, ipl, f, m, p);
|
|
|
|
| |
ok phessler@ henning@
|
|
|
|
| |
OK mikeb@, OK bluhm@
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
length of the key as argument.
This way every consumer of the radix tree has a chance to explicitly
initialize the shared data structures and no longer rely on another
subsystem to do the initialization.
As a bonus ``dom_maxrtkey'' is no longer used an die.
ART kernels should now be fully usable because pf(4) and IPSEC properly
initialized the radix tree.
ok chris@, reyk@
|
|
|
|
|
|
|
| |
path was taken. This both prevents warnings from clang and acts as a
sanity check.
ok mcbride@ henning@
|
|
|
|
|
|
|
|
| |
- PF should always use unhandled_af()
- 0 is lame, AF_UNSPEC is profi
ok bluhm@
|
|
|
|
|
|
| |
it also adds af_unhandled(), where it is currently missing.
ok mcbride@
|
|
|
|
|
|
| |
to never return the internal RNF_ROOT nodes. This removes the checks
in the callee to verify that not an RNF_ROOT node was returned.
OK mpi@
|
|
|
|
|
|
|
|
|
|
|
| |
something based on an address family and later assumes one of the paths
was taken. This was initially just calls to panic until guenther
suggested a function to reduce the amount of strings needed.
This reduces the amount of noise with static analysers and acts
as a sanity check.
ok guenther@ bluhm@
|
|
|
|
|
|
|
|
|
| |
pfi_kif objects allocated for table entries created by route-to or
by specifying weight weren't garbage collected when the table entry
was destroyed.
Spotted by Alexandr Nedvedicky <alexandr ! nedvedicky at oracle ! com>,
thanks! Ok henning, florian
|
|
|
|
|
| |
Spotted by Alexandr Nedvedicky <alexandr ! nedvedicky at oracle ! com>,
thanks!
|
|
|
|
|
|
|
| |
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.
ok tedu@ deraadt@
|
|
|
|
| |
Analysis and patch by Richard Kojedzinszky, thanks! ok henning
|
|
|
|
|
| |
long live the one true internet.
ok henning mikeb
|
|
|
|
| |
ok miod@ mpi@
|
|
|
|
| |
after discussions with beck deraadt kettenis.
|
|
|
|
|
|
|
|
| |
While here, fix pf table displays to fit within 80 chars.
Manpage input jmc@
ok henning@ reyk@
|
|
|
|
|
|
|
|
| |
change for pf, but that's fine at this time. You'll need to rebuild
pf userland after updating your kernel.
change to 'since' member ok henning@
rest ok henning@ deraadt@
|
|
|
|
| |
an ABI change involved.
|
|
|
|
|
|
|
|
| |
type**, so no ABI change.
ok henning@ deraadt@
** ...yet
|
|
|
|
|
|
|
| |
table statistics so it appeared later on as the Epoch. Noticed
by [the] Shining on bugs@. Thanks!
ok sthen, waver from deraadt
|
|
|
|
|
|
| |
negating existing entries on re-load does not work (e.g. changing
192.168.6.0/24 to !192.168.6.0/24 in table was ignoed).
ok mikeb@, henning@ mpf@, bluhm@,
|
|
|
|
| |
ok henning@, zinke@, mikeb@
|
|
|
|
|
|
| |
to the initial value and do not use the counter;
reported by Sebastian Benoit and Daniel Krambrock,
tested by Sebastian Benoit, ok henning zinke
|
|
|
|
|
| |
Diff from zinke@ with a some minor cleanup.
ok henning claudio deraadt
|
|
|
|
|
| |
an address pool. problem found and solution tested by claudio.
ok claudio, henning, "reads fine" to zinke
|
|
|
|
| |
ok mcbride@ henning@
|
| |
|
|
|
|
|
|
| |
so that rules like "pass out on vr1 inet6 nat-to (vr1)" won't map
to the non routable ipv6 link local address; with suggestions and
ok claudio, henning
|
|
|
|
| |
ok deraadt henning
|
|
|
|
| |
ok henning
|
|
|
|
| |
ok dlg
|
|
|
|
|
|
|
| |
Bogus chunks pointed out by matthew@ and miod@. No cookies for
marco@ and jasper@.
ok deraadt@ miod@ matthew@ jasper@ macro@
|