int ifindex = 0;
errno = 0;
const char *default_ip = NULL;
+ const char *if_name = NULL;
static int initial_send_arp_count = 0;
if (initial_bursts && initial_send_arp_count >= INITIAL_BURST_ARP_COUNT) {
memset(&net_ifr, 0, sizeof(net_ifr));
/* ifreq structure creation */
- size_t if_name_len = strlen(netconfig_get_default_ifname());
+ if_name = netconfig_get_default_ifname();
+ size_t if_name_len = strlen(if_name);
+
+ if (if_name_len == 0) {
+ INFO("Error : Unable to get interface name ");
+ goto err;
+ }
+
if (if_name_len < sizeof(net_ifr.ifr_name)) {
memcpy(net_ifr.ifr_name, netconfig_get_default_ifname(), if_name_len);
net_ifr.ifr_name[if_name_len] = 0;
g_variant_get(variant, "s", &property);
DBG("[%s] %s", property, path);
- if (netconfig_is_wifi_profile(path) || netconfig_is_ethernet_profile(path)) {
- if (g_strcmp0(property, "ready") == 0) {
- for (idx = 0; idx < MAX_SOCKET_OPEN_RETRY; idx++) {
- sd = start_ip_conflict_mon();
- if (sd != NULL)
- break;
- }
- } else if (g_strcmp0(property, "online") == 0) {
- // do nothing
- } else {
- stop_ip_conflict_mon();
- }
- }
if (netconfig_is_wifi_profile(path) == TRUE) {
int wifi_state = 0;
netconfig_update_default_profile(NULL);
}
}
+
+ if (netconfig_is_wifi_profile(path) || netconfig_is_ethernet_profile(path)) {
+ if (g_strcmp0(property, "ready") == 0) {
+ for (idx = 0; idx < MAX_SOCKET_OPEN_RETRY; idx++) {
+ sd = start_ip_conflict_mon();
+ if (sd != NULL)
+ break;
+ }
+ } else if (g_strcmp0(property, "online") == 0) {
+ // do nothing
+ } else {
+ stop_ip_conflict_mon();
+ }
+ }
+
g_free(property);
} else if (g_strcmp0(sigvalue, "Proxy") == 0) {
if (netconfig_is_wifi_profile(path) != TRUE || g_strcmp0(path, netconfig_get_default_profile()) != 0)