mirror of
https://github.com/webmin/webmin.git
synced 2026-05-06 15:20:29 +01:00
Fix ping status PID check to use 16 bits for comparison
If `/proc/sys/kernel/pid_max` exceeds 16 bits then the ping check could incorrectly fail.
This commit is contained in:
@@ -176,7 +176,8 @@ sub ping_icmp
|
||||
$len_msg));
|
||||
if (($from_type == $ICMP_ECHOREPLY) &&
|
||||
($from_ip eq $ip) &&
|
||||
($from_pid == $$) && # Does the packet check out?
|
||||
# ping uses only 16 bits for the PID
|
||||
($from_pid == ($$ & 0xffff)) && # Does the packet check out?
|
||||
($from_seq == $ping_seq))
|
||||
{
|
||||
$ret = 1; # It's a winner
|
||||
|
||||
Reference in New Issue
Block a user