Commit Graph

10666 Commits

Author SHA1 Message Date
kefren
2157479565 permit notifications even if session not fully established 2013-01-28 20:32:04 +00:00
kefren
97dccf752c Fix the transport address TLV mess I created after INET6 convert
Use a single loop to decrement and check hello list keepalives
Display transport address in show hello output
2013-01-28 20:06:52 +00:00
mlelstv
3b0450ca73 Do not use *bp after freeing it in brelse. 2013-01-28 10:16:35 +00:00
christos
863ded0e2b now that msdos works, document it. 2013-01-28 00:23:18 +00:00
christos
0a54bc86e7 use pcbmap instead of the open coded hack now the pcbmap works. 2013-01-28 00:16:48 +00:00
christos
0e23c760cc don't forget to initialize the cache. 2013-01-28 00:16:24 +00:00
christos
a61457fac4 fix recursion error handling. top level directory works. 2013-01-27 22:53:03 +00:00
christos
330e688f74 fix root detection (although the code is a noop) 2013-01-27 22:52:38 +00:00
christos
5f60de37ca - don't forget to set de_pmp
- unexpand inserted tabs to the "." and ".." strings!
2013-01-27 22:52:19 +00:00
christos
180d451863 undo c99 2013-01-27 22:09:24 +00:00
christos
1df38ec62e - some more debugging
- use msdosfs_update() -- should not be needed.
- remove <sys/mount.h>
2013-01-27 22:07:19 +00:00
christos
e502c2ffd0 This works well enough to populate plain files in the root dir. creating
directories fails.
2013-01-27 20:05:46 +00:00
christos
14d475a7bf the max msdos file size is less than size_t so don't bother checking against it. 2013-01-27 16:03:15 +00:00
christos
804eae6b82 fixed directory entry allocation. Now the file data remains and is currently
broken.
2013-01-27 15:35:45 +00:00
christos
12188588a0 zero memory 2013-01-27 14:10:22 +00:00
christos
96e132de94 Don't print the pointers in debugging, it is not useful.
zero all memory
2013-01-27 14:10:03 +00:00
christos
7176d59dec fix single letter parsing. 2013-01-27 14:07:12 +00:00
martin
c24cac0ff3 Make it compile on 32bit AND 64bit archs. 2013-01-27 12:25:13 +00:00
mbalmer
510ae4bec6 Allow this to compile on 32bit architectures. 2013-01-27 10:07:23 +00:00
kefren
8835c2ab89 re-enable peer authentication 2013-01-27 05:53:21 +00:00
kefren
dd2b4ae9ab * add a new keyword for config file - passive-if and check if it's
allowed to use the interface before join/send mcast
 * check if interface supports multicast before join/send mcast
2013-01-26 21:07:49 +00:00
kefren
ad4560771b use predefined group consts/macros instead of ptoning strings 2013-01-26 19:44:52 +00:00
kefren
ef9728bbf2 allow compile without -DINET6 2013-01-26 17:46:50 +00:00
kefren
269ea2d396 modify structures in order to accomodate IPv6 according to
draft-ietf-mpls-ldp-ipv6. Correct a little bit IPv6 hello path
2013-01-26 17:29:55 +00:00
christos
c1cffbf8b8 depend on TOOLS instead of __NetBSD__ for extra functionality 2013-01-26 16:58:14 +00:00
christos
ed8edcd60d make this cross-compile friendly. 2013-01-26 16:50:46 +00:00
christos
980139beab add debugging, fix warnings. 2013-01-26 00:31:49 +00:00
christos
7e2d9be620 add more msdos stuff. 2013-01-26 00:20:40 +00:00
christos
9ac350be41 make the buffer functions look exactly like the kernel ones and add other
cruft to make the kernel files compile.
2013-01-26 00:19:39 +00:00
christos
0d93f138b3 fix previous. 2013-01-24 19:55:28 +00:00
christos
0d3cde2c88 make it static const 2013-01-24 17:44:59 +00:00
christos
562664d1e3 - Fix single letter option parsing.
- Instead of returning 1 << index and 0 on error,
  return just index and -1 on error for the set_option*() routines.
2013-01-24 01:10:47 +00:00
christos
273b781b8e ok, we can create the filesystem now. 2013-01-23 22:47:18 +00:00
christos
6981fea57c return the bit of the option set, so that others can act on it. 2013-01-23 21:42:22 +00:00
christos
1c35cd3809 remove duplicated code, and try to cleanup parsing by using the shared code.
cd9660 needs a lot of work.
2013-01-23 21:32:32 +00:00
christos
0b556eae66 don't reuse the same variables 2013-01-23 21:03:15 +00:00
christos
3d364f5471 - add support for parsing different types; not just int.
- add beginning of msdos support.
2013-01-23 20:46:39 +00:00
dholland
dcd34a91c5 Stuff UFS_ in front of a few of ufs's symbols to reduce namespace
pollution. Specifically:
   ROOTINO -> UFS_ROOTINO
   WINO -> UFS_WINO
   NXADDR -> UFS_NXADDR
   NDADDR -> UFS_NDADDR
   NIADDR -> UFS_NIADDR
   MAXSYMLINKLEN -> UFS_MAXSYMLINKLEN
   MAXSYMLINKLEN_UFS[12] -> UFS[12]_MAXSYMLINKLEN (for consistency)

Sort out ext2fs's misuse of NDADDR and NIADDR; fortunately, these have
the same values in ext2fs and ffs.

No functional change intended.
2013-01-22 09:39:11 +00:00
rmind
3107fd1eb5 - nbuf_ensure_contig: rework to use m_ensure_contig(9), which will not free
the mbuf chain on failure.  Fixes some corner cases.  Improve regression
  test and sprinkle some asserts.
- npf_reassembly: clear nbuf on IPv6 reassembly failure path (partial fix).
  The problem was found and fix provided by Anthony Mallet.
2013-01-20 18:45:56 +00:00
christos
dbf8567fb0 ut_line does not have /dev in front of it. Add it, from dholland@ 2013-01-17 18:54:28 +00:00
kefren
5d14e92019 Make sure there is enough space for sockaddr subtypes
Use u_char for IP_MULTICAST_LOOP as specified in in.h
2013-01-16 08:28:44 +00:00
christos
14fb63db45 PR/47449: David Holland: Don't log to terminals with mesg n, unless it is a
wall message.
2013-01-15 22:37:04 +00:00
christos
6265ee0d3c - move the terminal handling in apropos-utils.c since htmp and pager are also
handled there.
- underline the name, section, and description so that it is prettier.
- change to bold terminal the terminal highlighting to match with less
2013-01-14 21:26:25 +00:00
christos
ee0ec621f0 Fix the #ifdef NOTYET, namely use the terminal standout mode to highlight the
search terms.
2013-01-14 18:04:58 +00:00
christos
cc03b84d06 Since mdocml decided to name headers that conflict with system ones (term.h)
move the header inclusion one up.
2013-01-14 18:01:59 +00:00
dholland
1cb1b27ac4 fix thinko 2013-01-14 03:05:41 +00:00
riastradh
014f25f78d After mount_lfs_parseargs, reset getopt for lfs_cleaner_main. 2013-01-10 08:35:26 +00:00
dsl
58b5bd2463 Add support for the xsave related data from cpuid 8.n.
Reorder the output so that the 'brand' string - which actually identifies
  the cpu is output first.
2013-01-07 23:20:42 +00:00
dsl
6d15685a79 Use full model number to index name strings - a lot of 256 element arrays
don't matter in usespace.
Update list of intel family 6 model names (all current cpus) to include
everything upto and including sandy bridge and ivy bridge.
My i7 is no longer reported as a random P II.
2013-01-06 23:17:35 +00:00
dsl
cbb941ff11 The Intel and AMD docs (more or less) agree on how the cpuid 'extended
family' and 'extended model' bits are used to create larger values
  than the original 16bit value allowed for.
Calculate and save these values 'up-front' and use them throughout.
Untangle the (backwards) nested switch statement for amd 'model 15' cpus.
Works as badly as ever on my i7.
2013-01-05 21:16:22 +00:00
dsl
cd90dce7d6 If the IOC_CPU_UCODE_GET_VERSION fails with ENOTTY, try issuing the
request that the amd64 kernel understands.
2013-01-05 16:38:12 +00:00
dsl
ef07d271f5 Fix x86_identify() for amd64 2013-01-05 15:33:00 +00:00
dsl
7d87936626 Change the i386 asm x86_identify() so it returns a value instead of writing
into global data.
Fix a stack alignment fubar that would cause a crash on a cirix 486.
Refactor identify code to common setup for normal identify and ucode
identify - which was missing a memset().
2013-01-05 15:27:45 +00:00
dsl
438bdb2a64 #include sys/ioctl.h 2013-01-02 19:24:30 +00:00
dsl
a97d5b18ca pstat is a kmem groveller, set -D_KMEMUSER in CPPFLAGS 2013-01-02 10:43:11 +00:00
plunky
c5b7b2f38c whitespace ' ' -> ' ' 2012-12-26 17:57:49 +00:00
plunky
b504b003b7 add a comment pointing out that the link-mode may need to be
changed manually, for devices which cannot authenticate

for PR/47286
2012-12-26 17:33:09 +00:00
reed
71cb89f544 fix spelling typo 2012-12-25 20:31:03 +00:00
rmind
352f160615 - Rework NPF's nbuf interface: use advancing and ensuring as a main method.
Eliminate unnecessary copy and simplify.  Adapt regression tests.
- Simplify ICMP ALG a little.  While here, handle ICMP ECHO for traceroute.
- Minor fixes, misc cleanup.
2012-12-24 19:05:42 +00:00
rmind
57ff5416fd - Add NPF version check in proplist as well, not only ioctl. Bump the version.
- Fix a bug in table entry lookup.
- Updates/fixes to the man pages.  Misc.
2012-12-23 21:01:03 +00:00
wiz
0d9af955c5 Typo fix. 2012-12-20 20:31:01 +00:00
wiz
4612bed094 Add missing letter and use x.y versions for Fx/Nx. 2012-12-20 20:17:26 +00:00
christos
357b749529 move flavor to misc.c because pax needs it. 2012-12-20 19:09:25 +00:00
mlelstv
821ebbb223 joerg@: just use unsigned int please 2012-12-20 18:58:37 +00:00
christos
3afc22d858 Implement the "flavor" output discussed in tech-userlevel@, by Brooks Davis 2012-12-20 16:43:16 +00:00
jakllsch
0f85a59a25 Even though the kernel will fill the source address in, it looks weird in
trace output to see a not-obviously-bogus uninitialized source address go
into the kernel.
2012-12-15 04:40:33 +00:00
christos
d80c5e8655 make us compatible with FreeBSD (for -n) (Brooks Davies) 2012-12-15 01:24:40 +00:00
roy
c050bfe509 Intsead of forcing out each RA at shutdown and sleeping we now use
the existing timer model and wait for each RA to expire itself after
sending the required number of transmissions.

This allows for a faster and saner shutdown.
2012-12-14 09:48:31 +00:00
pgoyette
270592accd Since we're no longer making a copy of the option args, we shouldn't
attempt to free it.
2012-12-14 05:29:28 +00:00
wiz
7503eaacd8 Formatting nit. 2012-12-13 21:49:38 +00:00
christos
dd6ce158a9 - no point in allocating memory to hold command line arguments.
- allocate memory inside the function used.
2012-12-13 20:06:42 +00:00
christos
a16db3405d PR/47318: Henning Petersen: Replace (r)index with str(r)chr in inetd.c
And while here strncpy with strlcpy
2012-12-13 19:38:40 +00:00
christos
83779a48b3 PR/47316: Henning Petersen: Memory leak in envstat with config file. 2012-12-13 19:31:25 +00:00
roy
baf998f70e Remove debug stuff. 2012-12-13 15:40:05 +00:00
roy
83ab565911 Remove the iflist array and store ifflags in rainfo.
Add support for SIGHUP to re-read the configuration for each interface.
If an invalid configuration is found, we continue to use the old one;
otherwise we expire the current one and then start advertising the new one.

Specififed interfaces don't have to exist at startup.
If specified interfaces arrive, load their config and start advertising.
If they depart, remove their rainfo structure and continue.

Fixes PR/43881 and PR/47311
2012-12-13 15:36:35 +00:00
christos
7f80b3db6a - No mention of -t in the usage message or the manpage SYNOPSIS (Brooks Davis) 2012-12-12 15:52:10 +00:00
christos
40e1da4105 - No "j" in the getopt string. (Brooks Davis) 2012-12-12 15:51:41 +00:00
christos
d89c5e4d96 - two entries for rmd160digest in misc.c (Brooks Davis) 2012-12-12 15:51:04 +00:00
christos
cbc85fc672 -n is incorrectly supressing the ".." lines. (Brooks Davis) 2012-12-12 15:50:35 +00:00
roy
7175086342 Add support for the noifprefix keyword which stops rtadvd(8) gathing prefix
information from the interface if no addrs are present in rtadvd.conf(5).
2012-12-11 16:37:23 +00:00
christos
faa0524c86 PR/47304: Kouki Ooyatsu: -s (source IPv6 address to be used) option does not
work because the wrong variable is used.
XXX: Pullup to 6.
2012-12-10 18:11:33 +00:00
rmind
f960ba1c63 npfctl: add 'validate' command to check the config, but not load it. Update
the man page.  Also add a small note about 'debug' command, PR/47298.
2012-12-10 02:26:04 +00:00
rmind
7d7f70e66e - npf.conf(5): fix of the example config.
- Mention npf_ext_log in a comment.
2012-12-06 22:36:51 +00:00
blymn
9a57dec753 Fix error message when trying to add a group using -g =uid that
that already exists, the old version printed the wrong GID.
2012-11-28 11:31:27 +00:00
blymn
2da0bfd2ff Google Code In bug fix by Philip Hayes, fixes bin/41049 2012-11-28 11:20:58 +00:00
rmind
5111d7eafd npfctl: extend syntax for extracting interface IP address(es) by the family. 2012-11-26 20:34:28 +00:00
pooka
4037e69f4e Attempt 2 at fixing DragonFly util.h conflicts: include util.h only for
non-tool builds.
(why does the tool build prefer host headers instead of compat headers?)
2012-11-26 20:13:54 +00:00
rmind
4a1b0d45b2 npfctl(8): mention table listing. 2012-11-15 22:22:53 +00:00
rmind
b4a9940e50 npfctl: switch to ecalloc(3). 2012-11-15 22:20:27 +00:00
njoly
3373228440 Fix mandoc(1) output, use right arrow special character. 2012-11-14 23:11:27 +00:00
kefren
27b5caabc1 Use local-link address as source for hellos 2012-11-13 06:58:58 +00:00
pgoyette
76b8726c47 Repair another %lu --> %zd - this one was caught by building for
evbmips port
2012-11-13 01:08:51 +00:00
christos
c0b74ca714 fix the build; ssize_t is %zd not %lu 2012-11-12 22:51:42 +00:00
wiz
54f8ce07cd New sentence, new line. Bump date for previous. 2012-11-12 22:46:59 +00:00
kefren
6cb0642362 * add initial IPv6 support - still incomplete at this moment, but it sends
out there IPv6 hellos. Interoperability not yet tested.
* sync man page with reality
2012-11-12 18:39:00 +00:00
apb
f950d3cf71 The number of active vnodes may grow in between the sysctl call
that figures out the size, and the sysctl call that fetches the data.

Previously, any growth at all would have resulted in this error message:

        pstat: sysctl: KERN_VNODE: Cannot allocate memory

Now allow for growth of 100 vnodes, or 5%, or both.  Growth in
excess of 2% or 6000 vnodes has been observed in practice.  Also
ignore ENOMEM from the second sysctl call, in case the growth was
even more than we anticipated.
2012-11-10 11:01:52 +00:00
christos
98f3134321 If you cannot parse .SH NAME, like in the case of the ksh93 man page
where the .SH is followed by a conditional:

.SH NAME
.if \nZ=0 \{\
text text text
.\}

at least don't core-dump.
2012-11-08 19:17:54 +00:00
dholland
cbb9c7214a Minor grammar fix, from Bug Hunting in PR 47159. 2012-11-06 19:08:45 +00:00
rmind
7b016567c0 npfctl: switch to efun(3) routines. 2012-11-05 23:47:12 +00:00
christos
8c13db6ad0 add the headers you need 2012-11-04 22:47:21 +00:00
christos
4f048a363d include the headers you use 2012-11-04 22:46:08 +00:00
christos
24f9b938a0 add missing header 2012-11-04 22:38:19 +00:00
christos
39a3c792a3 include utmpx.h if needed 2012-11-04 22:36:58 +00:00
christos
a226200999 include <pwd.h> 2012-11-04 22:32:01 +00:00
christos
1f16d7465e include the headers that you need. 2012-11-04 22:26:04 +00:00
christos
c6352516aa include the headers you need 2012-11-04 22:21:11 +00:00
apb
f669c7071f Add references to ${_NETBSD_VERSION_DEPENDS} for files that
need to be re-created when the NetBSD version changes.  They
will also be re-created when any build settings are changed.
2012-11-04 11:12:31 +00:00
christos
599362a983 put in /sbin 2012-11-01 03:21:49 +00:00
martin
73809d4025 gcc 4.1 is not smart enough to notice "arg" is only used when initialized
correctly and produces a "might be used unintialized" warning.
2012-10-31 08:54:39 +00:00
wiz
4aa4bc5963 Remove trailing whitespace. 2012-10-30 23:03:02 +00:00
rkujawa
6ee58bf1d4 Note enchancements that appeared in NetBSD 6.0. 2012-10-30 21:24:26 +00:00
rmind
64647e51e4 Implement NPF table listing and preservation of entries on reload.
Bump the version.
2012-10-29 02:27:11 +00:00
rmind
3ed953299c Fix for npfctl show case. Improve some description while here. 2012-10-28 16:27:20 +00:00
seanb
c3008a4839 Ensure entire sockaddr_dl is obtained. May not have
been the case previously for interfaces with long names.
2012-10-26 16:52:52 +00:00
martin
2900740595 Make warnings non fatal for older gcc versions - I couldn't figure out how to
shut up gcc when compiling for vax. Feel free to fix differently if you
find a better solution.
2012-10-25 15:14:36 +00:00
drochner
16e95cd0dc avoid dummy structure definition, include a system header instead,
looks just cleaner
2012-10-17 20:22:15 +00:00
plunky
048d95d5ff no trailing comma on enum 2012-10-14 08:35:45 +00:00
plunky
c61317e3bf add code to ensure that SO_SNDBUF is large enough on client connections,
as was previously done for server mode
2012-10-14 08:31:35 +00:00
christos
0b112faa75 disable encoding of globbing characters for now. 2012-10-07 18:40:49 +00:00
wiz
b1203a9851 Make mandb path configurable. makemandb (and related tools) use
the path from the _mandb variable from man.conf now.

Set _mandb in man.conf to same value as was used before.

From Abhinav Upadhyay <er.abhinav.upadhyay@gmail.com>.
2012-10-06 15:33:59 +00:00
msaitoh
8edba753e8 RFC 5848 2012-10-05 16:15:45 +00:00
wiz
c4b7eb510b Sync usage with man page. 2012-10-05 09:18:08 +00:00
wiz
324794350b Fix typos; remove trailing whitespace; add missing options to SYNOPSIS. 2012-10-05 09:18:02 +00:00
wiz
519eb1daa9 Fix typo in comment. 2012-10-05 09:17:29 +00:00
christos
b73d92b069 Implement FreeBSD's "nochange" keyworld which causes the existance of a
filesystem object to be checked but none of its attiributes.(brooks)
2012-10-05 01:31:05 +00:00
christos
23fe062937 Implement FreeBSD's "nochange" keyworld which causes the existance of a
filesystem object to be checked but none of its attributes. (brooks)
2012-10-05 01:30:36 +00:00
christos
1529f30b49 Encode literal global characters in files. Otherwise the results of
updating a directory using the resulting spec will be surprising.

See http://svnweb.freebsd.org/base/head/usr.sbin/mtree/test/test00.sh
for test cases.
(brooks)
2012-10-05 01:28:20 +00:00
christos
14b8803532 NetBSD needs <time.h> 2012-10-05 01:27:29 +00:00
christos
9e84d4e8c2 Implement FreeBSD's -f spec1 -f spec2 spec comparision function. This
is more useful than -C and diff because it highlights the keys that have
changed value so for example, you can see that the size of a file has
not changed but the contents have. (brooks)
2012-10-05 01:26:56 +00:00
christos
d07df9451a Allow uid and uname or gid and gname to both be printed while
preserving the behavior of falling back to [ug]id when the name is not
resolvable. (brooks)
2012-10-05 01:21:44 +00:00
christos
09b2a8d434 clarify seconds.09nanoseconds format (brooks) 2012-10-05 01:19:54 +00:00
christos
c80bcab895 add -j flag to indent directory blocks (from brooks) 2012-10-05 01:13:50 +00:00
christos
43c54169be add -q flag to silence warnings about symlinks to existing dirs (from OpenBSD
via brooks)
2012-10-05 01:05:14 +00:00
christos
0c2ce7c15d add -n flag to disable comments (brook) 2012-10-05 01:01:07 +00:00
christos
8a1488a16f account for differences in digest names 2012-10-05 00:59:35 +00:00
christos
661bb795fb our fts compare routine is less constified. 2012-10-05 00:58:46 +00:00
christos
3007bc41f2 explicitly include <sys/stat.h> 2012-10-05 00:42:00 +00:00
christos
dc074e0229 more const
check if we support SHA384 before using
(brooks)
2012-10-05 00:41:24 +00:00
christos
17d9400e73 remove dup extern (brooks) 2012-10-05 00:40:51 +00:00
wiz
4f36cb9e44 - Sort order of options mentioned in text;
- improve wording;
- remove unneeded macros (fixes mandoc(1) warnings);
- in the `EXAMPLES' section, for `-d', mention the use of `-U'
  besides that of `-u' (as the former is a variant on the latter).

From Bug Hunting.
2012-10-03 19:27:48 +00:00
rmind
e7cdd21f2e npfctl/yyerror(): print the right line number if we already parsed the line. 2012-10-02 23:38:52 +00:00
wiz
df3325de63 Wording, more macros. 2012-09-30 21:15:08 +00:00
rmind
395bd44a04 Add some content to the Procedures section. 2012-09-30 21:09:30 +00:00
wiz
cda4ed683f Use more markup. New sentence, new line. 2012-09-30 13:15:03 +00:00
spz
34865a25d0 Add some content to the "Rules" section. 2012-09-30 12:59:31 +00:00
wiz
c92c93101c Whitespace fixes, remove unnecessary Pp
XXX: Subsections Rules and Procedures seem empty?
2012-09-30 07:43:03 +00:00
rmind
703f289235 npf.conf(5): add syntax section and a first cut describing the structural
elements.  Some improvements and fixes from spz@.
2012-09-29 19:50:03 +00:00
spz
6d80dd36ba re-work the description part of the man page, as discussed with rmind@ 2012-09-28 18:36:02 +00:00
rmind
aed1e968f7 npf.conf(5): improve and explain grammar definition. 2012-09-26 21:58:27 +00:00
ast
0b98a54c44 Make sure that the "to fix, run: ..." instructions actually work cut-and-paste
By default postinstall has mode 644 so /bin/sh or similar needs to be prepended
2012-09-22 09:20:06 +00:00
rmind
8c6e21bf5e Implement dynamic NPF extensions interface. An extension consists of
dynamically loaded module (.so) supplementing npfctl(8) and a kernel
module.  Move normalisation and logging functionality into their own
extensions.  More improvements to come.
2012-09-16 13:47:41 +00:00
plunky
ea7708e17f IPF 5.1.2 is in external/bsd/ipf and sys/external/bsd/ipf now;
these files are obsolete
2012-09-15 18:12:17 +00:00
plunky
19ea14f457 does not need -I${NETBSDSRCDIR}/sys/dist/ipf here, the include files
are installed in /usr/include/netinet
2012-09-15 17:46:25 +00:00
joerg
c4eabd7bd6 More __dead 2012-09-14 15:37:03 +00:00
joerg
ed602fb487 Don't use const foo const as type, one const is enough. 2012-09-13 21:44:49 +00:00
martin
5a79cb1f57 Do not build npftest without shared libraries - it can't work. 2012-09-13 21:02:50 +00:00
wiz
2ea831cdd8 Fix typo in syslog message.
From Edgar Fuß in PR 46950.
2012-09-13 11:09:41 +00:00
rjs
5abdc4ce9a Allow build with MKRUMP=no. 2012-09-12 19:20:37 +00:00
martin
9cf2fc91c7 Fix printf format 2012-09-12 16:26:02 +00:00
martin
18d0240310 Install the npftest binary 2012-09-12 14:06:02 +00:00
martin
a76a87c096 Add two new command line options to help integration into ATF:
-L lists the available test cases, -T executes a single named test.
2012-09-12 08:47:14 +00:00
wiz
43eaa46ea3 Use emalloc in one more place, like the rest of the code does.
From Abhinav Upadhyay <er.abhinav.upadhyay@gmail.com>.
2012-09-07 11:29:04 +00:00
wiz
ab20ab348a Fix usage, from Abhinav Upadhyay <er.abhinav.upadhyay@gmail.com>. 2012-09-07 11:28:46 +00:00
riz
d41e703879 Disable default build of debugging info. 2012-09-06 16:39:07 +00:00
rmind
8f51214c07 npfctl usage: minor formatting fix. 2012-09-01 19:08:01 +00:00
wiz
498ab6ee99 cgd and sjg relicensed this under 2-clause-BSD.
Reported by Ed Schouten <ed@FreeBSD.org> to tech-userlevel.

Adapt license to match FreeBSD's version, leaving Ed out
since according to CVS logs, he didn't touch NetBSD's version.
2012-08-31 19:55:23 +00:00
skrll
3bbaf20745 Don't advertise the abt/und/irq stack pointers as accessible to crash(8)
when they're not
2012-08-31 11:52:39 +00:00
drochner
629e6fc4b6 fix for archs w/o cpu ucode driver: add dummy definition 2012-08-31 07:27:27 +00:00
wiz
e93044e5ab Add -Q flag:
Print only fatal error messages (i.e., when the database is left in
an inconsistent state and needs manual intervention).

From Abhinav Upadhyay <er.abhinav.upadhyay@gmail.com>.
2012-08-29 20:33:01 +00:00
drochner
312c339026 Extend the CPU microcode update framework to support Intel x86 CPUs.
Contrary to the AMD implementation, it doesn't use xcalls to distribute
the update to all CPUs but relies on cpuctl(8) to bind itself to the
right CPU -- to keep it simple and avoid possible problems with
hyperthreading.
Also, it doesn't parse the vendor supplied file to pick the right
part for the present CPU model but relies on userland to prepare
files with specific filenames. I'll commit a pkg for this in a minute
(pkgsrc/sysutils/intel-microcode).
The ioctl interface changed; compatibility is provided (should be
limited to COMPAT_NETBSD6 as soon as this is available).
2012-08-29 17:13:21 +00:00
wiz
e700cc04ea Dots as macro arguments need quoting.
Bug reported by Paul Goyette.
2012-08-26 14:50:45 +00:00
wiz
3450e15562 Sync usage with manpage. 2012-08-25 12:37:12 +00:00
wiz
6110b05d8f Sort options in SYNOPSIS. 2012-08-25 12:37:00 +00:00
rmind
b8c27e4a39 npftest:
- Do not stop running other tests, if some tests fail.
- Fix some endianness bugs in the test cases.

Tested on sparc64 by martin@, all tests pass.
2012-08-21 20:52:11 +00:00
zafer
d4798304b1 Pretty print multipath routes. From FreeBSD.
ok christos@
2012-08-16 00:40:28 +00:00
rmind
e0cfa502eb Add npf_state_setsampler() for _NPF_TESTING case. This also fixes the build. 2012-08-15 19:47:38 +00:00
apb
03766ceab0 Remove the ability to specify multiple colon-separated file names with
a single "-s" option.  Multiple "-s" options must now be used instead.
We have been printing a warning about this since 2008-09-14.
2012-08-15 16:26:41 +00:00
apb
1de7d5f1b7 Remove the ability to specify multiple colon-separated fiel names with
a single "-s" option.  Multiple "-s" options must now be used instead.
We have been printing a warning about this since 2008-09-14.
2012-08-15 16:21:41 +00:00
apb
74a992e866 Don't rely on stat(1) with format "%SHr" to print the correct names.
That uses devname(3) internally, which doesn't work at all in a cross
build environment, and doesn't do what I thought even in a native
environment.

Instead, parse the device major numbers for the pty master and slave
devices from the output of "MAKEDEV -s pty0" and check those against the
actual device node that we are thinking of removing.
2012-08-15 12:48:19 +00:00
joerg
dcdf3b2d8d Fix memset usage. 2012-08-15 00:16:06 +00:00
rmind
68f7a7bc54 Move and rename librumpdev_npf to librumpnet_npf. 2012-08-14 22:31:43 +00:00
apb
508b448a57 Change do_ptyfsoldnodes to use stat(1) to check whether a file is
a device node of the correct type.  We no longer need to get the
major number from searching the MAKEDEV script, because the output
from stat(1) will contain the strings "tty" or "pty" instead of
the numeric major numbers.  We also no longer rely on "find -ls".
2012-08-14 13:11:24 +00:00
apb
0c31a5f126 Use grep -E and grep -F instead of egrep and fgrep. This reduces the
number of tools that may need to be passed in the environment.
2012-08-14 12:07:57 +00:00
apb
beaffa0794 Remove the "stat" shell function (stat op format target value).
It has been unused since revision 1.14 dated 2006-05-30.
2012-08-14 10:38:40 +00:00
christos
c3c4374a7d use freeaddrinfo() 2012-08-14 08:23:30 +00:00
dholland
9011835d97 Improve DESCRIPTION, fix up English usage. 2012-08-14 08:08:29 +00:00
dholland
4ce2ad59b6 Grr. The ATF quota tests demand failing silently in certain circumstances.
For netbsd-6 we will just have to go with the flow, as I'm not touching
anything outside edquota tonight.
2012-08-14 04:53:43 +00:00
dholland
c9817be0c7 three more minor fixes. 2012-08-14 04:48:42 +00:00
dholland
40b0b3a839 Make editor-based edquota work again.
The format is somewhat different; I'm operating under the assumption
that nobody has automated editing scripts for the old format because
it's much easier just to use the command-line interface of
edquota. The new format is more scalable and more parseable.

Also, do a better job of diagnosing editing errors, and don't blindly
erase all quota information for the user being edited when a parse
error occurs after editing.
2012-08-14 03:55:48 +00:00
dholland
b743f28223 Bail out early if none of the mounted volumes support quotas. Avoids a
null print in interactive use.
2012-08-13 23:08:58 +00:00
dholland
e8ef0182c9 Minor cleanup: use bitfields instead of a flags word for private state
flags, remove now-unused qfname field.
2012-08-13 22:21:05 +00:00
martin
ff5fcf4714 Cleanup temporary file 2012-08-13 18:22:25 +00:00
martin
1d5deaee0c Make "fix ptyfsoldnodes" more verbose 2012-08-13 15:17:16 +00:00
wiz
5c9a0052ca Sync usage with manpage. End it with a newline. 2012-08-13 12:37:18 +00:00
wiz
a0b9ae45e4 Sort options in SYNOPSIS. New sentence, new line. Improve descriptions.
Use more markup. Sort option descriptions. Add arguments to option descriptions.
Punctuation nits.
2012-08-13 12:37:05 +00:00
pgoyette
f283cd004e Add -4 and -6 options to rpd.lockd for consistent control over the
protocols to which it listens.  As discussed on tech-userlevel.
2012-08-13 12:22:21 +00:00
martin
d08b85050c Add a ptyfsoldnodes item that checks/removes old /dev/{p,t}ty* nodes
if ptyfs is used.
2012-08-13 10:20:52 +00:00
wiz
b8117286a3 Sort descriptions. Fix macro. Move example to new EXAMPLES section. Add EXIT STATUS section 2012-08-13 08:39:28 +00:00
christos
eff766617d Let nfsd behave like all other programs: tries to use both inet4 and inet6
by default and both udp and tcp: -4 uses only inet4, -6 uses only inet6,
-t uses only tcp, -u uses only udp. For compatibility, we detect old option
usage, we warn, and DTRT.
2012-08-13 08:19:11 +00:00
rmind
f95b2549d9 - npfctl show: add most of the missing cases.
- Few minor improvements to NPF man pages.
2012-08-13 01:18:31 +00:00
rmind
63f44833ba - Extend npftest: add ruleset inspection testing from the config generated
by npfctl debug functionality.  Auto-create npftest interfaces for this.
- NPF sessions: combine protocol and interface into a separate substructure,
  share between the entries and thus fix the handling of them.  Constify.
- npftest: add regression tests for NAT policies.
- npf_build_nat: simplify and fix bi-NAT regression.
- Bump yacc stack size for npfctl.
2012-08-12 03:35:13 +00:00
wiz
ae90bf6a58 Bug fix for PR 46733:
> makemandb always reports the same number for "Total Number of new or
 > updated pages enountered" and "Total number of (hard or symbolic)
 > links found".

Patch from Abhinav Upadhyay.
2012-08-11 21:07:13 +00:00
joerg
9edf9a0457 Remove many HAVE_GCC || HAVE_PCC conditionals as the options also apply
to Clang. Add a few cases of HAVE_LLVM for -fno-strict-aliasing.
2012-08-10 12:10:27 +00:00
christos
2be2cb6bfb exclude programs for MKRUMP = no 2012-08-08 14:13:46 +00:00
msaitoh
ef486fed67 Fix a bug that incorrect RA packet is sent if rtadvd.conf exists.
Fixes PR#46580 reported by Takahiro HAYASHI.
2012-08-08 04:05:26 +00:00
hannken
a8055efc22 Initialize `fss_flags' before setting an individual bit.
Not a real problem as there is only one valid bit yet.

From Edgar Fuss via tech-kern@netbsd.org
2012-07-28 15:09:44 +00:00
rmind
4ad5029440 - npf_fetch_tcpopts: fix off-by-one when validating TCP option length
against the maximum allowed.
- npf_tcp_inwindow: be more liberal with npf_fetch_tcpopts().
- Few minor improvements to npftest.
2012-07-21 17:11:01 +00:00
manu
075ba0e590 - Fix same vnodes associated with multiple cookies
The scheme used to retreive known nodes on lookup was flawed, as it only
used parent and name. This produced a different cookie for the same file
if it was renamed, when looking up ../ or when dealing with multiple files
associated with the same name through link(2).

We therefore abandon the use of node name and introduce hashed lists of
inodes. This causes a huge rewrite of reclaim code, which do not attempt
to keep parents allocated until all their children are reclaimed

- Fix race conditions in reclaim
There are a few situations where we issue multiple FUSE operations for
a PUFFS operation. On reclaim, we therefore have to wait for all FUSE
operation to complete, not just the current exchanges. We do this by
introducing node reference count with node_ref() and node_rele().

- Detect data loss caused by FAF
VOP_PUTPAGES causes FAF writes where the kernel does not check the
operation result. At least issue a warning on error.

- Enjoy FAF shortcut on setattr
No need to wait for the result if the kernel does not want it. There is
however an exception for setattr that touch the size, we need to wait
for completion because we have other operations queued for after the
resize.

- Fix fchmod() on write-open file
fchmod() on a node open with write privilege will send setattr with both mode and size set. This confuses some FUSE filesystem. Therefore we send two FUSE operations, one for mode, and one for size.

- Remove node TTL handling for netbsd-5 for simplicity sake. The code
still builds on netbsd-5 but does not have the node TTL feature anymore.
It works fine with kernel support on netbsd-6.
2012-07-21 05:49:42 +00:00
rmind
083c690112 - npfctl_print_stats: beautification a la French style.
- npfctl_icmpcode: fix the build break.
2012-07-19 22:22:53 +00:00
spz
7cf84a83d6 teach npf ipv6-icmp
reviewed by rmind@
2012-07-19 21:52:29 +00:00
joerg
7219ead3a1 Add missing __dead. 2012-07-19 06:31:26 +00:00
spz
b1a40de246 resource leak (Coverity issues 274383 and 274384) 2012-07-15 09:08:29 +00:00
rmind
a3b239f6f3 - Rework NPF tables and fix support for IPv6. Implement tree table type
using radix / Patricia tree.  Universal IPv4/IPv6 comparator for ptree(3)
  was contributed by Matt Thomas.
- NPF tables: update regression tests, improve npfctl(8) error messages.
- Fix few bugs when using kernel modules and handle module autounloader.
- Few other fixes and misc cleanups.
- Bump the version.
2012-07-15 00:22:58 +00:00
christos
550109f835 MKCRYPTO_IDEA is no more 2012-07-14 04:03:44 +00:00
uwe
4b084fb4d9 Fix typo in a message. 2012-07-08 23:18:23 +00:00
wiz
ac0c6a8e78 From Bug Hunting: Add vndcompress(1) to SEE ALSO, bump date.
While here:
New sentence, new line.
2012-07-08 22:49:55 +00:00
rmind
33b678d7e0 NPF improvements:
- Add NPF_OPCODE_PROTO to match the address and/or protocol only.
- Update parser to support arbitrary "pass proto <name/number>".
- Fix IPv6 address and protocol handling (add a regression test).
- Fix few theorethical races in session handling module.
- Misc fixes, simplifications and some clean up.
2012-07-01 23:21:06 +00:00
kefren
690d3837f6 add ldpd rc.d script here too 2012-06-28 16:34:06 +00:00
rmind
4940c18bab Fix and update npf.conf(5), npfctl(8) and its usage message. 2012-06-27 23:05:28 +00:00
jdf
17ec07bc2d * Remove spurious period in name section
* remove spurious argument to Nm macro
Patch supplied by Bug Hunting.
2012-06-23 20:49:14 +00:00
rmind
53e5b8cc71 NPF:
- Rename some functions for consistency and de-inline them.
- Fix few invalid asserts (add regressoin test).
- Use pserialize(9) for ALG interface.
- Minor fixes, sprinkle many comments.
2012-06-22 13:43:17 +00:00
sjg
07f6254fe3 Add -Z to enable sparse files - for ffs at least.
Based on a patch from shesha at juniper.
2012-06-22 06:15:18 +00:00
christos
8565a6a499 remove dup O_NDELAY. 2012-06-20 01:39:34 +00:00
christos
0787d10414 - fix writev1() to pre-decrement count.
- always open ttys with O_NDELAY.
2012-06-19 13:44:35 +00:00
tron
dd5f61399d Fix broken IPv6 support. My Mac OS X Lion NFS client now happily
talks to my NetBSD 6.0_BETA2 NFS server over IPv6.
2012-06-18 20:30:32 +00:00
christos
dafeb4b2c4 don't call isatty() to the fd before opening it. 2012-06-18 19:17:42 +00:00
christos
b416920400 remove error(1) output 2012-06-16 01:34:10 +00:00
christos
55cd49b90e make this compile again. 2012-06-16 01:31:33 +00:00
rmind
7a3e0c216a - Rework NPF NAT syntax to be more structured and support future additions
of different types and configurations of NAT.
- npfctl: improve disassemble and show-config command functionality.
- Fix custom ICMP code and type filtering.
2012-06-15 23:24:08 +00:00
hannken
58d3be794f File system snapshots are no longer experimental.
Forgot to chang this man page in Nov 2011.
2012-06-11 15:25:14 +00:00
christos
92dd06985f WARNS=4 2012-06-06 00:33:45 +00:00
christos
a480a96956 Open and write to ttys using non-blocking I/O to prevent DoS when hardware
or software flow control prevents tty writes or when the tty line is too
slow to respond.
2012-06-05 19:33:17 +00:00
manu
1d0360b1c9 Add placeholder so that we can later add allbacks without breaking the ABI 2012-06-05 15:04:18 +00:00
riastradh
b8c3b27f99 Kill the IN_RENAME in-core inode flag in ufs and ext2fs.
Now that rename works we need not to wave this sort of voodoo at it.

ok dholland
2012-06-04 20:13:47 +00:00
rmind
79afee64f7 npftest: add a module for TCP state tracking and add few test cases. 2012-06-04 00:28:34 +00:00
joerg
1907ec3a61 Switch device database to cdb(5). Rework ttyname(3) and ttyname_r(3) to
depend on new devname_r(3) as heart. Add /dev/pts magic directly to
devname(3). While it can lead to returning non-existing paths, the
behavior is more consistent that way. Drop caching layer in devname(3),
it doesn't buy anything for the common case of having access to the
database. Teach devname(3) proper fallback behavior of scanning /dev.
Create both old-style and new-style database for now in /etc/rc.d/sysdb.
2012-06-03 21:42:44 +00:00
jnemeth
5a5317f49b PR/46500 - Henning Petersen -- wrong permissions on create .seq files 2012-06-02 03:32:53 +00:00
jnemeth
220a7d2bb0 add _tss to uid and gid checks 2012-06-01 21:59:06 +00:00
wiz
1c095f6bdd Remove superfluous Pp 2012-05-30 22:00:44 +00:00
rmind
fb07f475c0 npftest: add a stream processor, which prints out the TCP state information.
A tool for debugging connection tracking from tcpdump -w captured data.
2012-05-30 21:38:03 +00:00
rmind
ac69c0c39c npfctl(8): add show-config command. Also, update syntax. 2012-05-30 21:30:07 +00:00
uebayasi
6b4d01fdae Rename wake(8) to wakeonlan(8). Approved by core@. 2012-05-26 01:58:17 +00:00
christos
99b3039fe6 improve error handling. 2012-05-15 01:22:50 +00:00
wiz
06b206851a Bump date for previous. 2012-05-12 21:42:38 +00:00
dholland
faaf15b7e2 Remove traces of -D flag, which no longer does anything. 2012-05-12 19:47:26 +00:00
njoly
8b220255d1 Fix alignment display for temperature, fans and integer units. 2012-05-11 18:41:12 +00:00
joerg
52222de363 KNF 2012-05-10 15:36:09 +00:00
wiz
d099c69274 PR 46419 by Abhinav Upadhyay using his updated patch:
Clean up after removing man page aliases.
2012-05-07 11:18:16 +00:00
wiz
66c3a8d39a The new apropos(1) incorrectly displays hyphens in the first line
of the search results for a few man pages (for man(7) based man
pages).

Use patch from Abhinav Upadhyay in PR 46408 to fix this.
2012-05-04 23:50:26 +00:00
joerg
17770eb834 usage is dead. name_len should be read as unsigned byte. 2012-04-29 13:32:21 +00:00