Peter Schwenke has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1222432?usp=email ) Change subject: Replace libcidr ...................................................................... Replace libcidr libcidr has been used by NFS Ganesha for quite some time. Only a handful of functions from it were used and a whole directory of source code exists for it. Maintenance of it gets difficult things like clang format changes make it difficult if fixes were made upstream (unlikely). CIDR has been made an opaque type, because there aren't reasons for it to be changed by other code. These new functions are simpler and make use of the IP parsing and conversion functions currently in rpc_tools.c. The second arg of cidr_contains is just a sockaddr_t because there was no need to implement the mask on that argument. NFS Ganesha doesn't require that. The function has been renamed to cidr_contains_ip. The unused flags arg dropped from cidr_to_str(). Add test program test_cidr.c This required some of the ip_utils.c:cidr_* functions to be added to MainNFSD/libganesha_nfsd.ver so they can be linked to the test program. The plan is to move the IP-related functions from rpc_tools to here. We will then have the functions in a more easily found file. In export_mgr.c, the behaviour for DisplayExport was kept the same, in case, someone is parsing the output or something. One byte is send on dbus from the old style character arrays for ip addres and mask. Similarly, for the protocol 1 was sent for IPv4 and 2 for IPv6. Similarly for the CIDR version. That behaviour has been mimicked for now. It is probably worth cleaning that up at some point. Change-Id: I77103440d67f1a3318f0492122e9e2a25d535aa5 Signed-off-by: Peter Schwenke <pschwenke@ddn.com> --- M src/MainNFSD/CMakeLists.txt M src/MainNFSD/libganesha_nfsd.ver M src/Protocols/NFS/mnt_Export.c M src/include/client_mgr.h A src/include/ip_utils.h M src/scripts/runcp.sh M src/support/CMakeLists.txt M src/support/client_mgr.c M src/support/export_mgr.c M src/support/exports.c A src/support/ip_utils.c M src/test/CMakeLists.txt A src/test/test_cidr.c 13 files changed, 724 insertions(+), 42 deletions(-) git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/32/1222432/1 -- To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1222432?usp=email To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: ffilz/nfs-ganesha Gerrit-Branch: next Gerrit-Change-Id: I77103440d67f1a3318f0492122e9e2a25d535aa5 Gerrit-Change-Number: 1222432 Gerrit-PatchSet: 1 Gerrit-Owner: Peter Schwenke <pschwenke@ddn.com>