diff options
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 |
