diff options
author | Dan Williams <dcbw@redhat.com> | 2013-11-06 14:13:59 -0600 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2013-11-08 16:46:43 -0600 |
commit | 60b88d526c6b6f8d1f6a03ced5089479d6c7b2cf (patch) | |
tree | 64a9906e28bfa0a8b8e8c5502c23d367c3fa34a6 /src/nm-ip4-config.c | |
parent | b54a9868fd98b20cac4ea086f260e11349198697 (diff) | |
download | NetworkManager-60b88d526c6b6f8d1f6a03ced5089479d6c7b2cf.tar.gz |
core: slaves should have empty captured IP configuration
Diffstat (limited to 'src/nm-ip4-config.c')
-rw-r--r-- | src/nm-ip4-config.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/nm-ip4-config.c b/src/nm-ip4-config.c index d74df85832..9b1da4c554 100644 --- a/src/nm-ip4-config.c +++ b/src/nm-ip4-config.c @@ -127,8 +127,15 @@ routes_are_duplicate (const NMPlatformIP4Route *a, const NMPlatformIP4Route *b, NMIP4Config * nm_ip4_config_capture (int ifindex) { - NMIP4Config *config = nm_ip4_config_new (); - NMIP4ConfigPrivate *priv = NM_IP4_CONFIG_GET_PRIVATE (config); + NMIP4Config *config; + NMIP4ConfigPrivate *priv; + + /* Slaves have no IP configuration */ + if (nm_platform_link_get_master (ifindex) > 0) + return NULL; + + config = nm_ip4_config_new (); + priv = NM_IP4_CONFIG_GET_PRIVATE (config); g_array_unref (priv->addresses); g_array_unref (priv->routes); |