History log of /freebsd/lib/libc/tests/net/link_addr_test.cc (Results 1 – 4 of 4)
Revision Date Author Comments
# a1215090 15-May-2025 Lexi Winter <ivy@FreeBSD.org>

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 acce

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

show more ...


# da509c29 07-May-2025 Lexi Winter <ivy@FreeBSD.org>

libc: add link_ntoa_r()

this is a re-entrant version of link_ntoa. use an in-out parameter for
the buffer size, so the user requires at most two calls to determine the
needed size.

reimplement lin

libc: add link_ntoa_r()

this is a re-entrant version of link_ntoa. use an in-out parameter for
the buffer size, so the user requires at most two calls to determine the
needed size.

reimplement link_ntoa using link_ntoa_r with a static buffer.

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

show more ...


# bbffdfef 06-May-2025 Lexi Winter <ivy@FreeBSD.org>

link_addr_test: use <cstddef>, not <sys/stddef.h>

<cstddef> is the correct header; this fixes the GCC build.

while here, sort the headers.

Fixes: 757e973fb211 ("libc tests: add tests for link_addr

link_addr_test: use <cstddef>, not <sys/stddef.h>

<cstddef> is the correct header; this fixes the GCC build.

while here, sort the headers.

Fixes: 757e973fb211 ("libc tests: add tests for link_addr(3) and link_ntoa(3)")
Reviewed by: des
Approved by: des (mentor)
Differential Revision: https://reviews.freebsd.org/D50189

show more ...


# 757e973f 05-May-2025 Lexi Winter <ivy@FreeBSD.org>

libc tests: add tests for link_addr(3) and link_ntoa(3)

for now, since link_addr() has no way to indicate an error, these are
only positive tests which check the outcome of valid inputs.

Reviewed b

libc tests: add tests for link_addr(3) and link_ntoa(3)

for now, since link_addr() has no way to indicate an error, these are
only positive tests which check the outcome of valid inputs.

Reviewed by: ngie, des, adrian
Approved by: des (mentor)
Differential Revision: https://reviews.freebsd.org/D50062

show more ...