Skip to contentSkip to conversation

tipc: fix test of bearer_priority range in tipc_register_media()

PATCH Applied Roel Kluin 2 participants 2 messages Aug 27, 2009 – Aug 29, 2009

Subsystems (3)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 tipc: fix test of bearer_priority range in tipc_register_media()

For the bearer_priority to be less than TIPC_MIN_LINK_PRI and greater than TIPC_MAX_LINK_PRI is logically impossible.

---

net/tipc/bearer.c +1 -1
index a7a3677..327011f 100644
@@ -119,7 +119,7 @@ int  tipc_register_media(u32 media_type,
 		warn("Media <%s> rejected, no broadcast address\n", name);
 		goto exit;
 	}
-	if ((bearer_priority < TIPC_MIN_LINK_PRI) &&
+	if ((bearer_priority < TIPC_MIN_LINK_PRI) ||
 	    (bearer_priority > TIPC_MAX_LINK_PRI)) {
 		warn("Media <%s> rejected, illegal priority (%u)\n", name,
 		     bearer_priority);
maintainer Applied
#1 lore raw

From: Roel Kluin <[email protected]>
Date: Thu, 27 Aug 2009 14:03:15 +0200

Quoted 4 lines

For the bearer_priority to be less than TIPC_MIN_LINK_PRI and greater than TIPC_MAX_LINK_PRI is logically impossible.

Applied to net-next-2.6, thanks.