summaryrefslogtreecommitdiffstats
path: root/dhcpcd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2014-02-24 14:40:29 +0000
committerRoy Marples <roy@marples.name>2014-02-24 14:40:29 +0000
commit658bfd5e0cc0dc56d8bb7caf2e6d2a58821798a9 (patch)
tree2eca81d37290e44ca1cf6e5e4baf8fe1c62c22ae /dhcpcd.c
parent6618e7ea8b51794b2a9a93d50896a9e50269f19a (diff)
downloaddhcpcd-658bfd5e0cc0dc56d8bb7caf2e6d2a58821798a9.tar.xz
Fix arping moving to the next test if we find the IP address
but do not have a profile for it. Thanks to David McGurty for the analysis.
Diffstat (limited to 'dhcpcd.c')
-rw-r--r--dhcpcd.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/dhcpcd.c b/dhcpcd.c
index fb232164..900f3011 100644
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -461,14 +461,11 @@ int
select_profile(struct interface *ifp, const char *profile)
{
struct if_options *ifo;
- int ret;
- ret = 0;
ifo = read_config(ifp->ctx, ifp->name, ifp->ssid, profile);
if (ifo == NULL) {
syslog(LOG_DEBUG, "%s: no profile %s", ifp->name, profile);
- ret = -1;
- goto exit;
+ return -1;
}
if (profile != NULL) {
strlcpy(ifp->profile, profile, sizeof(ifp->profile));
@@ -478,11 +475,9 @@ select_profile(struct interface *ifp, const char *profile)
*ifp->profile = '\0';
free_options(ifp->options);
ifp->options = ifo;
-
-exit:
if (profile)
configure_interface1(ifp);
- return ret;
+ return 1;
}
static void