summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ifconfig/ifconfig.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index ee0f066..9c6efe5 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -535,6 +535,12 @@ ifconfig(int argc, char *const *argv, const struct afswtch *afp)
if (afp->af_postproc != NULL)
afp->af_postproc(s, afp);
/*
+ * Do deferred callbacks registered while processing
+ * command-line arguments.
+ */
+ for (cb = callbacks; cb != NULL; cb = cb->cb_next)
+ cb->cb_func(s, cb->cb_arg);
+ /*
* Do deferred operations.
*/
if (clearaddr) {
@@ -568,13 +574,6 @@ ifconfig(int argc, char *const *argv, const struct afswtch *afp)
Perror("ioctl (SIOCAIFADDR)");
}
- /*
- * Do deferred callbacks registered while processing
- * command-line arguments.
- */
- for (cb = callbacks; cb != NULL; cb = cb->cb_next)
- cb->cb_func(s, cb->cb_arg);
-
close(s);
return(0);
}
OpenPOWER on IntegriCloud