IPv4DuplicateAddressDetectionTimeoutSec=. The default timeout value
has been changed from 7 seconds to 200 milliseconds.
+ * systemd-networkd previously emitted the machine ID as chassis ID
+ through LLDP protocol, but now emits a deterministic ID,
+ cryptographically derived from the machine ID as chassis ID. If you
+ want to use the previous behavior, please set
+ SYSTEMD_LLDP_SEND_MACHINE_ID=1 environment variable to
+ systemd-networkd.
+
* Support for the !! command line prefix on ExecStart= lines (and
related) has been removed, and if specified will be ignored. The
concept was supposed to provide compatibility with kernels that
work, ProtectSystem=strict in systemd-networkd.service needs to be downgraded
or disabled.
+* `$SYSTEMD_LLDP_SEND_MACHINE_ID` - takes a boolean, If true, systemd-networkd
+ sends machine ID as chassis ID through LLDP protocol.
+
`systemd-storagetm`:
* `$SYSTEMD_NVME_MODEL`, `$SYSTEMD_NVME_FIRMWARE`, `$SYSTEMD_NVME_SERIAL`,
#include "sd-lldp-tx.h"
#include "alloc-util.h"
+#include "env-util.h"
#include "ether-addr-util.h"
#include "fd-util.h"
#include "hostname-setup.h"
#include "unaligned.h"
#include "web-util.h"
+#define LLDP_APP_ID SD_ID128_MAKE(07,3a,43,bf,54,de,40,8d,8e,c4,96,ed,fd,94,72,dc)
+
/* The LLDP spec calls this "txFastInit", see 9.2.5.19 */
#define LLDP_FAST_TX_INIT 4U
return packet_append_prefixed_string(packet, packet_size, offset, type, 0, NULL, str);
}
+static int lldp_tx_get_machine_id(sd_id128_t *ret) {
+ int r;
+
+ assert(ret);
+
+ /* Unfortunately we previously exposed machine ID. If the environment variable is set, then
+ * use the machine ID as is. Otherwise, use application specific one. */
+ r = secure_getenv_bool("SYSTEMD_LLDP_SEND_MACHINE_ID");
+ if (r < 0 && r != -ENXIO)
+ log_debug_errno(r, "Failed to parse $SYSTEMD_LLDP_SEND_MACHINE_ID, ignoring: %m");
+ if (r > 0)
+ return sd_id128_get_machine(ret);
+
+ return sd_id128_get_machine_app_specific(LLDP_APP_ID, ret);
+}
+
static int lldp_tx_create_packet(sd_lldp_tx *lldp_tx, size_t *ret_packet_size, uint8_t **ret_packet) {
_cleanup_free_ char *hostname = NULL, *pretty_hostname = NULL;
_cleanup_free_ uint8_t *packet = NULL;
if (r < 0)
return r;
- r = sd_id128_get_machine(&machine_id);
+ r = lldp_tx_get_machine_id(&machine_id);
if (r < 0)
return r;