summaryrefslogtreecommitdiffstats
path: root/configure.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-01-23 01:19:25 +0000
committerRoy Marples <roy@marples.name>2009-01-23 01:19:25 +0000
commit9a9fb7886736407015f66c9d70334a72538786c2 (patch)
treeda10e6e264b3ea56ace2334a2f3e700d159bdb71 /configure.c
parent0ec8bcb3b9803ecac050ac5e2a29f283531d8774 (diff)
downloaddhcpcd-9a9fb7886736407015f66c9d70334a72538786c2.tar.xz
Report ssid for carrier events correctly.
Diffstat (limited to 'configure.c')
-rw-r--r--configure.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/configure.c b/configure.c
index 95667469..3b4b2124 100644
--- a/configure.c
+++ b/configure.c
@@ -199,12 +199,16 @@ make_env(const struct interface *iface, char ***argv)
*--p = '\0';
if (iface->wireless) {
e = strlen("new_ssid=") + strlen(iface->ssid) + 2;
- if (iface->state->new != NULL) {
+ if (iface->state->new != NULL ||
+ strcmp(iface->state->reason, "CARRIER") == 0)
+ {
env = xrealloc(env, sizeof(char *) * (elen + 2));
env[elen] = xmalloc(e);
snprintf(env[elen++], e, "new_ssid=%s", iface->ssid);
}
- if (iface->state->old != NULL) {
+ if (iface->state->old != NULL ||
+ strcmp(iface->state->reason, "NOCARRIER") == 0)
+ {
env = xrealloc(env, sizeof(char *) * (elen + 2));
env[elen] = xmalloc(e);
snprintf(env[elen++], e, "old_ssid=%s", iface->ssid);