mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-10-10 08:12:03 +08:00
Repair ping-leases option
A misplaced bracket passed 'sizeof(*addr1) == -1' instead of 'sizeof(*addr1)'
to sendto(), causing it to fail. This prevented icmp_ping4() from sending
ICMP echo requests.
Consequently, the 'ping-leases' option has been non-functional since
this bug was introduced in commit 2aaa287a.
Signed-off-by: Grigory Trenin <grigory.trenin@gmail.com>
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
- Fixed issues with PAM authentication when combined with pam_sssd (#618)
|
||||
- Enhanced the seccomp filters to address issue in testing (#627)
|
||||
- Fixed "unexpected URL" errors for Cisco AnyConnect clients
|
||||
- Fixed the 'ping-leases' option, which was broken since version 1.1.1
|
||||
|
||||
* Version 1.3.0 (released 2024-05-05)
|
||||
- Switch to https://github.com/nodejs/llhttp from http-parser.
|
||||
|
||||
+2
-2
@@ -202,7 +202,7 @@ int icmp_ping4(main_server_st *s, struct sockaddr_in *addr1)
|
||||
pkt->icmp_cksum = in_cksum((unsigned short *)pkt, sizeof(packet1));
|
||||
|
||||
while (sendto(pingsock, packet1, DEFDATALEN + ICMP_MINLEN, 0,
|
||||
(struct sockaddr *)addr1, sizeof(*addr1) == -1) &&
|
||||
(struct sockaddr *)addr1, sizeof(*addr1)) == -1 &&
|
||||
retry(errno))
|
||||
;
|
||||
/* listen for replies */
|
||||
@@ -300,7 +300,7 @@ int icmp_ping6(main_server_st *s, struct sockaddr_in6 *addr1)
|
||||
setsockopt(pingsock, SOL_RAW, IPV6_CHECKSUM, &sockopt, sizeof(sockopt));
|
||||
#endif
|
||||
while (sendto(pingsock, packet1, DEFDATALEN + sizeof(struct icmp6_hdr),
|
||||
0, (struct sockaddr *)addr1, sizeof(*addr1) == -1) &&
|
||||
0, (struct sockaddr *)addr1, sizeof(*addr1)) == -1 &&
|
||||
retry(errno))
|
||||
;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user