mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2024-11-22 08:16:25 -06:00
Fix a missing break - switch fallthrough by mistake - in dissector.h. This fixes a problem with misidentifying traffic as TCP when it is't.
This commit is contained in:
parent
28e1b020af
commit
7b571213d9
@ -345,8 +345,7 @@ static __always_inline void snoop(struct dissector_t *dissector)
|
||||
|
||||
parse_tcp_ts(hdr, dissector->end, &dissector->tsval, &dissector->tsecr);
|
||||
}
|
||||
}
|
||||
break;
|
||||
} break;
|
||||
case IPPROTO_UDP:
|
||||
{
|
||||
struct udphdr *hdr = get_udp_header(dissector);
|
||||
@ -354,12 +353,13 @@ static __always_inline void snoop(struct dissector_t *dissector)
|
||||
{
|
||||
if (hdr + 1 > dissector->end)
|
||||
{
|
||||
bpf_debug("UDP header past end");
|
||||
return;
|
||||
}
|
||||
dissector->src_port = hdr->source;
|
||||
dissector->dst_port = hdr->dest;
|
||||
}
|
||||
}
|
||||
} break;
|
||||
case IPPROTO_ICMP:
|
||||
{
|
||||
struct icmphdr *hdr = get_icmp_header(dissector);
|
||||
@ -367,14 +367,14 @@ static __always_inline void snoop(struct dissector_t *dissector)
|
||||
{
|
||||
if ((char *)hdr + sizeof(struct icmphdr) > dissector->end)
|
||||
{
|
||||
bpf_debug("ICMP header past end");
|
||||
return;
|
||||
}
|
||||
dissector->ip_protocol = 1;
|
||||
dissector->src_port = bpf_ntohs(hdr->type);
|
||||
dissector->dst_port = bpf_ntohs(hdr->type);
|
||||
}
|
||||
}
|
||||
break;
|
||||
dissector->dst_port = bpf_ntohs(hdr->code);
|
||||
}
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user