summaryrefslogtreecommitdiffstats
path: root/cmds/ip-up-vpn/ip-up-vpn.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmds/ip-up-vpn/ip-up-vpn.c')
-rw-r--r--cmds/ip-up-vpn/ip-up-vpn.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/cmds/ip-up-vpn/ip-up-vpn.c b/cmds/ip-up-vpn/ip-up-vpn.c
index 0e6286f..9fcc950 100644
--- a/cmds/ip-up-vpn/ip-up-vpn.c
+++ b/cmds/ip-up-vpn/ip-up-vpn.c
@@ -67,7 +67,7 @@ int main(int argc, char **argv)
{
FILE *state = fopen(DIR ".tmp", "wb");
if (!state) {
- LOGE("Cannot create state: %s", strerror(errno));
+ ALOGE("Cannot create state: %s", strerror(errno));
return 1;
}
@@ -97,7 +97,7 @@ int main(int argc, char **argv)
while (!ioctl(s, SIOCDELRT, &rt));
}
if (errno != ESRCH) {
- LOGE("Cannot remove host route: %s", strerror(errno));
+ ALOGE("Cannot remove host route: %s", strerror(errno));
return 1;
}
@@ -105,7 +105,7 @@ int main(int argc, char **argv)
rt.rt_flags |= RTF_GATEWAY;
if (!set_address(&rt.rt_gateway, argv[1]) ||
(ioctl(s, SIOCADDRT, &rt) && errno != EEXIST)) {
- LOGE("Cannot create host route: %s", strerror(errno));
+ ALOGE("Cannot create host route: %s", strerror(errno));
return 1;
}
@@ -113,21 +113,21 @@ int main(int argc, char **argv)
ifr.ifr_flags = IFF_UP;
strncpy(ifr.ifr_name, interface, IFNAMSIZ);
if (ioctl(s, SIOCSIFFLAGS, &ifr)) {
- LOGE("Cannot bring up %s: %s", interface, strerror(errno));
+ ALOGE("Cannot bring up %s: %s", interface, strerror(errno));
return 1;
}
/* Set the address. */
if (!set_address(&ifr.ifr_addr, address) ||
ioctl(s, SIOCSIFADDR, &ifr)) {
- LOGE("Cannot set address: %s", strerror(errno));
+ ALOGE("Cannot set address: %s", strerror(errno));
return 1;
}
/* Set the netmask. */
if (set_address(&ifr.ifr_netmask, env("INTERNAL_NETMASK4"))) {
if (ioctl(s, SIOCSIFNETMASK, &ifr)) {
- LOGE("Cannot set netmask: %s", strerror(errno));
+ ALOGE("Cannot set netmask: %s", strerror(errno));
return 1;
}
}
@@ -140,13 +140,13 @@ int main(int argc, char **argv)
fprintf(state, "%s\n", env("INTERNAL_DNS4_LIST"));
fprintf(state, "%s\n", env("DEFAULT_DOMAIN"));
} else {
- LOGE("Cannot parse parameters");
+ ALOGE("Cannot parse parameters");
return 1;
}
fclose(state);
if (chmod(DIR ".tmp", 0444) || rename(DIR ".tmp", DIR "state")) {
- LOGE("Cannot write state: %s", strerror(errno));
+ ALOGE("Cannot write state: %s", strerror(errno));
return 1;
}
return 0;