Commit Graph

287719 Commits

Author SHA1 Message Date
yamaguchi
a98c13e644 Added a limitation of the number of processing packets
because a enqueuing process can not add packets over IFQ_MAXLEN

and removed reschedule at pppoeintr()
because it also scheduled at enqueuing process.
2021-05-19 03:35:27 +00:00
yamaguchi
8539c94ed7 Make functions that use for logging MP-safe
There is no change in behavior.
2021-05-19 02:14:19 +00:00
yamaguchi
8bd40ada6c Added clear of dns addresses when IPCP is closed 2021-05-19 02:07:20 +00:00
yamaguchi
1c8972237f Added logs on dropping IPCP and IPv6CP packets 2021-05-19 02:02:46 +00:00
yamaguchi
99e663ae82 remove a wrong ntohs().
The variable is already host-byte-order.
2021-05-19 01:54:09 +00:00
yamaguchi
070cb7ea5c Added a log about rejection of IPCP address option 2021-05-19 01:42:35 +00:00
kre
e177ba5371 Fix a bug in the built-in echo in /bin/sh reported in private mail by
Oguz <oguzismailuysal@gmail.com>

If echo detects an I/O error, it does exit(1) (that's fine) but then
the next echo also does exit(1) even without any errors of its own,
and every following echo writing to stdout does the same thing.

eg:

echo foo >&- ; echo $?; echo $?; ( echo $( echo $?; echo $?) ; echo $? )
1
1
1 1
1

The first echo writes nothing (stdout is closed) but does exit(1).
The second echo writes "1" (correct, the exit status of the previous
echo) and should exit(0) - but doesn't.  This pattern continues...

While here, conform to the POSIX requirement on echo (and many other
standard utilities, but definitely not all) that when the utility
does exit(>0) a message must be written to stderr (and vice versa
in many cases).   Our echo (as shown above) did the exit(1) part
when it detected the I/O error, but no message is sent to stderr.
Fix that while we're here.

Similar changes are required for /bin/echo (coming soon), and
/usr/bin/printf (which is also the sh builtin printf) - except
currently that one kind of conforms, as it ignores errors writing
to stdout (as do large numbers of other utilities).  For many
programs that's kind of acceptable, but where the sole purpose of
the program is to write to stdout, it really isn't.   Also to be
fixed soon.
2021-05-18 21:39:06 +00:00
kre
78eadc76d4 Add two new sub-tests to the echo test case of the t_builtins shell ATF test.
The first verifies that echo exits >0 when it encounters an I/O error on
its output (this part would have succeeded for a long time).  It also
verifies the POSIX requirement that when most standard utilities (or
perhaps many rather than most) exit(>0) they must write a message to stderr.
Our sh's built in echo did not do that (nor does /bin/echo but that's not
relevant here).

The second demonstrates (on an unfixed built-in echo) a bug reported in
private e-mail by Oguz <oguzismailuysal@gmail.com> where once an instance of
the built-in echo has detected an I/O error, all later invocations of
the built-in echo, with no I/O errors of their own, also exit(1) (the error
status on stdout is not cleared, each echo sees the "I/O error occurred" and
does exit(1)).

In this second sub-test, the "2>&-" on the first echo command is simply
an artifact caused by the test harness - the "check" function verifies
that exit((>0) requires a message on stderr (and vice versa), but that
only applies to most (or many) utilities, echo is one, but sh is not.
In the second test, the exit status comes from sh - sh is permitted to
write to stderr (via the echo command it runs in this case) and still
exit(0).   But the check function in the test does not understand that
subtlety.   So, we simply suppress the stderr message by closing stderr
(the first of these two new sub-tests has verified that the message exists)..
2021-05-18 21:37:56 +00:00
christos
407a19b76a restore -iremap functionality which was omitted by a merge botch, and then
remove as unused later.
2021-05-18 21:34:03 +00:00
dholland
c736b6a748 Remove some unused variables, found by gcc -Wall. 2021-05-18 20:34:20 +00:00
dholland
562b6c7f9a Print ptrdiff_t with %td, not %d. Appeared in passing in PR 56188. 2021-05-18 20:32:18 +00:00
sjg
13862ba5e3 Do not trust that /nonexistent does not exist
Use /nonexistent.${.MAKE.PID} to avoid failure when
/nonexistent actually exists.
2021-05-18 17:05:45 +00:00
tsutsui
68603c0b6a Consistently use #define<tab> here. 2021-05-18 15:21:41 +00:00
jmcneill
bdb39026b3 Unbreak previous; we have to look for a child node iff our node isn't
compatible with snps,dwc3.
2021-05-18 11:13:31 +00:00
hannken
43ac48be8c Make this compile without DIAGNOSTIC. 2021-05-18 11:02:58 +00:00
hannken
dd75e6d7a9 Remove a superfluous VOP_GETATTR() from elf_load_interp() and replace
the LK_EXCLUSIVE lock with a LK_SHARED lock.

The attributes requested were not used since Rev 1.25 of exec_elf32.c
from 1997/05/08 when mycroft GCd the va_mode check.
2021-05-18 08:59:44 +00:00
nia
50a9421fb2 dd.1: add an example of writing a NetBSD image 2021-05-18 07:17:09 +00:00
skrll
f34a02e514 Use #define<tab> in this file 2021-05-18 06:42:11 +00:00
skrll
eaa362f3de Remove argument names from function declaration prototypes.
Misc tidyup.
2021-05-18 06:40:16 +00:00
skrll
61899bf12b Remove argument names from function declaration prototypes. 2021-05-18 06:38:24 +00:00
msaitoh
a8358f374f - Cleanup an rxbuf entry when bus_dmamap_load_mbuf() failed to prevent panic.
- Print error number when error occurred.
2021-05-18 05:29:15 +00:00
mrg
d9ab0069bc s/defopt/defflag/. 2021 called to remind me it's still 2021. 2021-05-18 05:16:09 +00:00
yamaguchi
a47fe33408 Added missing PPPOE_UNLOCK() on dropping PADS and PADT 2021-05-18 01:46:29 +00:00
mrg
a6cc96866d also strip .eh_frame. libkern dkcksum pushed bootxx_ffs 7 bytes over a limit.
remove an old comment.
2021-05-17 22:36:31 +00:00
mrg
186d4bfa84 include libkern.h for moved dkcksum(). 2021-05-17 20:21:05 +00:00
nakayama
041766630a Make vers.c depend on ${_NETBSD_VERSION_DEPENDS}. 2021-05-17 20:10:27 +00:00
mrg
3b806a0f67 include libkern.h to get moved dkcksum() definition. 2021-05-17 19:31:38 +00:00
riastradh
a8fb54449d Teach cpuctl(8) about some additional aarch64 feature bits.
(Descriptions for CSV3 and CSV2 are not very good, but the blurbs in
the arm arm are an entire paragraph long each.  Please fix if you have
a conciser summary!)
2021-05-17 18:43:18 +00:00
christos
319ee229aa for mercurial, use the latest revision instead of limiting the output to 1
(requested by joerg)
2021-05-17 17:12:12 +00:00
martin
7639136097 Add NetBSD 9.1 and 9.2 release 2021-05-17 15:59:28 +00:00
christos
47bc05a6ad Handle git and mercurial for reproducible builds. 2021-05-17 13:50:39 +00:00
mrg
7de9d97fa4 move bi-endian disklabel support from the kernel and libsa into libkern.
- dkcksum() and dkcksum_sized() move from subr_disk.c and from
  libsa into libkern/dkcksum.c (which is missing _sized() version),
  using the version from usr.sbin/disklabel.

- swap_disklabel() moves from subr_disk_mbr.c into libkern, now called
  disklabel_swap().  (the sh3 version should be updated to use this.)

- DISKLABEL_EI becomes a first-class option with opt_disklabel.h.

- add libkern.h to libsa/disklabel.c.

this enables future work for bi-endian libsa/ufs.c (relevant for ffsv1,
ffsv2, lfsv1, and lfsv2), as well as making it possible for ports not
using subr_disk_mbr.c to include bi-endian disklabel support (which,
afaict, includes any disk on mbr-supporting platforms that do not have
an mbr as well as disklabel.)

builds successsfully on: alpha, i386, amd64, sun2, sun3, evbarm64,
evbarm64-eb, sparc, and sparc64.  tested in anita on i386 and sparc,
testing in hardware on evbarm64*.
2021-05-17 08:50:36 +00:00
yamaguchi
17f3f70e5b doc: added lagg(4) 2021-05-17 06:31:30 +00:00
yamaguchi
f0101d0e08 Add a new link-aggregation pseudo interface named lagg(4)
- FreeBSD's lagg(4) based implementation
 - MP-safe and MP-scalable
2021-05-17 04:07:41 +00:00
rin
5b02012073 Fix search for collating symbols in form of [[.foo.]], as in a similar
manner as already done for POSIX character classes by upstream:

fd5795cc98 (diff-42d58222b328681b9923634991312932089876a0242f78cf488157aa24969c1a)

(We already have this change since initial import to external/bsd/nvi.)

Found by tnozaki. Thanks!
2021-05-17 04:01:57 +00:00
kre
53e5e3df7a PR bin/56042
Fix typos (2nd acst should have been acdt), 0550 for ist should be 0530
(5.5 hours is not 5 hours and 50 minutes...).

Comment out the zp4 zp5 and zp6 zone names.   They are supposedly supported
by the source (they're in the table) but cannot work, as the parsedate
lexer doesn't allow a "word" to start with an alpha and also contain
digits.   Maybe (just maybe) that could be fixed sometime, but since these
have never worked, and no-one has ever seemed to miss them, and they're the
only words which are of that form, for now, just stop pretending they work.
2021-05-16 19:42:35 +00:00
rillig
2999d7a951 lint: add more specific warning for bit-field of type plain 'int'
Previously, declaring a bit-field of type plain 'int' resulted in this
warning:

	warning: nonportable bit-field type 'int' [34]

This warning was too unspecific to be actionable, and until yesterday it
didn't even include the type.  In order to allow this warning to be
understood and properly fixed, describe the actual nonportability more
precisely:

	warning: bit-field of type plain 'int' has
	implementation-defined signedness [344]
2021-05-16 11:11:36 +00:00
rillig
dec93c3088 lint: add type information to unportable bit-field type
Seeing the message "unportable bit-field type 'int'" may sound strange
at first, but that's a strict interpretation of the wording in C99
6.7.2.1p4, which requires that the bit-field type is "'_Bool', 'unsigned
int' or 'signed int', or some other implementation-defined type".

The rationale for C99 6.7.2.1 explicitly lists plain 'int' among the
allowed types for bit-fields, regardless of any additional
implementation-defined types.  This means that lint had interpreted this
paragraph wrong, and it should be fixed to allow plain int as well.
2021-05-16 10:34:19 +00:00
rillig
1a0e12d66e lint: add quotes to message 309 about constant conversion 2021-05-16 10:18:24 +00:00
rillig
fc2d694242 tests/lint: add test for warning about zero-bits in '&' 2021-05-16 10:08:01 +00:00
rillig
60e7bdf08f memmem: remove unreachable return statement 2021-05-16 09:43:39 +00:00
mlelstv
218681dd96 close pipe before freeing frame length array. 2021-05-16 09:17:23 +00:00
skrll
a0cb3f1b57 s/ENTRY/ENTRY_NP/ in a few places 2021-05-16 09:02:04 +00:00
mlelstv
b1ce595009 Protect ioctl and declare MPSAFE. 2021-05-16 08:48:20 +00:00
mlelstv
27f97b3677 Try to guess attributes better. 2021-05-16 08:46:38 +00:00
mlelstv
a848552d7a No need to check cell count. 2021-05-16 08:44:26 +00:00
rillig
e966428344 tests/lint: add expected output for testing '&' in switch statement 2021-05-16 00:09:49 +00:00
rillig
ca8378a5d8 wpa: fix Clang build
src/external/bsd/wpa/bin/hostapd/../../dist/src/common/dpp.c:5377:7:
error: format specifies type 'unsigned long' but the argument has type
'os_time_t' (aka 'long long') [-Werror,-Wformat]
2021-05-15 19:19:55 +00:00
rillig
c910954897 lint: warn about unreachable case labels for '&&'
See octeon_gmxreg.h 1.2 from 2020-06-18 for an example, where
RXN_RX_INBND_SPEED was cleaned up without adjusting the corresponding
code in octeon_gmx.c.
2021-05-15 19:12:14 +00:00
jakllsch
40cc624231 Change PCI_VENDOR_MASK and PCI_PRODUCT_MASK to unsigned values, to prevent
sign extension of product ID when shifted up into place in PCI_ID_CODE()

Should fix PR 56176.
2021-05-15 13:00:45 +00:00