diff options
| author | Felix Fietkau | 2022-03-07 13:43:07 +0000 |
|---|---|---|
| committer | Felix Fietkau | 2022-03-07 13:43:07 +0000 |
| commit | 6aeeddbc91ad08943f9d687c252e78987b8c1121 (patch) | |
| tree | 1cf6b1bec112343c412d889f4a6a837d83ec27fb | |
| parent | 391a9fbd5ace89f65ff29655f63bfd49cb9a43b4 (diff) | |
interface: extend dns filters to cover vlan tagged traffic as well
Signed-off-by: Felix Fietkau <nbd@nbd.name>
| -rw-r--r-- | interface.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/interface.c b/interface.c index 7d9cecd..cbe7dc0 100644 --- a/interface.c +++ b/interface.c @@ -281,7 +281,22 @@ cmd_add_ingress(struct qosify_iface *iface, bool eth) qosify_run_cmd(buf, false); ofs = prepare_tc_cmd(buf, sizeof(buf), "filter", "add", iface->ifname, " parent ffff:"); - APPEND(buf, ofs, " protocol ipv6 prio 6 u32 match ip6 sport 53 0xffff " + APPEND(buf, ofs, " protocol ip prio 5 u32 match ip sport 53 0xffff " + "flowid 1:1 action mirred egress redirect dev ifb-dns"); + qosify_run_cmd(buf, false); + + ofs = prepare_tc_cmd(buf, sizeof(buf), "filter", "add", iface->ifname, " parent ffff:"); + APPEND(buf, ofs, " protocol 802.1Q prio 6 u32 offset plus 4 match ip sport 53 0xffff " + "flowid 1:1 action mirred egress redirect dev ifb-dns"); + qosify_run_cmd(buf, false); + + ofs = prepare_tc_cmd(buf, sizeof(buf), "filter", "add", iface->ifname, " parent ffff:"); + APPEND(buf, ofs, " protocol ipv6 prio 7 u32 match ip6 sport 53 0xffff " + "flowid 1:1 action mirred egress redirect dev ifb-dns"); + qosify_run_cmd(buf, false); + + ofs = prepare_tc_cmd(buf, sizeof(buf), "filter", "add", iface->ifname, " parent ffff:"); + APPEND(buf, ofs, " protocol ipv6 prio 8 u32 offset plus 4 match ip6 sport 53 0xffff " "flowid 1:1 action mirred egress redirect dev ifb-dns"); qosify_run_cmd(buf, false); |