summaryrefslogtreecommitdiff
path: root/scripts/dhclient-script.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/dhclient-script.c')
-rw-r--r--scripts/dhclient-script.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/dhclient-script.c b/scripts/dhclient-script.c
index 841cde3d..35ede29a 100644
--- a/scripts/dhclient-script.c
+++ b/scripts/dhclient-script.c
@@ -66,10 +66,16 @@ int main(int argc, char *argv[])
busintf = getenv("BUSINTF");
buspath = getenv("BUSPATH");
+ if (busname == NULL || busintf == NULL || buspath == NULL)
+ return 0;
+
pid = atoi(getenv("pid"));
reason = getenv("reason");
interface = getenv("interface");
+ if (pid == 0 || reason == NULL)
+ return 0;
+
dbus_error_init(&error);
conn = dbus_bus_get(DBUS_BUS_SYSTEM, &error);