mirror of
https://github.com/M66B/NetGuard.git
synced 2025-02-23 06:41:05 +00:00
parent
ff89f4ad37
commit
11127101c9
1 changed files with 1 additions and 4 deletions
|
@ -115,10 +115,8 @@ void check_icmp_socket(const struct arguments *args, const struct epoll_event *e
|
|||
icmp->icmp_type, icmp->icmp_code,
|
||||
s->icmp.id, icmp->icmp_id, icmp->icmp_seq);
|
||||
|
||||
//restore original ID: without below hack the ICMP response will not get accepted from requestor
|
||||
// have searched in "SoftEther4" source codes and they this too in "Virtual.c" for ICMP_TYPE_ECHO_RESPONSE
|
||||
// restore original ID
|
||||
icmp->icmp_id = s->icmp.id;
|
||||
|
||||
uint16_t csum = 0;
|
||||
if (s->icmp.version == 6) {
|
||||
// Untested
|
||||
|
@ -176,7 +174,6 @@ jboolean handle_icmp(const struct arguments *args,
|
|||
while (cur != NULL &&
|
||||
!((cur->protocol == IPPROTO_ICMP || cur->protocol == IPPROTO_ICMPV6) &&
|
||||
!cur->icmp.stop && cur->icmp.version == version &&
|
||||
cur->icmp.id == icmp->icmp_id &&
|
||||
(version == 4 ? cur->icmp.saddr.ip4 == ip4->saddr &&
|
||||
cur->icmp.daddr.ip4 == ip4->daddr
|
||||
: memcmp(&cur->icmp.saddr.ip6, &ip6->ip6_src, 16) == 0 &&
|
||||
|
|
Loading…
Reference in a new issue