mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-16 12:06:55 +02:00
Fix ICMP match.
This commit is contained in:
parent
2cb760e0ac
commit
4f3775bb86
1 changed files with 2 additions and 2 deletions
|
@ -383,8 +383,8 @@ static _doZtFilterResult _doZtFilter(
|
|||
break;
|
||||
case ZT_NETWORK_RULE_MATCH_ICMP:
|
||||
if ((etherType == ZT_ETHERTYPE_IPV4)&&(frameLen >= 20)) {
|
||||
if (frameData[9] == 0x01) {
|
||||
const unsigned int ihl = (frameData[0] & 0xf) * 32;
|
||||
if (frameData[9] == 0x01) { // IP protocol == ICMP
|
||||
const unsigned int ihl = (frameData[0] & 0xf) * 4;
|
||||
if (frameLen >= (ihl + 2)) {
|
||||
if (rules[rn].v.icmp.type == frameData[ihl]) {
|
||||
if ((rules[rn].v.icmp.flags & 0x01) != 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue