Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] tcprewrite endpoints setting to 1.1.1.1:2.2.2.2 show inconsistent results when traffic is split between non-standard (8080) and standard port (80) #564

Open
amit-raut opened this issue Jul 17, 2019 · 4 comments
Assignees
Projects

Comments

@amit-raut
Copy link

Describe the bug

My goal is to use tcprewrite to slit the traffic in PCAP to 1.1.1.1:2.2.2.2.

When port 80 is involved in PCAP I get right results (the endspoints are split based on the different ports) but when I have traffic on port 8080 or non-standard port I get wrong result (endpoints are not split based on the different ports)

To Reproduce
Please run the following commnads on the attached PCAP (J.pcap) to see wrong result
J.pcap.zip

tcpprep --port --pcap=J.pcap --cachefile=in.cache
tcprewrite --cachefile=in.cache --endpoints=1.1.1.1:2.2.2.2 --infile=J.pcap --outfile=K.pcap

Expected behavior
Correct result for endpoints splitting when tcp port 80 is involved
image

But when port 8080 is involved the endpoints are not split correctly as shown below
image

System (please complete the following information):

  • OS: Xubuntu 16.04
  • OS version: 16.04
  • Tcpreplay Version: tcprewrite version: 3.4.4 (build 2450) (debug)

Additional context

Thank you for looking in to it :)

-Amit

@fklassen fklassen self-assigned this Jul 17, 2019
@fklassen fklassen added the bug label Jul 17, 2019
@fklassen
Copy link
Member

AFAIK port 80 isn't magical in tcprewrite. I'll investigate in next bug fix cycle.

@amit-raut
Copy link
Author

Thank you for your quick response @fklassen. I forgot to mention earlier that the PCAP file J.pcap contains the traffic with same src/dst IP (172.17.0.2). My guess is that somewhere tcpprep/ tcprewrite takes (IP,port) combination in consideration while changing the endpoints.

Thank you,
Amit

@fklassen fklassen added this to the 4.3.3 milestone Jun 3, 2020
@fklassen fklassen added this to To do in 4.3.3 via automation Jun 3, 2020
@fklassen fklassen added enhancement and removed bug labels Jun 4, 2020
@fklassen fklassen removed this from the 4.3.3 milestone Jun 4, 2020
@fklassen fklassen removed this from To do in 4.3.3 Jun 4, 2020
@fklassen fklassen added this to To do in 4.4 via automation Jun 4, 2020
@fklassen
Copy link
Member

fklassen commented Jun 4, 2020

Switching to enhancement. Currently the tcpprep --port command assumes server ports are in the range of 0 - 1023. Requires additional options to expand this range.

@fklassen
Copy link
Member

fklassen commented Jan 28, 2022

Moving to review in 4.5 for further consideration.

I am inclined to not change anything. Port 8080 is not a standard server port, although it is often used as an alternate HTTP port. Only valid range is 0 - 1023. If this is altered, we will probably introduce bugs.

@fklassen fklassen removed this from To do in 4.4 Jan 28, 2022
@fklassen fklassen added this to To do in 4.5 via automation Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
4.5
To do
Development

No branches or pull requests

2 participants