diff options
Diffstat (limited to 'net/tipc/addr.c')
-rw-r--r-- | net/tipc/addr.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/net/tipc/addr.c b/net/tipc/addr.c index 087e399518c1..a6fdab33877e 100644 --- a/net/tipc/addr.c +++ b/net/tipc/addr.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * net/tipc/addr.c: TIPC address utility routines | 2 | * net/tipc/addr.c: TIPC address utility routines |
3 | * | 3 | * |
4 | * Copyright (c) 2000-2006, Ericsson AB | 4 | * Copyright (c) 2000-2006, Ericsson AB |
5 | * Copyright (c) 2004-2005, Wind River Systems | 5 | * Copyright (c) 2004-2005, 2010-2011, Wind River Systems |
6 | * All rights reserved. | 6 | * All rights reserved. |
7 | * | 7 | * |
8 | * Redistribution and use in source and binary forms, with or without | 8 | * Redistribution and use in source and binary forms, with or without |
@@ -41,7 +41,7 @@ | |||
41 | * tipc_addr_domain_valid - validates a network domain address | 41 | * tipc_addr_domain_valid - validates a network domain address |
42 | * | 42 | * |
43 | * Accepts <Z.C.N>, <Z.C.0>, <Z.0.0>, and <0.0.0>, | 43 | * Accepts <Z.C.N>, <Z.C.0>, <Z.0.0>, and <0.0.0>, |
44 | * where Z, C, and N are non-zero and do not exceed the configured limits. | 44 | * where Z, C, and N are non-zero. |
45 | * | 45 | * |
46 | * Returns 1 if domain address is valid, otherwise 0 | 46 | * Returns 1 if domain address is valid, otherwise 0 |
47 | */ | 47 | */ |
@@ -51,10 +51,6 @@ int tipc_addr_domain_valid(u32 addr) | |||
51 | u32 n = tipc_node(addr); | 51 | u32 n = tipc_node(addr); |
52 | u32 c = tipc_cluster(addr); | 52 | u32 c = tipc_cluster(addr); |
53 | u32 z = tipc_zone(addr); | 53 | u32 z = tipc_zone(addr); |
54 | u32 max_nodes = tipc_max_nodes; | ||
55 | |||
56 | if (n > max_nodes) | ||
57 | return 0; | ||
58 | 54 | ||
59 | if (n && (!z || !c)) | 55 | if (n && (!z || !c)) |
60 | return 0; | 56 | return 0; |
@@ -66,8 +62,7 @@ int tipc_addr_domain_valid(u32 addr) | |||
66 | /** | 62 | /** |
67 | * tipc_addr_node_valid - validates a proposed network address for this node | 63 | * tipc_addr_node_valid - validates a proposed network address for this node |
68 | * | 64 | * |
69 | * Accepts <Z.C.N>, where Z, C, and N are non-zero and do not exceed | 65 | * Accepts <Z.C.N>, where Z, C, and N are non-zero. |
70 | * the configured limits. | ||
71 | * | 66 | * |
72 | * Returns 1 if address can be used, otherwise 0 | 67 | * Returns 1 if address can be used, otherwise 0 |
73 | */ | 68 | */ |