babeld: fix interface bug, simplify code.
Perhaps could it be able to free already free memory (so free(NULL)),
in function interface_reset(). On other hand, it initiated untracked
interfaces, raising (at least) inappropriate messages. Finally, I
remove the BABEL_IF_IS_ENABLE flag, witch was not really usefull.
Note the test if_up isn't weaker, because (...IS_UP => ...IS_ENABLE).
diff --git a/babeld/babel_interface.h b/babeld/babel_interface.h
index 5b551fb..ec69bff 100644
--- a/babeld/babel_interface.h
+++ b/babeld/babel_interface.h
@@ -99,7 +99,6 @@
#define BABEL_IF_SPLIT_HORIZON (1 << 2)
#define BABEL_IF_LQ (1 << 3)
#define BABEL_IF_FARAWAY (1 << 4)
-#define BABEL_IF_IS_ENABLE (1 << 7)
/* Only INTERFERING can appear on the wire. */
#define BABEL_IF_CHANNEL_UNKNOWN 0
@@ -111,9 +110,7 @@
{
return (if_is_operative(ifp) &&
ifp->connected != NULL &&
- babel_get_if_nfo(ifp) != NULL &&
- (babel_get_if_nfo(ifp)->flags & BABEL_IF_IS_UP) &&
- (babel_get_if_nfo(ifp)->flags & BABEL_IF_IS_ENABLE));
+ (babel_get_if_nfo(ifp)->flags & BABEL_IF_IS_UP));
}
/* types: