mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 02:10:09 +01:00
Revert "nm-device: prefer manually configured addresses to automatic"
This commit does not seem correct. The enum was moved with the declared
intent to make manual IP configuration preferred. But the code comment
in L3ConfigDataType states that higher numbers are more important.
Also, all the other values are intentionally ordered so that more
important method have higher numbers. For example, LL_4 < DHCP_4 < SHARED_4 <
DEV_4 (in increasing priority). While it's often not clear whether to
prefer one method over the other, or what the actual effect of (LL_4 < DHCP_4)
is, the numbers were chosen intentionally.
Only moving MANUALIP first, counters the relative order of the other values.
If there is the problem, that the code comment is wrong (and lower
numbers mean more important), then we would have to reverse all
enum values.
The real problem is that NML3Cfg's _l3_config_datas_get_sorted_cmp()
has the wrong order/understanding. So the real fix is there and will
be done next. That is, unless we would agree that _l3_config_datas_get_sorted_cmp()
is in the right, and prefer lower numbers -- in which case all values had to be
reversed.
This reverts commit af1903fe3f.
This commit is contained in:
parent
c03d166322
commit
982807ec4e
2 changed files with 4 additions and 4 deletions
|
|
@ -139,8 +139,6 @@ typedef enum {
|
|||
* their relative order matters: higher numbers in this enum means more
|
||||
* important (and during merge overwrites other settings). */
|
||||
|
||||
L3_CONFIG_DATA_TYPE_MANUALIP,
|
||||
|
||||
L3_CONFIG_DATA_TYPE_LL_4,
|
||||
L3_CONFIG_DATA_TYPE_LL_6,
|
||||
|
||||
|
|
@ -183,6 +181,8 @@ typedef enum {
|
|||
_t; \
|
||||
})
|
||||
|
||||
L3_CONFIG_DATA_TYPE_MANUALIP,
|
||||
|
||||
_L3_CONFIG_DATA_TYPE_NUM,
|
||||
_L3_CONFIG_DATA_TYPE_NONE,
|
||||
_L3_CONFIG_DATA_TYPE_ACD_ONLY,
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
#include "libnm-platform/nmp-object.h"
|
||||
#include "nm-l3-config-data.h"
|
||||
|
||||
#define NM_L3CFG_CONFIG_PRIORITY_IPV4LL 1
|
||||
#define NM_L3CFG_CONFIG_PRIORITY_IPV6LL 1
|
||||
#define NM_L3CFG_CONFIG_PRIORITY_IPV4LL 0
|
||||
#define NM_L3CFG_CONFIG_PRIORITY_IPV6LL 0
|
||||
#define NM_ACD_TIMEOUT_RFC5227_MSEC 9000u
|
||||
|
||||
#define NM_TYPE_L3CFG (nm_l3cfg_get_type())
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue