summaryrefslogtreecommitdiff
path: root/babeld/babel_interface.h
diff options
context:
space:
mode:
authorMatthieu Boutier <boutier@pps.jussieu.fr>2012-01-28 00:29:51 +0100
committerPaul Jakma <paul@quagga.net>2012-03-25 17:06:53 +0100
commit8c4e57a57562c9329b1de4c29ee921ab98182c6b (patch)
tree54253839ace41b14e363b6c5ede863c34e91e2e6 /babeld/babel_interface.h
parent69394543597a0fd8c161c5c8a0d25c8b1cfa8a93 (diff)
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).
Diffstat (limited to 'babeld/babel_interface.h')
-rw-r--r--babeld/babel_interface.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/babeld/babel_interface.h b/babeld/babel_interface.h
index 5b551fbe..ec69bff4 100644
--- a/babeld/babel_interface.h
+++ b/babeld/babel_interface.h
@@ -99,7 +99,6 @@ static inline babel_interface_nfo* babel_get_if_nfo(struct interface *ifp)
#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 @@ if_up(struct interface *ifp)
{
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: