mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-10-30 18:27:53 +00:00 
			
		
		
		
	wifi-diag: Fix incorrect matching of seqno in TCP frames.
This commit is contained in:
		| @@ -23,6 +23,7 @@ sub new { | ||||
| 	      acked_by => -1, | ||||
| 	      block_acked_by => -1, | ||||
| 	      retrans => 0, | ||||
| 	      seen_ip => 0, | ||||
| 	      timestamp => 0, | ||||
| 	      datarate => 0, | ||||
| 	      dummy_tx_pkts => 0, | ||||
| @@ -76,6 +77,21 @@ sub append { | ||||
|  | ||||
|   #print "ln: $ln\n"; | ||||
|  | ||||
|   if ($ln =~ /^\s*Internet Protocol Version/) { | ||||
|     $self->{seen_ip} = 1; | ||||
|     return; | ||||
|   } | ||||
|  | ||||
|   if ($self->{seen_ip}) { | ||||
|     if ($ln =~ /^\s*A-MSDU Subframe/) { | ||||
|       $self->{seen_ip} = 0; | ||||
|     } | ||||
|     else { | ||||
|       # Ignore | ||||
|       return; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   if ($ln =~ /^\s*Transmitter address: .*\((\S+)\)/) { | ||||
|     $self->{transmitter} = $1; | ||||
|   } | ||||
|   | ||||
| @@ -195,6 +195,10 @@ while (<>) { | ||||
|   } else { | ||||
|     $cur_pkt->append($ln); | ||||
|   } | ||||
|  | ||||
|   if ($pkts_sofar > 1500) { | ||||
|     last; | ||||
|   } | ||||
| } | ||||
|  | ||||
| if ($cur_pkt->raw_pkt() ne "") { | ||||
| @@ -627,7 +631,8 @@ sub processPkt { | ||||
| 	if ($pkt->{is_last_ampdu}) { | ||||
| 	  $is_last_ampdu = 1; | ||||
| 	  $ampdu_chain_time = $pkt->timestamp() - $first_ampdu_pkt->timestamp(); | ||||
| 	  print "First ampdu pkt: " . $first_ampdu_pkt->frame_num() . " last: " . $pkt->frame_num() | ||||
| 	  print "First ampdu pkt: " . $first_ampdu_pkt->frame_num() . " seqno: " . $first_ampdu_pkt->seqno() | ||||
| 	    . " last: " . $pkt->frame_num() . " seqno: " . $pkt->seqno() | ||||
| 	    . " chain-time: $ampdu_chain_time, chain-count: $this_ampdu_pkt_count.\n"; | ||||
| 	  $first_ampdu_pkt->{seqno} = -1; # Initialize to invalid again. | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Ben Greear
					Ben Greear