comparison src/director/login-connection.c @ 18503:333533e2d231

director: Log error if auth sends invalid lip/lport/port parameter. This also fixes compiler warnings.
author Timo Sirainen <tss@iki.fi>
date Wed, 29 Apr 2015 17:45:30 +0200
parents c5cdf42e398a
children e178413a905d
comparison
equal deleted inserted replaced
18502:009648acd7fb 18503:333533e2d231
160 proxy = TRUE; 160 proxy = TRUE;
161 else if (strncmp(*args, "host=", 5) == 0) 161 else if (strncmp(*args, "host=", 5) == 0)
162 host = TRUE; 162 host = TRUE;
163 else if (strncmp(*args, "lip=", 4) == 0) { 163 else if (strncmp(*args, "lip=", 4) == 0) {
164 if (net_addr2ip((*args) + 4, &temp_request.local_ip) < 0) 164 if (net_addr2ip((*args) + 4, &temp_request.local_ip) < 0)
165 ; 165 i_error("auth sent invalid lip field: %s", (*args) + 6);
166 } else if (strncmp(*args, "lport=", 6) == 0) { 166 } else if (strncmp(*args, "lport=", 6) == 0) {
167 if (str_to_uint((*args) + 6, &temp_request.local_port) < 0) 167 if (str_to_uint((*args) + 6, &temp_request.local_port) < 0)
168 ; 168 i_error("auth sent invalid lport field: %s", (*args) + 6);
169 } else if (strncmp(*args, "port=", 5) == 0) { 169 } else if (strncmp(*args, "port=", 5) == 0) {
170 if (str_to_uint((*args) + 5, &temp_request.dest_port) < 0) 170 if (str_to_uint((*args) + 5, &temp_request.dest_port) < 0)
171 ; 171 i_error("auth sent invalid port field: %s", (*args) + 6);
172 } else if (strncmp(*args, "destuser=", 9) == 0) 172 } else if (strncmp(*args, "destuser=", 9) == 0)
173 username = *args + 9; 173 username = *args + 9;
174 else if (strncmp(*args, "director_tag=", 13) == 0) 174 else if (strncmp(*args, "director_tag=", 13) == 0)
175 tag = *args + 13; 175 tag = *args + 13;
176 else if (strncmp(*args, "director_proxy_maybe", 20) == 0 && 176 else if (strncmp(*args, "director_proxy_maybe", 20) == 0 &&