Commit Graph

4282 Commits

Author SHA1 Message Date
martin f113ad40b3 PR 57941: remove duplciate declaration (copy+pasto) 2024-02-17 15:47:39 +00:00
andvar 1cd43426d5 Fix various typos in comments, log messages and documentation. 2024-02-10 18:43:51 +00:00
msaitoh 90313c06e6 Remove ryo@'s mail addresses. 2024-02-07 04:20:25 +00:00
andvar 82bba4e936 fix various typos in comments. 2024-02-05 21:46:04 +00:00
jdolecek a1cbbc9c1f fix PIPE_SOCKETPAIR variant of pipe1() to apply correctly the 'flags'
passed when called via pipe2(2), fixing repeatable process hang during
compilation with 'gcc -pipe'

refactor fsocreate() to return the new socket and file pointers,
expect the caller to call fd_affix() once initialization is fully complete

use the new fsocreate() to replace the duplicate open-coded 'flags' handling
in makesocket() used for socketpair(2), and in the PIPE_SOCKETPAIR pipe1()

this also fixes lib/libc/sys/t_pipe2 pipe2_cloexec test to succeed
on PIPE_SOCKETPAIR kernel

fixes PR kern/55690
2024-02-03 19:05:14 +00:00
chs bf002e116b tun: add missing kpreempt_enable() if pktq_enqueue() fails 2023-12-29 23:01:02 +00:00
yamaguchi aa4d6cc71a lagg(4): eliminate unnecessary reset by the change of if_flags 2023-12-01 09:27:17 +00:00
yamaguchi f4c6b81178 lagg(4): use sadl for lagg(4) configured by a user 2023-12-01 06:18:02 +00:00
yamaguchi d3cb38e4a0 lagg(4): Fix missing IFNET_LOCK acquirement 2023-11-28 05:28:37 +00:00
yamaguchi 3a6bbf5f61 lagg(4): Added logs about LACP processing 2023-11-22 03:52:58 +00:00
yamaguchi 71d2a73a59 Set the fastest linkspeed in each physical interface to lagg(4) 2023-11-22 03:49:13 +00:00
yamaguchi 6e31a1b0ed Set ETHERCAP_VLAN_HWTAGGING on lagg(4)
that doesn't has physical interfaces
2023-11-22 03:30:57 +00:00
yamaguchi 9252591906 lagg(4): Fix missing pfil_run_hooks() and bpf_mtap() 2023-11-22 03:28:57 +00:00
yamaguchi 0cc830439a Update sending interval when the partner's state is changed 2023-11-22 03:27:00 +00:00
yamaguchi 4a3046a2c9 Change LACPDU sending interval by TIMEOUT bit in partner's state 2023-11-22 03:23:54 +00:00
yamaguchi b6cc0dbab4 Support vlan(4) over l2tp(4) 2023-11-02 09:48:29 +00:00
yamaguchi 68d5c47912 l2tp(4): use ether_ifattach() to initialize ethercom 2023-11-02 09:43:46 +00:00
yamaguchi 999e639ed7 Use ether_bpf_mtap only when the device supports vlan harware tagging
The function is bpf_mtap() for ethernet devices and *currently*
it is just handling VLAN tag stripped by the hardware.
2023-11-02 09:40:47 +00:00
yamaguchi b97d443e3a Added NULL check 2023-11-02 09:36:27 +00:00
msaitoh 1e7043fb40 Print error message when the multicast bit is set in the MAC address. 2023-10-20 08:35:09 +00:00
yamaguchi 2bbefb4238 copy MTU of lagg to a interface added to lagg
even if the interface is the first member of the lagg

This change breaks ATF test case for lagg MTU
2023-10-18 06:37:08 +00:00
yamaguchi 99626c34a8 Fix missing IFNET_LOCK holding while destroy the lagg interface 2023-10-16 08:25:57 +00:00
yamaguchi d9d48b035c lagg(4): release LAGG_LOCK before mtu changing
PR kern/57650
2023-10-16 07:49:01 +00:00
riastradh c5d20a3ff7 net/if.h: Explain the IFF_ALLMULTI situation.
No functional change intended.
2023-10-09 11:55:34 +00:00
knakahara 87f7d0994d Use unit id instead of if_index to reduce fixed_reqid space. 2023-09-26 03:43:27 +00:00
rin 6f96d21f98 bpf: Fix SIZEOF_BPF_HDR (for LP64 userland) on mips64
It cannot fit within 18 bytes, of course ;)

As we had never provided working bpf(4) implementation for LP64
userland on mips, just use natural structure size here.
2023-08-23 13:21:17 +00:00
christos 23a0b7cc14 add new for libpcap. 2023-08-17 22:10:37 +00:00
christos 7a90ae8b7c Use the version from libpcap-1.10.4 2023-08-17 15:17:05 +00:00
christos de3dd4a79a define symbols that new libpcap needs 2023-08-17 15:16:33 +00:00
kardel 3d1c064f3e The analysis documented in PR misc/56990 is correct.
Fix by not returning when encountering a ruleset rule.

The code up to now would stop at any group rule.

ruleset rules are marked as group rule and a dynamic rule.

processing is only finished when a result is present AND
we are looking at a plain group rule.
2023-08-08 16:10:41 +00:00
mrg f8570f8a97 fix simple mis-matched function prototype and definitions.
most of these are like, eg

   void foo(int[2]);

with either of these

   void foo(int*) { ... }
   void foo(int[]) { ... }

in some cases (such as stat or utimes* calls found in our header files),
we now match standard definition from opengroup.

found by GCC 12.
2023-08-01 07:04:14 +00:00
christos 7043895a1a put back compat names, should be removed from the sanitizers 2023-07-31 23:53:38 +00:00
christos a8714c4b7d Don't call versioned stuff "old". Follow the naming convention for versioning
and name them after the last version of the OS they appeared on.
2023-07-31 17:41:17 +00:00
rin 5b839bef49 Align function name in its declaration consistently.
No binary changes.
2023-06-16 02:48:07 +00:00
rin c8c6b0abb0 Consistently use __inline instead of inline, as done for rev. 1.119:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/net/route.h#rev1.119
2023-06-16 02:46:23 +00:00
ozaki-r 174092f275 route: run workqueue kthreads with KERNEL_LOCK unless NET_MPSAFE
Without KERNEL_LOCK, rt_timer_work and rt_free_work can run in parallel
with other LWPs running in the network stack, which eventually results
in say use-after-free of a deleted route.
2023-06-05 03:51:45 +00:00
andvar d7488b2d05 s/explcit/explicit/ in comment. 2023-05-28 08:09:34 +00:00
jakllsch c54128fc11 Give scope and additional details to wg(4) diagnostic messages. 2023-04-11 14:03:46 +00:00
andvar 45758f9ad4 s/termintaed/terminated/ in comment. 2023-04-05 19:56:27 +00:00
andvar 95f94af301 fix various typos in documentation, comments and sysctl device description.
mainly aion -> ation and inlude -> include.
2023-03-26 19:10:32 +00:00
andvar 5583e1ee44 s/deteted/detected/ in log message. 2023-03-25 21:35:49 +00:00
riastradh 5e72ca9101 npf: Eliminate __HAVE_ATOMIC_AS_MEMBAR conditionals.
Discussed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2023/02/23/msg028729.html

Requested by rmind@:
https://github.com/rmind/npf/pull/127#issuecomment-1399573125
2023-02-24 11:03:01 +00:00
riastradh fa8628f4ec sys/net/if.c: Eliminate __HAVE_ATOMIC_AS_MEMBAR conditionals.
Discussed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2023/02/23/msg028729.html
2023-02-24 11:02:45 +00:00
kardel 1165567d46 PR kern/56052:
allow block-return packets passed through without rule matching.
Included up-stream as https://github.com/rmind/npf/pull/115
2023-02-12 13:38:37 +00:00
kardel 57cb3743d4 PR kern/55654:
Switch default for parameter npf ip4.reassembly to 1.
This makes the NPF default configuration comply with host
requirements for IPv4.
2023-02-12 13:21:28 +00:00
gutteridge bb48f2ad77 bpf.c: support loopback writes when BIOCSHDRCMPLT is set
Following changes in r. 1.249 "bpf: support sending packets on loopback
interfaces", also allow for this to succeed when the "header complete"
flag is set, which is the practice of some tools, e.g., tcpreplay and
Scapy. With this change, both of those example tools now work, e.g.,
Scapy passes "L3bpfSocket - send and sniff on loopback" in its test
suite.

There are several ways of addressing this issue; this commit is
intended to be the most conservative and consistent with the previous
changes. (E.g., FreeBSD instead has special handling of this condition
in its if_loop.c.)
2023-02-08 01:37:53 +00:00
gutteridge 1b7584da6c bpf.c: fix a few typos and grammatical issues in comments 2023-02-07 01:46:37 +00:00
riastradh 2f9d5bcd6c npf(9): Drop table lock around copyout.
It is forbidden to hold a spin lock around copyout, and t_lock is a
spin lock.

We need t_lock in order to iterate over the list of entries.
However, during copyout itself, we only need to ensure that the
object we're copying out isn't freed by npf_table_remove or
npf_table_gc.

Fortunately, the only caller of npf_table_list, npf_table_remove, and
npf_table_gc is npfctl_table, and it serializes all of them by the
npf config lock.  So we can safely drop t_lock across copyout.

PR kern/57136
PR kern/57181
2023-01-23 13:40:04 +00:00
riastradh 976285b5e8 npf(9): Another comment tweak to match upstream.
No functional change.
2023-01-22 18:45:43 +00:00
riastradh edfe75c0f8 npf(9): Update comment to reduce diff from upstream.
No functional change.
2023-01-22 18:39:35 +00:00