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

Same DSCP/TOS marking for different events #49

Open
fenwick0neil opened this issue May 10, 2023 · 2 comments
Open

Same DSCP/TOS marking for different events #49

fenwick0neil opened this issue May 10, 2023 · 2 comments

Comments

@fenwick0neil
Copy link

Was working with DSCP / TOS marking found that both MGEN events are marked with the same TOS value.

MGEN COMMAND:
mgen event "0.0 ON 1 UDP DST 127.0.0.1/5111 PERIODIC [ 1 128 ] TOS 16" event "0.0 ON 2 UDP DST 127.0.0.1/5222 PERIODIC [ 1 128 ] TOS 8"

TCPDUMP on lo:
sudo tcpdump -lnnei lo -v port 5111 or port 5222

13:38:56.527050 00:00:00:00:00:00 > 00:00:00:00:00:00, ethertype IPv4 (0x0800), length 170: (tos 0x8, ttl 255, id 63041, offset 0, flags [DF], proto UDP (17), length 156)
127.0.0.1.43691 > 127.0.0.1.5111: UDP, length 128
13:38:56.527101 00:00:00:00:00:00 > 00:00:00:00:00:00, ethertype IPv4 (0x0800), length 170: (tos 0x8, ttl 255, id 63042, offset 0, flags [DF], proto UDP (17), length 156)
127.0.0.1.43691 > 127.0.0.1.5222: UDP, length 128

@weston-nrl
Copy link
Collaborator

I can verify that this is a problem, as I just ran into it the other day. I believe this is due to the code reusing an existing socket and not detecting that it needs to create a separate one. There should be a way to fix that properly, but I'm not sure offhand how complicated that may be. If you need a workaround in the meantime, specify different source ports on the different TOS flows.

@fenwick0neil
Copy link
Author

Workaround works, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants