summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2013-10-01 15:48:25 -0500
committerDan Williams <dcbw@redhat.com>2013-10-01 15:48:25 -0500
commitd3aae79e5c7ec24553b3d10bc640f418aceb65ef (patch)
tree7edd5d9e1d5327468f2d3ef279a131605c3dc4ff
parent1b773f4e6ecd2b8b9ad173ad2c7ff9df6f609bec (diff)
downloadNetworkManager-d3aae79e5c7ec24553b3d10bc640f418aceb65ef.tar.gz
dhcp: fix IPv6 address prefixes (rh #1013583)
53e55aab365a263df5d2e13efe28a5dc5a7b8432 mistakenly moved the address prefix without moving the memset() to initialize the address. Make sure the address is initialized before trying to do anything with it.
-rw-r--r--src/dhcp-manager/nm-dhcp-client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dhcp-manager/nm-dhcp-client.c b/src/dhcp-manager/nm-dhcp-client.c
index 1338c663de..7f6e6e5799 100644
--- a/src/dhcp-manager/nm-dhcp-client.c
+++ b/src/dhcp-manager/nm-dhcp-client.c
@@ -1348,6 +1348,7 @@ ip6_options_to_config (NMDHCPClient *self)
g_return_val_if_fail (NM_IS_DHCP_CLIENT (self), NULL);
+ memset (&address, 0, sizeof (address));
address.plen = 128;
address.timestamp = get_time ();
@@ -1370,7 +1371,6 @@ ip6_options_to_config (NMDHCPClient *self)
goto error;
}
- memset (&address, 0, sizeof (address));
address.address = tmp_addr;
nm_log_info (LOGD_DHCP6, " address %s", str);