diff options
author | Shreyas Siravara <sshreyas@fb.com> | 2015-03-18 11:02:18 -0700 |
---|---|---|
committer | Kevin Vigor <kvigor@fb.com> | 2017-03-05 16:52:13 -0500 |
commit | 9f55b277b2d3d19a68c3d993cd03b92aefa0e9d5 (patch) | |
tree | 820cd81fc1d1f478c31d1329591a8609c0d6f7e9 /rpc | |
parent | 6551daaf88fc290eeb25077233c79d39aaa51f05 (diff) |
Update tirpc registration to "force" unregister old mapping before re-registering
Summary: Per title
Test Plan: Run prove tests to make sure we didn't break anything
Reviewers: dph, rwareing
Reviewed By: rwareing
FB-commit-id: 78a9a0c
Change-Id: I05ed6b7c715a71e5819fbe8116e7c3146010f836
Signed-off-by: Kevin Vigor <kvigor@fb.com>
Reviewed-on: https://review.gluster.org/16849
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Shreyas Siravara <sshreyas@fb.com>
Diffstat (limited to 'rpc')
-rw-r--r-- | rpc/rpc-lib/src/rpcsvc.c | 6 | ||||
-rw-r--r-- | rpc/rpc-lib/src/rpcsvc.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/rpc/rpc-lib/src/rpcsvc.c b/rpc/rpc-lib/src/rpcsvc.c index 9dc3bff427c..ed23f547e53 100644 --- a/rpc/rpc-lib/src/rpcsvc.c +++ b/rpc/rpc-lib/src/rpcsvc.c @@ -1403,6 +1403,12 @@ rpcsvc_program_register_rpcbind6 (rpcsvc_program_t *newprog, uint32_t port) goto out; } + /* Force the unregistration of the program first. + * This call may fail if nothing has been registered, + * which is fine. + */ + rpcsvc_program_unregister_rpcbind6 (newprog); + success = rpcb_set (newprog->prognum, newprog->progver, nc, nb); if (!success) { gf_log (GF_RPCSVC, GF_LOG_ERROR, "Could not register the IPv6" diff --git a/rpc/rpc-lib/src/rpcsvc.h b/rpc/rpc-lib/src/rpcsvc.h index 1032df03b0e..33141256cf3 100644 --- a/rpc/rpc-lib/src/rpcsvc.h +++ b/rpc/rpc-lib/src/rpcsvc.h @@ -440,6 +440,8 @@ rpcsvc_program_register_portmap (rpcsvc_program_t *newprog, uint32_t port); #ifdef IPV6_DEFAULT extern int rpcsvc_program_register_rpcbind6 (rpcsvc_program_t *newprog, uint32_t port); +extern int +rpcsvc_program_unregister_rpcbind6 (rpcsvc_program_t *newprog); #endif extern int |