Commit Graph
7 Commits
Author SHA1 Message Date
Christof Meerwald d29137917a build: Add NetBSD as a host platform
* NetBSD is very similar to FreeBSD

* there is no libdl on NetBSD

* packages live in /usr/pkg on NetBSD

* the argument to tolower() must be representable as an unsigned char

Change-Id: Icff569c4472f7e91edd0ce6d489affb04babde7c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10130
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-12-19 17:45:22 +00:00
Christof Meerwald def75fa413 libroot: Don't call pipe2 from pipe
Calling pipe2 from pipe is problematic in cases where a program
implements its own pipe2 emulation, see
https://discuss.haiku-os.org/t/emacs-not-starting/16125/13

Change-Id: I317946fd95b98671d382c09ccd6fff2600f9e75b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8768
Reviewed-by: waddlesplash <[email protected]>
2025-01-03 20:20:14 +00:00
Christof Meerwald 0ab42081b5 kernel/network: Limit send MSS by interface MTU
see RFC9293 3.7.1. Maximum Segment Size Option

  The maximum size of a segment that a TCP endpoint really sends, the
  "effective send MSS", MUST be the smaller of the send MSS (that
  reflects the available reassembly buffer size at the remote host)
  and the largest transmission size permitted by the IP layer.

Previously, instead of just choosing a lower send MSS, we would
(try to) fragment those packets.

With this change I now get a 10/10 score from test-ipv6.com when
setting the local MTU to 1280 (this is needed as a workaround as we
don't implement Path MTU Discovery).

Change-Id: I27bdfebe2f94a55951407136ab7c4dd9626cdcea
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6043
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2023-01-30 12:11:29 +00:00
Christof Meerwald 3554137fa9 network: Always add default route after setting IP address
Previously, a default route was only added if the interface was not
set for auto configuration and it was added before the address was
configured. Currently, using DHCP for IPv4 means that the interface is
set as auto-configured (i.e. this also meant that the statically
configured default route for IPv6 wasn't even attempted to be added).
Also, adding a default route when the address hasn't been set is
questionable.

Always adding a default route (if a gateway is configured) shouldn't
cause any issues, even for auto-configuration cases, as the default
route will just be replaced once auto-configuration has completed
(which already happens for the IP address).

This change fixes network configuration where IPv6 is statically
configured and IPv4 is either also statically configured or
auto-configured.

Change-Id: I6b268ab1fa89777c64e1396cc460444f49edfef9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6039
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2023-01-28 20:05:30 +00:00
Christof Meerwald 64a48a5521 kernel/network: Fix neighbor advertisement hoplimit
All neighbor discovery messages need to be sent with a hop limit of
255, but some messages, like solicited neighbor advertisements, are
unicast messages. So need to set the hop limit for both multicast and
unicast messages.

Fixes #14562

Change-Id: I84fba8acbb5833c65d6113c8a7e0cc821a706881
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6038
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2023-01-28 09:53:06 +00:00
Christof Meerwald 88864ff1f9 kernel/network: Reply with a ICMPv6 neighbor advertisment
Send a neighbor advertisment when we have received a neighbor
solicitation.

Change-Id: Ie552a8e81d3f06b2dbfaab83ad5a30bac8962224
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6037
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Reviewed-by: Axel Dörfler <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2023-01-27 09:10:11 +00:00
Christof Meerwald 62ee13a983 kernel/network: Fix ICMPv6 checksum calculation
Ensure that any overflow bits aren't lost when returning from the
helper function. These need to added to the least significant bits in
ipv6_checksum.

Change-Id: Ida9821dd87d34ac1982703d9861419ed97ab4b9e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6036
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2023-01-27 09:10:11 +00:00