mirror of
https://github.com/opnsense/src.git
synced 2026-02-19 02:30:08 -05:00
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
|
||
|---|---|---|
| .. | ||
| libifconfig.c | ||
| libifconfig.h | ||
| libifconfig_bridge.c | ||
| libifconfig_carp.c | ||
| libifconfig_inet.c | ||
| libifconfig_inet6.c | ||
| libifconfig_internal.c | ||
| libifconfig_internal.h | ||
| libifconfig_lagg.c | ||
| libifconfig_media.c | ||
| libifconfig_sfp.c | ||
| libifconfig_sfp.h | ||
| libifconfig_sfp_tables.tpl.c | ||
| libifconfig_sfp_tables.tpl.h | ||
| libifconfig_sfp_tables_internal.tpl.h | ||
| Makefile | ||
| Makefile.depend | ||
| sfp.lua | ||
| Symbol.map | ||