Bugfix: packet parser
* Corrected the acquisition of GRE header length
* Check whether the total length of IP is less than the length of IP header
This commit is contained in:
@@ -19,7 +19,7 @@ static int ipv6_proto_to_str(const struct packet_layer *ipv6_layer, char *buff,
|
||||
switch (next_hdr)
|
||||
{
|
||||
case IPPROTO_HOPOPTS:
|
||||
used += snprintf(buff + used, size - used, ":ipv6.hopopt");
|
||||
used += snprintf(buff + used, size - used, ":ipv6.hopopts");
|
||||
break;
|
||||
case IPPROTO_ROUTING:
|
||||
used += snprintf(buff + used, size - used, ":ipv6.routing");
|
||||
@@ -53,7 +53,7 @@ static int packet_proto_to_str(const struct packet *pkt, char *buff, int size)
|
||||
used += snprintf(buff + used, size - used, "eth:ethertype");
|
||||
break;
|
||||
case LAYER_TYPE_PWETH:
|
||||
used += snprintf(buff + used, size - used, "pweth:ethertype");
|
||||
used += snprintf(buff + used, size - used, "pwethheuristic:pwethcw");
|
||||
break;
|
||||
case LAYER_TYPE_PPP:
|
||||
used += snprintf(buff + used, size - used, "ppp");
|
||||
|
||||
Reference in New Issue
Block a user