Commit 2b12563e authored by Jussi Laakkonen's avatar Jussi Laakkonen

[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.
parent 5ba2778b
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment