* For a received neighbor solicitation, the target address would be
our local address, so we need to use the IPv6 source address instead.
Change-Id: I93af830c04354e069c3c43f05e28a3cf3cd5dd9d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10178
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
* Previously, the filtering logic didn't work at all.
* netstat can now also display IPv6 addresses (mainly by using
getnameinfo instead of using IPv4 specific functions).
* Removed dead code.
Change-Id: Iaafe3d57253a64ef12ed79d7968e8fd1dfcb3960
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10180
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Import fix from NetBSD PR lib/58888
This could have leaked data to the resolver or resulted in the resolver
returning incorrect results.
Change-Id: Idedb9d12c8ad7a88f0e5e05e735efdd8c914cbde
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10149
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
* Use LITTLE_ENDIAN instead of __LITTLE_ENDIAN (LITTLE_ENDIAN is what
POSIX now specifies and everyone seems to define - NetBSD also
defines _LITTLE_ENDIAN, but not __LITTLE_ENDIAN)
* file descriptors greater than 2 must be explicitly passed to a child
on NetBSD. POSIX leaves that unspecified, see
https://pubs.opengroup.org/onlinepubs/9799919799/utilities/V3_chap02.html#exec
* system library functions get declared with visibility "default" on
NetBSD, so a "hidden" visibility attribute is ignored on a
redeclaration. Work around by putting the functions in a namespace -
as they are extern "C", they still end up in the object file without
the namespace qualifier.
* remove the cast on the NULL pointer on the funopen call - it's not
needed and the types are different between FreeBSD (fpos_t) and
NetBSD/OpenBSD (off_t); also trying to change that upstream
https://github.com/openSUSE/libsolv/pull/603
Change-Id: I6ab7f3c74d18960d7589b403a1c219cdac85a453
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10133
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
* 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]>
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]>
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]>
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]>
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]>