Skip to contentSkip to conversation

Fix supported TCP/multicast port range

PATCH New Jan Pokorný 2 participants 2 messages Sep 3, 2013 – Sep 9, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix supported TCP/multicast port range

---
 client/options.c | 2 +-
 server/config.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
client/options.c +1 -1
index 653fae4..a44c15f 100644
@@ -134,7 +134,7 @@ assign_port(fence_virt_args_t *args, struct arg_info *arg, char *value)
 		return;
 
 	args->net.port = atoi(value);
-	if (args->net.port <= 0 || args->net.port >= 65500) {
+	if (args->net.port <= 0 || args->net.port >= 65536) {
 		printf("Invalid port: '%s'\n", value);
 		args->flags |= F_ERR;
 	}
server/config.c +1 -1
index 87d826e..6ba8b6d 100644
@@ -239,7 +239,7 @@ listener_config_multicast(config_object_t *config)
 		text_input("Multicast IP Port", val, inp, sizeof(inp));
 
 		done = atoi(inp);
-		if (done <= 0 || done > 65534) {
+		if (done <= 0 || done >= 65536) {
 			printf("Port value '%s' is out of range\n", val);
 			continue;
 		}
Signature · 1 line
1.8.1.4
#1 lore raw

PATCH 1/1 Fix supported TCP/multicast port range

Yes, this is right. I'm not sure why I limited the port ranges - and differently, depending on where you look in the code.

This should be merged.

-- Lon

Quoted 33 lines · Jan Pokorn?
---
 client/options.c | 2 +-
 server/config.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
client/options.c +1 -1
index 653fae4..a44c15f 100644
@@ -134,7 +134,7 @@ assign_port(fence_virt_args_t *args, struct arg_info *arg, char *value)
 		return;
 
 	args->net.port = atoi(value);
-	if (args->net.port <= 0 || args->net.port >= 65500) {
+	if (args->net.port <= 0 || args->net.port >= 65536) {
 		printf("Invalid port: '%s'\n", value);
 		args->flags |= F_ERR;
 	}
server/config.c +1 -1
index 87d826e..6ba8b6d 100644
@@ -239,7 +239,7 @@ listener_config_multicast(config_object_t *config)
 		text_input("Multicast IP Port", val, inp, sizeof(inp));
 
 		done = atoi(inp);
-		if (done <= 0 || done > 65534) {
+		if (done <= 0 || done >= 65536) {
 			printf("Port value '%s' is out of range\n", val);
 			continue;
 		}