summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2019-08-05 21:16:35 +0530
committerAmar Tumballi <amarts@redhat.com>2019-08-06 07:07:30 +0000
commit30e42d14d8d1bec1883f1b7921d01b3117b1eed8 (patch)
treeb0131b8f9045f60da4ea9a00f22c07d253622c0c /rpc
parente3592d7fab0dc9d3f304d3eda34ba862f2c657a6 (diff)
rpc/transport: have default listen-port
With release-6, we now can have transport.socket.listen-port parameter configurable in glusterd.vol. However the default value wasn't defined in the code and this breaks the backward compatibility where if one has a modified glusterd.vol file, then post upgrade the same file will be retained and the new changes introduced as part of the release wouldn't be available in the glusterd.vol. So it's important that for each new options introduced in glusterd.vol file backward compatibility is guaranteed. Fixes: bz#1737676 Change-Id: I776b28bff786320cda299fe673d824024dc9803e Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'rpc')
-rw-r--r--rpc/rpc-transport/socket/src/name.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/rpc/rpc-transport/socket/src/name.c b/rpc/rpc-transport/socket/src/name.c
index 14c11cb835f..3f498e50e2e 100644
--- a/rpc/rpc-transport/socket/src/name.c
+++ b/rpc/rpc-transport/socket/src/name.c
@@ -370,6 +370,8 @@ af_inet_server_get_local_sockaddr(rpc_transport_t *this, struct sockaddr *addr,
listen_port_data = dict_get(options, "transport.socket.listen-port");
if (listen_port_data) {
listen_port = data_to_uint16(listen_port_data);
+ } else {
+ listen_port = GF_DEFAULT_SOCKET_LISTEN_PORT;
}
listen_host_data = dict_get(options, "transport.socket.bind-address");