RMPS: validate IPs for listeners

This commit is contained in:
2019-01-17 01:08:07 +02:00
parent 3afbf4d0cb
commit 85c0e8db3d
2 changed files with 14 additions and 7 deletions

View File

@@ -299,7 +299,7 @@ static bool test_conf_syntax(char *config)
} else if (!strcmp(line, "db.pass"))
asprintf(&conf.db.pass, "%s", val_ptr);
else if (!strcmp(line, "rmps.agent_ip")) {
/* TODO */
asprintf(&conf.rmps.agent_ip, "%s", val_ptr);
} else if (!strcmp(line, "rmps.agent_port")) {
i = strlen(val_ptr);
if (i < 6) { /* max 5 digits for network port */
@@ -316,7 +316,7 @@ static bool test_conf_syntax(char *config)
val_ok = false;
failed = true;
} else if (!strcmp(line, "rmps.client_ip")) {
/* TODO */
asprintf(&conf.rmps.client_ip, "%s", val_ptr);
} else if (!strcmp(line, "rmps.client_port")) {
i = strlen(val_ptr);
if (i < 6) { /* max 5 digits for network port */