fix TcpdumpParser.pm and embed into pt-query-digest and pt-upgrade

This commit is contained in:
Kei Tsuchiya
2020-01-11 04:11:34 +09:00
parent e9becc267c
commit d623201275
3 changed files with 3 additions and 1 deletions

View File

@@ -3666,7 +3666,7 @@ sub parse_event {
$pos_in_log -= 1 if $pos_in_log;
$raw_packet =~ s/\n20\Z//;
$raw_packet = "20$raw_packet" if $raw_packet =~ /\A20-\d\d-\d\d/; # workaround for 2020 problem
$raw_packet = "20$raw_packet" if $raw_packet =~ /\A20-\d\d-\d\d/; # workaround for year 2020 problem
$raw_packet = "20$raw_packet" unless $raw_packet =~ m/\A20/;
$raw_packet =~ s/0x0000:.+?(450.) /0x0000: $1 /;

View File

@@ -7724,6 +7724,7 @@ sub parse_event {
$pos_in_log -= 1 if $pos_in_log;
$raw_packet =~ s/\n20\Z//;
$raw_packet = "20$raw_packet" if $raw_packet =~ /\A20-\d\d-\d\d/; # workaround for year 2020 problem
$raw_packet = "20$raw_packet" unless $raw_packet =~ m/\A20/;
$raw_packet =~ s/0x0000:.+?(450.) /0x0000: $1 /;

View File

@@ -88,6 +88,7 @@ sub parse_event {
# Remove the separator from the packet, and restore it to the front if
# necessary.
$raw_packet =~ s/\n20\Z//;
$raw_packet = "20$raw_packet" if $raw_packet =~ /\A20-\d\d-\d\d/; # workaround for year 2020 problem
$raw_packet = "20$raw_packet" unless $raw_packet =~ m/\A20/;
# Remove special headers (e.g. vlan) before the IPv4 header.