From 8c4e57a57562c9329b1de4c29ee921ab98182c6b Mon Sep 17 00:00:00 2001 From: Matthieu Boutier Date: Sat, 28 Jan 2012 00:29:51 +0100 Subject: 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). --- babeld/babel_interface.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'babeld/babel_interface.h') 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: -- cgit v1.2.1