mirror of
https://passt.top/passt
synced 2025-09-02 01:43:13 +02:00
icmp: Implement ping tracking based on echo identifiers
Open and bind a socket for each possible ICMP/ICMPv6 echo identifier, and add a tracking mechanism. Otherwise, multiple pings in parallel won't work, and a single ping to a different destination would make an existing ping sequence stop working. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
af243857fa
commit
d303cfdd55
3 changed files with 33 additions and 31 deletions
3
util.c
3
util.c
|
@ -189,9 +189,6 @@ int sock_l4(struct ctx *c, int af, uint16_t proto, uint16_t port)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (proto == IPPROTO_ICMP || proto == IPPROTO_ICMPV6)
|
||||
goto epoll_add;
|
||||
|
||||
if (af == AF_INET) {
|
||||
sa = (const struct sockaddr *)&addr4;
|
||||
sl = sizeof(addr4);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue