diff options
author | Allan Stephens <Allan.Stephens@windriver.com> | 2011-02-23 11:44:49 -0500 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-03-13 16:35:16 -0400 |
commit | a3796f895ff2917aea331a8d40036c73452b2203 (patch) | |
tree | 38487e8b7cc5b66a815966410e8ddcdcd5f44783 /net/tipc/addr.c | |
parent | aa8472948487432bacbd099b86e313bc16319495 (diff) | |
download | linux-a3796f895ff2917aea331a8d40036c73452b2203.tar.bz2 |
tipc: Add network address mask helper routines
Introduces a pair of helper routines that convert the network address
for a TIPC node into the network address for its cluster or zone.
This is a cosmetic change designed to avoid future errors caused by
the incorrect use of address bitmasks, and does not alter the existing
operation of TIPC.
Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc/addr.c')
-rw-r--r-- | net/tipc/addr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/tipc/addr.c b/net/tipc/addr.c index 88463d9a6f12..087e399518c1 100644 --- a/net/tipc/addr.c +++ b/net/tipc/addr.c @@ -81,9 +81,9 @@ int tipc_in_scope(u32 domain, u32 addr) { if (!domain || (domain == addr)) return 1; - if (domain == (addr & 0xfffff000u)) /* domain <Z.C.0> */ + if (domain == tipc_cluster_mask(addr)) /* domain <Z.C.0> */ return 1; - if (domain == (addr & 0xff000000u)) /* domain <Z.0.0> */ + if (domain == tipc_zone_mask(addr)) /* domain <Z.0.0> */ return 1; return 0; } |