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

problem with ipv4 and ipv6 rules on one device #133

Closed
PhilPhonic opened this issue Feb 27, 2020 · 2 comments
Closed

problem with ipv4 and ipv6 rules on one device #133

PhilPhonic opened this issue Feb 27, 2020 · 2 comments
Assignees
Labels

Comments

@PhilPhonic
Copy link

Hey there,

if I try to add rules for ipv4 and ipv6 on the same interface I get an error.
Here is what I did:

tcset enp2s0 --direction incoming --delay 1ms --dst-port 80
tcset enp2s0 --ipv6 --direction incoming --delay 1ms --dst-port 80

This leads to:

[WARNING] failed to add ip link: ip link already exists. try to execute with:
  (a) --overwrite option if you want to overwrite the existing rule.
  (b) --add option if you want to add a new rule in addition to the existing rules.
  (c) --change option if you want to change the existing rule parameter.
[WARNING] failed to '/sbin/tc qdisc add': ingress qdisc already exists. try to execute with:
  (a) --overwrite option if you want to overwrite the existing rule.
  (b) --add option if you want to add a new rule in addition to the existing rules.
  (c) --change option if you want to change the existing rule parameter.
[WARNING] failed to '/sbin/tc qdisc add': qdisc already exists (dev ifb6711, handle=1a37:, algo=htb). try to execute with:
  (a) --overwrite option if you want to overwrite the existing rule.
  (b) --add option if you want to add a new rule in addition to the existing rules.
  (c) --change option if you want to change the existing rule parameter.

So i tried the --add parameter with the second tcset command:

tcdel --all enp2s0
tcset enp2s0 --direction incoming --delay 1ms --dst-port 80
tcset enp2s0 --add --ipv6 --direction incoming --delay 1ms --dst-port 80

This leads to:

[WARNING] command='/sbin/tc filter add dev ifb6711 protocol ipv6 parent 1a37: prio 2 u32 match ip6 dst ::/0 match ip6 src ::/0 match ip6 dport 80 0xffff flowid 1a37:3', returncode=2, stderr='RTNETLINK answers: Invalid argument\nWe have an error talking to the kernel\n'

tcconfig version:

# tcset --version
tcset 0.25.1

os:

# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 9.12 (stretch)
Release:        9.12
Codename:       stretch

kernel:

# uname -r
4.9.0-12-amd64

Any ideas?

@thombashi thombashi self-assigned this Mar 1, 2020
@thombashi thombashi added the bug label Mar 1, 2020
thombashi added a commit that referenced this issue Mar 1, 2020
Fix failure when adding filters for both ipv4 and ipv6.
@thombashi
Copy link
Owner

thombashi commented Mar 1, 2020

@PhilPhonic
Thank you for your report.

I had fixed the issue at tcconfig 0.25.2.
Please try to upgrade the package.

@PhilPhonic
Copy link
Author

@thombashi thanks for your quick response.
it works now

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

No branches or pull requests

2 participants