mirror of
https://passt.top/passt
synced 2025-06-19 05:25:34 +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
4
icmp.h
4
icmp.h
|
@ -11,14 +11,10 @@ int icmp_sock_init(struct ctx *c);
|
|||
|
||||
/**
|
||||
* struct icmp_ctx - Execution context for ICMP routines
|
||||
* @s4: ICMP socket number
|
||||
* @s6: ICMPv6 socket number
|
||||
* @fd_min: Lowest file descriptor number for ICMP/ICMPv6 ever used
|
||||
* @fd_max: Highest file descriptor number for ICMP/ICMPv6 ever used
|
||||
*/
|
||||
struct icmp_ctx {
|
||||
int s4;
|
||||
int s6;
|
||||
int fd_min;
|
||||
int fd_max;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue