From: Jukka Rissanen Date: Tue, 3 Jan 2012 12:31:28 +0000 (+0200) Subject: ipconfig: Address list for duplicates does not need gateway info. X-Git-Tag: 0.79~243 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=86adee5b6fa2ee97ff28d412a620dc3028a209e0;p=platform%2Fupstream%2Fconnman.git ipconfig: Address list for duplicates does not need gateway info. The ipdevice address list is only used for detecting duplicate addresses so there is no need to copy the gateway information into the list. The same gateway data was actually used in every list element which is not a correct thing to do as there would be different gateways in IPv4 and IPv6 anyway. --- diff --git a/src/ipconfig.c b/src/ipconfig.c index 4a83efb..20207a1 100644 --- a/src/ipconfig.c +++ b/src/ipconfig.c @@ -900,7 +900,6 @@ void __connman_ipconfig_newroute(int index, int family, unsigned char scope, if (scope == 0 && (g_strcmp0(dst, "0.0.0.0") == 0 || g_strcmp0(dst, "::") == 0)) { - GSList *list; GList *config_list; enum connman_ipconfig_type type; @@ -929,13 +928,6 @@ void __connman_ipconfig_newroute(int index, int family, unsigned char scope, } else return; - for (list = ipdevice->address_list; list; list = list->next) { - struct connman_ipaddress *ipaddress = list->data; - - g_free(ipaddress->gateway); - ipaddress->gateway = g_strdup(gateway); - } - for (config_list = g_list_first(ipconfig_list); config_list; config_list = g_list_next(config_list)) { struct connman_ipconfig *ipconfig = config_list->data; @@ -972,7 +964,6 @@ void __connman_ipconfig_delroute(int index, int family, unsigned char scope, if (scope == 0 && (g_strcmp0(dst, "0.0.0.0") == 0 || g_strcmp0(dst, "::") == 0)) { - GSList *list; GList *config_list; enum connman_ipconfig_type type; @@ -999,13 +990,6 @@ void __connman_ipconfig_delroute(int index, int family, unsigned char scope, } else return; - for (list = ipdevice->address_list; list; list = list->next) { - struct connman_ipaddress *ipaddress = list->data; - - g_free(ipaddress->gateway); - ipaddress->gateway = NULL; - } - for (config_list = g_list_first(ipconfig_list); config_list; config_list = g_list_next(config_list)) { struct connman_ipconfig *ipconfig = config_list->data;