- patch from Denis Vlasenko to add and use bb_xchdir()
[oweals/busybox.git] / networking / ifupdown.c
index 9e6fc6291d17aa94a4d8196b57847ce60b62ea6d..560c7a20158b053bb067607167f425c09954ebd2 100644 (file)
@@ -32,7 +32,7 @@
 #include <string.h>
 #include <unistd.h>
 
-#include "libbb.h"
+#include "busybox.h"
 
 #define MAX_OPT_DEPTH 10
 #define EUNBALBRACK 10001
@@ -769,7 +769,7 @@ static struct interfaces_file_t *read_interfaces(const char *filename)
                                        llist_t *iface_list;
                                        for (iface_list = defn->ifaces; iface_list; iface_list = iface_list->link) {
                                                struct interface_defn_t *tmp = (struct interface_defn_t *) iface_list->data;
-                                               if ((strcmp(tmp->iface, currif->iface) == 0) ||
+                                               if ((strcmp(tmp->iface, currif->iface) == 0) && 
                                                        (tmp->address_family == currif->address_family)) {
                                                        bb_error_msg("duplicate interface \"%s\"", tmp->iface);
                                                        return NULL;
@@ -1133,7 +1133,7 @@ static llist_t *find_iface_state(llist_t *state_list, const char *iface)
        return(NULL);
 }
 
-extern int ifupdown_main(int argc, char **argv)
+int ifupdown_main(int argc, char **argv)
 {
        int (*cmds) (struct interface_defn_t *) = NULL;
        struct interfaces_file_t *defn;