Skip to content
Snippets Groups Projects
Commit fb2de3c4 authored by Reynaldo H. Verdejo Pinochet's avatar Reynaldo H. Verdejo Pinochet
Browse files

ffserver: warn if config uses a system port

Should be harmless as far as users know what they are doing
but an informative warning wont hurt. For details, refer to
http://tools.ietf.org/html/rfc6335



Signed-off-by: default avatarReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
parent 1013d8dd
No related branches found
No related tags found
No related merge requests found
...@@ -4089,6 +4089,8 @@ static int parse_ffconfig(const char *filename) ...@@ -4089,6 +4089,8 @@ static int parse_ffconfig(const char *filename)
if (val < 1 || val > 65536) { if (val < 1 || val > 65536) {
ERROR("Invalid port: %s\n", arg); ERROR("Invalid port: %s\n", arg);
} }
if (val < 1024)
WARNING("Trying to use IETF assigned system port: %d\n", val);
my_http_addr.sin_port = htons(val); my_http_addr.sin_port = htons(val);
} else if (!av_strcasecmp(cmd, "HTTPBindAddress") || !av_strcasecmp(cmd, "BindAddress")) { } else if (!av_strcasecmp(cmd, "HTTPBindAddress") || !av_strcasecmp(cmd, "BindAddress")) {
if (!av_strcasecmp(cmd, "BindAddress")) if (!av_strcasecmp(cmd, "BindAddress"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment