opnsense-src/lib/libc/tests/net
Lexi Winter c8759dc5fb link_addr: be more strict about address formats
instead of accepting any character as a delimiter, only accept ':', '.'
and '-', and only permit a single delimiter in an address.

this prevents accepting bizarre addresses like:

	ifconfig epair2a link 10.1.2.200/28

... which is particularly problematic on an INET6-only system, in which
case ifconfig defaults to the 'link' family, meaning that:

	ifconfig epair2a 10.1.2.200/28

... changes the Ethernet address of the interface.

bump __FreeBSD_version so link_addr() consumers can detect the change.

Reviewed by:	kp, des
Approved by:	des (mentor)
Differential Revision:	https://reviews.freebsd.org/D49936

(cherry picked from commit a1215090416b8afb346fb2ff5b38f25ba0134a3a)

Note-from-OPNsense: not bumping the FreeBSD version for stable/25.7
2025-07-09 10:05:44 +02:00
..
getaddrinfo Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
ether_test.c Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
eui64_aton_test.c Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
eui64_ntoa_test.c Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
link_addr_test.cc link_addr: be more strict about address formats 2025-07-09 10:05:44 +02:00
Makefile libc tests: add tests for link_addr(3) and link_ntoa(3) 2025-07-09 10:05:44 +02:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
test-eui64.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00