Commit Graph

11848 Commits

Author SHA1 Message Date
martin
df9944f85a Fix editor accident in previous 2018-09-08 20:01:19 +00:00
martin
a6c219b7c4 PR port-sgimips/53583: fetch kernel name always before using it.
Make the struct utsname local to avoid future similar issues.
2018-09-08 18:10:35 +00:00
martin
3575766bab Fix previous in case when BUILDID is passed - the subdirectory has the
same name as the BUILDID (which already includes the trailing "Z", no need
to append it again)
2018-09-06 07:56:40 +00:00
maxv
f922b0f6bd Remove the network ATM code. 2018-09-06 06:41:59 +00:00
martin
7141f3ff1f For local builds, at least use the right prefix on nyftp 2018-09-05 12:49:55 +00:00
martin
b99992c095 Try to guess the proper directory on ftp or nyftp where the binary
sets for the current build will end up.
2018-09-05 12:01:52 +00:00
maxv
bc58a324f2 Fix the "Interfaces" section, I understood wrong. Talk about inference,
because it was not mentioned before, and it plays an important role.
Discussed with rmind. Probably not the last pass.
2018-09-04 15:36:01 +00:00
riastradh
d1579b2d70 Rename min/max -> uimin/uimax for better honesty.
These functions are defined on unsigned int.  The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER!  Some subsystems have

	#define min(a, b)	((a) < (b) ? (a) : (b))
	#define max(a, b)	((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX.  Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate.  But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all.  (Who knows, maybe in some cases integer
truncation is actually intended!)
2018-09-03 16:29:22 +00:00
wiz
0394df431b New sentence, new line. Use Fn for functions. 2018-09-02 18:03:23 +00:00
maxv
c09ea90fc6 Be clearer about the difference between static vs dynamic interface list,
and slightly improve wording.

My understanding is that when none of inet4/inet6/ifaddrs is passed, NPF
assumes ifaddrs.
2018-09-02 17:45:18 +00:00
wiz
25be4c69af Remove superfluous Pp. 2018-09-01 19:26:46 +00:00
rmind
b5635267ab npf.conf(5): fix some of the previous incorrect or inaccurate changes.
The TCP flags option is not only for the stateful tracking.  Dynamic NAT
implies NAPT; algorithms, at least for now, are for static NAT mappings.
Mention that ALG ICMP is also for traceroute behind NAT; also mention
"MSS clamping" (some users might search for this term, so keeping the
terminology is helpful).
2018-09-01 16:28:57 +00:00
maxv
e3e075e240 rename net-seg -> map-seg, and document it 2018-08-31 11:18:35 +00:00
maxv
e6e69c66e8 "interface" already contains "var-name", so don't mention it in "filt-addr",
that's redundant
2018-08-31 11:11:21 +00:00
maxv
7af2b2f68b should be port-opts 2018-08-31 11:01:09 +00:00
maxv
20048da297 Clarify the "Groups" section. 2018-08-31 10:52:30 +00:00
maxv
918cd75c72 remove commented reference to pflog 2018-08-31 10:38:17 +00:00
wiz
367a79e6ff Add missing -width; remove unnecessary .Pp. 2018-08-27 13:20:47 +00:00
maxv
6cf056e7fd Improve the "Map" section. 2018-08-27 13:09:16 +00:00
maxv
c4abcc5a94 Document ALGs. 2018-08-27 12:46:03 +00:00
martin
1ebe46fcad Remove userland part of ndis 2018-08-25 11:06:00 +00:00
abhinav
50d4d47f30 Adjust makemandb for the latest mandoc
ok christos@
2018-08-24 16:01:57 +00:00
maxv
5458b5faf0 Add the values of "algo" in the grammar, and use # as comment marker for
man-k.org (and others) not to highlight things in an incorrect way.
2018-08-17 12:20:49 +00:00
maxv
143312eb5c Add missing quote in static-rule, it causes man-k.org (and other tools)
to wrongly highlight the grammar.
2018-08-17 12:04:20 +00:00
maxv
1dbf263b8b Replace "rproc"->"proc" in the grammar (spotted by he@), and slightly
reword.
2018-08-17 10:24:19 +00:00
maxv
f8cd5f425f Replace () by [] in tcp-flags.
Fix proc-opts, the value is optional, noted by he@.
2018-08-17 10:16:24 +00:00
maxv
29f7e3440d Improve wording. 2018-08-16 09:58:00 +00:00
maxv
ded4e9d920 Improve the "Map" section a little. 2018-08-16 09:50:37 +00:00
maxv
16b11b4076 Document the "flags" keyword. 2018-08-16 09:46:18 +00:00
maxv
b8e06d89f6 Improve the "Rules" section: better explain the "final" keyword (it is
the same as PF's "quick", so use the same wording), and document the
"return" options.

While here simplify the man code, suggested by wiz.
2018-08-16 09:21:00 +00:00
maxv
65ac579f46 Add quotes around the option names, to match the actual npf conf. 2018-08-16 08:51:53 +00:00
maxv
0a9ee16931 Enlighten the "Procedures" section. In particular document the "no-df"
option. Also replace "normalisation" -> "normalization", to match the
name of the rule.
2018-08-16 08:37:51 +00:00
kre
6a7c82e6b2 In the latest mandoc (mdocml) the signature (prototype) of
mparse_alloc() altered - update the call here to compensate.

This fixes the build (of makemandb), but I am not sure that
the changed version is what is desired - someone who knows
something about all of this should validate ... I just copied
the invocation from mandoc's demandoc.c (which seems likely
to be at least a similar kind of usage).
2018-08-16 05:07:22 +00:00
wiz
444a305543 Add missing El. Remove trailing whitespace. 2018-08-13 06:06:13 +00:00
christos
61bf19f212 i386 does not have a variable min address (yet) 2018-08-12 16:00:41 +00:00
christos
5ceff8e2e0 reorder 2018-08-12 15:55:26 +00:00
christos
5b4ae9b813 make things link again. 2018-08-12 15:05:13 +00:00
sevan
eb0a9b17da Simplify the description of npfd, default npflog interface & pcap file are
covered later.
Move advise regarding offline analysis to the CAVEATS section.
2018-08-07 22:55:47 +00:00
sevan
1d6667cee9 Escape ellipsis to stop it being interpreted as a macro.
Drop commented out manual which doesn't exist.
2018-08-07 22:02:08 +00:00
sevan
eaf2f5a246 First pass at editing this manual.
Add a link to the NPF documentation website and refer to it.
Switch the multiple structural elements to a list to make it easier to read and
extend.
Clarify tables, re-order so all terms are before the example.
Clarify obtaining addresses per family
Move the minimum requirement for a default group to the group section.
2018-08-07 00:22:13 +00:00
sevan
059f47e275 Use Nm macro
Move history details to the HISTORY section
Spelling
Be less meta & clarify the website should be consulted.
2018-08-02 16:42:12 +00:00
nonaka
b62b80c748 arp(8): Fix the host output when arp -dav. 2018-07-31 09:45:52 +00:00
wiz
10fabe8c03 Fix mandoc warnings. 2018-07-29 21:17:43 +00:00
sevan
0a9053f0f4 Document "in" field in CPU section
Fix ps(1) Xr raised by mandoc -Tlint
2018-07-29 17:03:02 +00:00
kamil
a9b2b066a2 Avoid potential undefined behavior in bta2dpd(8)
The operator >> causes implicit promotion to int.

There is need to cast the result back to uint8_t in order to save the
return value to a data undef a pointe of type uint8_t.

Requested by GCC when building with Undefined Behavior Sanitizer.
2018-07-25 19:03:50 +00:00
maxv
1b2a6113eb Add a "support" section. 2018-07-24 10:05:36 +00:00
maxv
8c9dd8d036 Use errx, there is no errno. 2018-07-24 09:50:37 +00:00
kre
3ef826f570 PR bin/53458
Bring this script a little up to date - make it work with modern /bin/sh
(avoid HOSTNAME as a random variable) clean up trailing spaces on lines,
use $( ) instead of `` ...
2018-07-20 13:11:01 +00:00
wiz
b15bdb80e1 Various improvements to man page. Sync usage. 2018-07-18 16:50:05 +00:00
christos
413e9419ec cast through intptr_t 2018-07-16 01:04:47 +00:00