From 2b12563e16ccb6cbe151501fc85299bece29be86 Mon Sep 17 00:00:00 2001 From: Jussi Laakkonen Date: Tue, 18 Dec 2018 12:07:00 +0200 Subject: [PATCH] [connman] Add dccp to firewall protocols. Fix max port. JB#44071 Add dccp to supported protocols list. This is supported although iptables manual page does not mention it. Fix max port check to include also the max 16bit uint as accepted port number. --- connman/src/firewall.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/connman/src/firewall.c b/connman/src/firewall.c index cec0937..8c3cf10 100644 --- a/connman/src/firewall.c +++ b/connman/src/firewall.c @@ -1261,6 +1261,7 @@ static bool is_string_digits(const char *str) "ah", "sctp", "mh", + "dccp", "all", NULL }; @@ -1468,7 +1469,7 @@ static bool validate_ports_or_services(const char *str) portnum = (int) g_ascii_strtoll(tokens[i], NULL, 10); /* Valid port number */ - if (portnum && portnum < G_MAXUINT16) + if (portnum && portnum <= G_MAXUINT16) continue; } -- 2.23.0