mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-08-08 09:21:48 +08:00
Consistency for readability
Consistency across IPv4 and IPv6 paths. Set `sin_addr` first and then `sin_port`. Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
This commit is contained in:
@@ -443,8 +443,8 @@ int parse_proxy_proto_header(struct worker_st *ws, int fd)
|
||||
|
||||
memset(&ws->remote_addr, 0, sizeof(ws->remote_addr));
|
||||
sa->sin_family = AF_INET;
|
||||
memcpy(&sa->sin_port, p + 8, 2);
|
||||
memcpy(&sa->sin_addr, p, 4);
|
||||
memcpy(&sa->sin_port, p + 8, 2);
|
||||
ws->remote_addr_len = sizeof(struct sockaddr_in);
|
||||
|
||||
memset(&ws->our_addr, 0, sizeof(ws->our_addr));
|
||||
|
||||
Reference in New Issue
Block a user