You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
539 B

  1. Description: Fixes replies when icmp-ipid is used
  2. Author: David Eisner <deisner@gmail.com>
  3. Last-Update: 2015-12-18
  4. --- a/waitpacket.c
  5. +++ b/waitpacket.c
  6. @@ -244,7 +244,8 @@ int recv_icmp(void *packet, size_t size)
  7. if ((icmp.type == ICMP_ECHOREPLY ||
  8. icmp.type == ICMP_TIMESTAMPREPLY ||
  9. icmp.type == ICMP_ADDRESSREPLY) &&
  10. - icmp.un.echo.id == (getpid() & 0xffff))
  11. + icmp.un.echo.id == ((icmp_ip_id == DEFAULT_ICMP_IP_ID) ?
  12. + getpid() & 0xffff : icmp_ip_id) )
  13. {
  14. int icmp_seq = icmp.un.echo.sequence;
  15. int status;