aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/link.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/link.c')
-rw-r--r--net/tipc/link.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c
index 7265f4be47664a..d1e1ae66464a26 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -2812,7 +2812,8 @@ struct sk_buff *link_cmd_config(const void *req_tlv_area, int req_tlv_space,
}
break;
case TIPC_CMD_SET_LINK_PRI:
- if (new_value < TIPC_NUM_LINK_PRI) {
+ if ((new_value >= TIPC_MIN_LINK_PRI) &&
+ (new_value <= TIPC_MAX_LINK_PRI)) {
l_ptr->priority = new_value;
link_send_proto_msg(l_ptr, STATE_MSG,
0, 0, 0, new_value, 0);