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

fix error when use exclude port in tc #149

Merged
merged 1 commit into from
May 11, 2023

Conversation

xlgao-zju
Copy link
Contributor

Signed-off-by: Xianglin Gao xianglingao@tencent.com

Describe what this PR does / why we need it

When I run network loss experiment with exclude port. I find following log:

time="2023-02-01 11:15:24.317567738 CST" level=debug msg="Command Result, output: /bin/sh: line 4: ,: command not found\n/bin/sh: line 6: ,: command not found\n/bin/sh: line 8: ,: command not found\n/bin/sh: line 10: ,: command not found\n/bin/sh: line 12: ,: command not found\n/bin/sh: line 14: ,: command not found\n/bin/sh: line 16: ,: command not found\n, err: <nil>"

When I look at the code, I found out an extra , in

tc filter add dev %s parent 1: prio 4 protocol ip u32 match ip dport %s 0xffff flowid 1:4 && \,
After I remove the ,, it worked fine.

Does this pull request fix one issue?

Describe how you did it

Remove the ,

Describe how to verify it

Run network loss experiment with exclude ports, and it worked fine.

Special notes for reviews

Signed-off-by: Xianglin Gao <xianglingao@tencent.com>
@tiny-x tiny-x added the type/bug Something isn't working label May 11, 2023
@tiny-x tiny-x added this to the v1.7.2 milestone May 11, 2023
@tiny-x tiny-x merged commit 4a79fb8 into chaosblade-io:master May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants