Code improvements

This commit is contained in:
Luca Deri
2019-12-09 00:29:02 +01:00
parent 23b0b8625d
commit c4d476cc58
14 changed files with 99 additions and 79 deletions
+1 -1
View File
@@ -1506,7 +1506,7 @@ ether_type_check:
vlan_packet = 1;
// double tagging for 802.1Q
while((type == 0x8100) && (ip_offset < header->caplen)) {
while((type == 0x8100) && (ip_offset < (u_int16_t)header->caplen)) {
vlan_id = ((packet[ip_offset] << 8) + packet[ip_offset+1]) & 0xFFF;
type = (packet[ip_offset+2] << 8) + packet[ip_offset+3];
ip_offset += 4;