1803 Commits

Author SHA1 Message Date
Koen Zandberg
41be841b47
fixup! feat: Add MLDv2 Listener Query response support 2024-11-13 11:44:24 +01:00
Koen Zandberg
4b79e3395e
feat: Add MLDv2 Listener Query response support
This add support for responding to MLDv2 Listener Queries. Both general
queries and multicast specific queries are supported.
2024-11-08 16:59:18 +01:00
Dario Nieuwenhuis
3e61c909fd
Merge pull request #1008 from Jc0x7D3/main
Fix the error of specific length IP packets not being fragmented
2024-11-02 11:20:52 +00:00
zhangjio21
aba9add873 fix bug 2024-11-01 19:31:07 +08:00
Dario Nieuwenhuis
e9b66eadae
Merge pull request #1005 from tomDev5/feature/listen-endpoint-getter
add a getter method for TCP listen_endpoint
2024-10-23 11:46:47 +00:00
tomDev5
632e164d49 listen endpoint getter 2024-10-22 23:15:12 +03:00
Dario Nieuwenhuis
fe0b4d1022
Merge pull request #1002 from lrh2000/mtu-ack
Send immediate ACKs after RMSS bytes of data
2024-10-20 23:57:25 +00:00
Dario Nieuwenhuis
b8fb01cede
Merge pull request #1003 from ProfFan/fan/add_send_recv_queue
Add `send_queue`/`recv_queue` to UDP/ICMP/Raw Socket
2024-10-20 23:54:40 +00:00
Catherine
032094ec9a
Merge pull request #1001 from lrh2000/sim-open
Support TCP simultaneous open
2024-10-20 19:06:54 +00:00
Fan Jiang
dad57e8d1c Add send_queue/recv_queue to UDP/ICMP/Raw Socket 2024-10-19 14:52:37 -04:00
Ruihan Li
a27c0173fa Send immediate ACKs after RMSS bytes of data 2024-10-19 21:04:35 +08:00
Ruihan Li
06eb8b72dc Support TCP simultaneous open 2024-10-19 20:44:37 +08:00
Thibaut Vandervelden
45fa98422b
Merge pull request #998 from thomaseizinger/chore/better-logging-rejected-packets
Improve logging on rejected packets
2024-10-16 06:39:33 +00:00
Thomas Eizinger
c5b706ac80
Improve logging on rejected packets 2024-10-16 15:02:18 +11:00
Dario Nieuwenhuis
7acf1ac71b
Merge pull request #994 from smoltcp-rs/core-ip
wire: use core::net types for IP addresses.
2024-10-07 14:00:29 +00:00
Dario Nieuwenhuis
b65e1b64dc Add x_ prefix to all IP methods that collide with unstable core's. 2024-10-06 23:17:19 +02:00
Dario Nieuwenhuis
803fa8734a wire: use core::net::Ipv6Addr as the ipv6 address type. 2024-10-06 22:12:49 +02:00
Dario Nieuwenhuis
e6b9a9ca2a wire: use core::net::Ipv4Addr as the ipv4 address type. 2024-10-06 22:12:49 +02:00
Dario Nieuwenhuis
23be2beab3 wire: move prefix_len impl down to v4 and v6 addrs. 2024-10-06 21:33:13 +02:00
Dario Nieuwenhuis
11b6385c77 Fix new clippy lints due to MSRV update. 2024-10-06 21:33:13 +02:00
Dario Nieuwenhuis
997ce67d3c Bump MSRV to 1.80.
Ipv4Addr::to_bits() is stable only in 1.80+.
2024-10-06 21:33:13 +02:00
Dario Nieuwenhuis
61156ed98b
Merge pull request #997 from thvdveld/fix-6lowpan-fragmentation-panic
fix: 6lowpan could panic when frag datagram_size < 40
2024-09-30 11:39:22 +00:00
Thibaut Vandervelden
6256c3eff3 fix: 6lowpan panic when frag datagram_size < 40
6LoWPAN fragmentation could panic when the datagram_size in the
fragmentation header is less than 40. When converting 6LoWPAN to IPv6 a
minimum size of 40 bytes is required to put the IPv6 header in the
buffer.
2024-09-30 10:13:58 +02:00
Dario Nieuwenhuis
c114acd754
Merge pull request #996 from thvdveld/hbh-failure-type
fix: enter unreachable when discarding HBH Option with multicast destination address
2024-09-27 08:59:24 +00:00
Thibaut Vandervelden
32f81a77f5 fix: IPv6-hbb: discard as indicated by hbh type
Discard the packet if the Hop-by-Hop header type is 0b11 and the packet
destination address is multicast.
2024-09-27 10:52:00 +02:00
Thibaut Vandervelden
d17d47b4c0 fix: enter unreachable HBH Discard multicast addr
It was previously possible to enter an unreachable path when the HBH
option type was 0b11 and the destination address was multicast. This is
now fixed in the interface.

I also changed the way an HBH option type is parsed. The option type is
only 2 bits, meaning that we can't have an unknown state.
2024-09-27 09:07:51 +02:00
Thibaut Vandervelden
a2b92ed6e8
Merge pull request #983 from d2weber/pr
Fixes #982
2024-09-23 07:42:11 +00:00
d2weber
b59e494ae7
Fixes #982 2024-09-23 08:51:46 +02:00
Catherine
54905ee17a
Merge pull request #995 from XOR-op/fix-sack
fix: internal sACK flag not set correctly for client socket
2024-09-22 22:06:52 +00:00
XOR-op
ffcb62e119 test(tcp): add coverage for remote_has_sack in SYN-SENT state 2024-09-22 17:50:38 -04:00
XOR-op
805eed8447 fix: internal sACK flag not updated for client socket 2024-09-21 23:56:26 -04:00
Dario Nieuwenhuis
d667a2a467
Merge pull request #993 from lrh2000/poll-result
Export `PollResult`
2024-09-19 10:36:45 +00:00
Ruihan Li
336e7e5935 Export PollResult 2024-09-19 13:13:19 +08:00
Thibaut Vandervelden
9cc06575ea
Merge pull request #992 from thvdveld/update-action-checkout
Update actions/checkout to v4
2024-09-18 07:09:56 +00:00
Thibaut Vandervelden
b94dd2dd88 Update actions/checkout to v4 2024-09-18 09:02:13 +02:00
Dario Nieuwenhuis
4a9ebe7da2
Merge pull request #991 from smoltcp-rs/ll-poll
iface: make poll() process all packets, add fine-grained poll functions.
2024-09-17 14:01:39 +00:00
Dario Nieuwenhuis
dd43c8f189 iface: make poll() process all packets, add fine-grained poll functions.
This makes `.poll()` behave the same as before #954. Users affected by DoS
concerns can use the finer-grained egress-only and single-packet-ingress-only fns.
2024-09-16 19:59:38 +02:00
Dario Nieuwenhuis
3acd511179 tests: use two queues for TestingDevice.
Currently TestingDevice is a loopback device, which causes problems if the iface transmits a packet then receives.
The packet gets looped back to the interface instead of being handled by the test code.

This commit changes TestingDevice to behave more like a "virtual wire" that communicates the
interface with the testing code, with one queue for each direction.
2024-09-16 19:59:35 +02:00
Dario Nieuwenhuis
469dccdbae
Merge pull request #988 from smoltcp-rs/multicast-refactor-features
multicast: use single Cargo feature for both ipv4 and ipv6.
2024-09-16 14:37:14 +00:00
Dario Nieuwenhuis
dee8975afd
Merge pull request #987 from thvdveld/fix-panic-when-dns
Don't panic if no valid source address is found for the DNS query
2024-09-16 14:36:22 +00:00
Thibaut Vandervelden
749d8c7711
Merge pull request #989 from smoltcp-rs/fix-benches
Fix bench, check benches in CI.
2024-09-16 12:52:14 +00:00
Dario Nieuwenhuis
00aa2b457c Fix bench, check it in CI. 2024-09-12 17:10:03 +02:00
Dario Nieuwenhuis
07f09911bc multicast: use single Cargo feature for both ipv4 and ipv6.
The multicast feature was somewhat broken before, there was no way to do IPv6-only multicast
since a lot of multicast code was gated behind `proto-igmp` which force-enables ipv4.

Solution:

- Added feature `multicast` which enables multicast for ipv4 and/or ipv6, whatever the user has enabled.
- Removed feature `proto-igmp`. IGMP support in `wire` is always built if ipv4 is enabled. This causes no bloat if unused, and the increase in compile time is negligible. `iface` only uses it if the `multicast` feature is enabled.
2024-09-12 17:03:32 +02:00
Thibaut Vandervelden
649bce4012
Merge pull request #985 from smoltcp-rs/multicast-no-device
iface: do not require device and timestamp for multicast join/leave.
2024-09-12 14:54:26 +00:00
Dario Nieuwenhuis
34b1fa505b iface: do not require device and timestamp for multicast join/leave.
Instead of eagerly sending the join/leave packet when the user calls join/leave,
we update internal state and send the packet when the interface is polled.

Advantages:
- If the device is exhausted, the packet gets sent later instead of just failing and returning an error to the user.
- Makes the API consistent with everything else in smoltcp: operations only update internal state, poll is what sends/receives packets.
- Enables wrappers to offer simpler APIs with less generics. See https://github.com/embassy-rs/embassy/pull/3329 for an example, which is my original motivation.
2024-09-12 15:53:33 +02:00
Thibaut Vandervelden
115fd06f03 No panic if no valid src addr for DNS query
Don't panic if there is no valid source address for the DNS query. The
state of the query is set to `Failed` instead and the query is
abandoned.
2024-09-12 14:52:10 +02:00
Dario Nieuwenhuis
8602c0140e
Merge pull request #986 from birdistheword96/main
Prevent Panic in DNS Socket by Truncating Server List
2024-09-12 10:56:18 +00:00
Jamie Bird
4739cc7fc6 Fix: Prevent panic in DNS Socket when server list exceeds max count
- Truncate the servers list to DNS_MAX_SERVER_COUNT to prevent panics.
- Ensure only the first `DNS_MAX_SERVER_COUNT` servers are used when constructing the `Socket`.
- This prevents overflow issues when the provided server list is larger than the allowed maximum.
2024-09-12 11:28:27 +01:00
Dario Nieuwenhuis
8025752013
Merge pull request #984 from thvdveld/use-own-src-address
Use own source address for ARP and NDISC Solicitations
2024-09-11 19:01:32 +00:00
Thibaut Vandervelden
c76f32fa6c Use own src address for ARP and NDISC Solicits
When looking up the destination link-layer address for a given
destination address, we need to send an ARP or ICMPv6 Neighbor
Solicitation if the destination link-layer address is not in the cache.

When transmitting an ARP or ICMPv6 Neighbor Solicitation packet, use the
source address of the interface instead of the source address of the
packet that is tried to be sent.

By using the source address of the interface, we are sure that a
response will be received on the same interface.
2024-09-11 11:11:01 +02:00