From 5774af9cbd832a60f454a836fc2cd7e02355b1de Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 28 Jan 2022 13:46:40 +0100 Subject: [PATCH] device: adjust NM_L3CFG_CONFIG_PRIORITY_IPV6LL and L3_CONFIG_DATA_TYPE_LL_6 NM_L3CFG_CONFIG_PRIORITY_IPV6LL and L3_CONFIG_DATA_TYPE_LL_6 are somewhat related. They probably should be numerically identical. Now, L3_CONFIG_DATA_TYPE_LL_6 cannot be zero (because L3_CONFIG_DATA_TYPE_LL_4 is zero and L3ConfigDataType values must be distinct). Therefore, also bump NM_L3CFG_CONFIG_PRIORITY_IPV6LL to 1. Of course, NM_L3CFG_CONFIG_PRIORITY_IPV6LL is not obviously more important than NM_L3CFG_CONFIG_PRIORITY_IPV4LL. But to be consistent with L3_CONFIG_DATA_TYPE_LL_6 is probably more important here. --- src/core/devices/nm-device.c | 1 + src/core/nm-l3cfg.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index fb0f8df175..e361ff5d3a 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -190,6 +190,7 @@ typedef enum { } L3ConfigDataType; G_STATIC_ASSERT(NM_L3CFG_CONFIG_PRIORITY_IPV4LL == L3_CONFIG_DATA_TYPE_LL_4); +G_STATIC_ASSERT(NM_L3CFG_CONFIG_PRIORITY_IPV6LL == L3_CONFIG_DATA_TYPE_LL_6); typedef enum { HW_ADDR_TYPE_UNSET = 0, diff --git a/src/core/nm-l3cfg.h b/src/core/nm-l3cfg.h index a7d89a2618..cbc974efaa 100644 --- a/src/core/nm-l3cfg.h +++ b/src/core/nm-l3cfg.h @@ -7,7 +7,7 @@ #include "nm-l3-config-data.h" #define NM_L3CFG_CONFIG_PRIORITY_IPV4LL 0 -#define NM_L3CFG_CONFIG_PRIORITY_IPV6LL 0 +#define NM_L3CFG_CONFIG_PRIORITY_IPV6LL 1 #define NM_ACD_TIMEOUT_RFC5227_MSEC 9000u #define NM_TYPE_L3CFG (nm_l3cfg_get_type())