1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-23 07:31:31 +00:00
freebsd/lib/libifconfig
Kristof Provost 6a23843a4a libifconfig: fix carp key configuration
There were two issues with the carp key configuration in the new netlink
code.

The first is that userspace failed to actually pass the CARP_NL_KEY
attribute to the kernel, so a key was never set.

The second issue is that snl_attr_get_string() returns a pointer to the
string inside the netlink message. It does not copy the string to the
target buffer. That's somewhat inconvenient to work with in libifconfig
where we have a static buffer for the key.
Introduce snl_attr_copy_string() which can copy a string to a target
buffer and uses the 'arg' parameter to pass the buffer size, so it
doesn't accidentally exceed the available space.

Reviewed by:	melifaro
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D39874
2023-04-30 20:11:54 +02:00
..
libifconfig_bridge.c
libifconfig_carp.c libifconfig: fix carp key configuration 2023-04-30 20:11:54 +02:00
libifconfig_inet6.c
libifconfig_inet.c
libifconfig_internal.c
libifconfig_internal.h
libifconfig_lagg.c
libifconfig_media.c
libifconfig_sfp_tables_internal.tpl.h
libifconfig_sfp_tables.tpl.c
libifconfig_sfp_tables.tpl.h
libifconfig_sfp.c
libifconfig_sfp.h
libifconfig.c
libifconfig.h
Makefile
Makefile.depend Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
sfp.lua
Symbol.map