mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-10 08:10:22 +01:00
device: on reapply reset commit_first_time flag
Based on this flag, we decide that:
- if we are not gonna commit the first time and the
connection is configured with never-default, we
would not remove a default route added externally.
During a reapply, we however want to get rid of an externally
configured default route.
This commit is contained in:
parent
c2dc1c6fa3
commit
624347baf7
1 changed files with 6 additions and 3 deletions
|
|
@ -302,6 +302,9 @@ typedef struct _NMDevicePrivate {
|
|||
|
||||
bool up:1; /* IFF_UP */
|
||||
|
||||
bool v4_commit_first_time:1;
|
||||
bool v6_commit_first_time:1;
|
||||
|
||||
/* Generic DHCP stuff */
|
||||
guint32 dhcp_timeout;
|
||||
char * dhcp_anycast_address;
|
||||
|
|
@ -332,9 +335,6 @@ typedef struct _NMDevicePrivate {
|
|||
NMPlatformIP6Route v6;
|
||||
} default_route;
|
||||
|
||||
bool v4_commit_first_time;
|
||||
bool v6_commit_first_time;
|
||||
|
||||
/* DHCPv4 tracking */
|
||||
struct {
|
||||
NMDhcpClient * client;
|
||||
|
|
@ -8676,6 +8676,9 @@ check_and_reapply_connection (NMDevice *self,
|
|||
} else
|
||||
con_old = con_new = applied;
|
||||
|
||||
priv->v4_commit_first_time = TRUE;
|
||||
priv->v6_commit_first_time = TRUE;
|
||||
|
||||
/**************************************************************************
|
||||
* Reapply changes
|
||||
*************************************************************************/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue