]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
libexport.a: Factor SUBNETWORK checking out of check_client()
authorChuck Lever <chuck.lever@oracle.com>
Thu, 8 Apr 2010 14:51:54 +0000 (10:51 -0400)
committerSteve Dickson <steved@redhat.com>
Thu, 8 Apr 2010 15:16:18 +0000 (11:16 -0400)
Clean up:  Factor the MCL_SUBNETWORK case out of check_client() and
client_checkaddr().  This will make it easier to add IPv6 support
eventually.

The logic in the new helper function will get a little more tangled
once IPv6 support is introduced.  Each slot in the clp address list
eventually may contain an address from either address family.

Note that the switch statement in client_checkaddr() is redundant,
since clp->cl_mtype is loop invariant.  This change makes SUBNETWORK
client checking more computationally efficient, at the cost of a few
extra lines of code.

This commit should not change code behavior in any way.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>

No differences found