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

qos: use -m state --state #9

Open
wants to merge 1 commit into
base: 374.43_2-update
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions release/src/router/rc/qos.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ int add_qos_rules(char *pcWANIF)
":OUTPUT ACCEPT [0:0]\n"
":QOSO - [0:0]\n"
"%s\n" //NAT Loopback
"-A QOSO -m conntrack --ctstate RELATED,ESTABLISHED -j CONNMARK --restore-mark --mask 0x1ff\n"
"-A QOSO -m state --state RELATED,ESTABLISHED -j CONNMARK --restore-mark --mask 0x1ff\n"
"-A QOSO -m mark ! --mark 0/0xff00 -j RETURN\n"
, (nvram_get_int("fw_nat_loopback") ? "" : "-A QOSO -m mark --mark 0x8000/0x8000 -j RETURN")
);
Expand All @@ -268,7 +268,7 @@ int add_qos_rules(char *pcWANIF)
":PREROUTING ACCEPT [0:0]\n"
":OUTPUT ACCEPT [0:0]\n"
":QOSO - [0:0]\n"
"-A QOSO -m conntrack --ctstate RELATED,ESTABLISHED -j CONNMARK --restore-mark --mask 0x1ff\n"
"-A QOSO -m state --state RELATED,ESTABLISHED -j CONNMARK --restore-mark --mask 0x1ff\n"
"-A QOSO -m mark ! --mark 0/0xff00 -j RETURN\n"
);
#endif
Expand Down Expand Up @@ -906,13 +906,13 @@ int add_qos_rules(char *pcWANIF)
if ((!g) || ((p = strsep(&g, ",")) == NULL)) continue;
if ((inuse & (1 << i)) == 0) continue;
if (atoi(p) > 0) {
fprintf(fn, "-A PREROUTING -m conntrack --ctstate RELATED,ESTABLISHED -j CONNMARK --restore-mark --mask 0x1ff\n");
fprintf(fn, "-A PREROUTING -m state --state RELATED,ESTABLISHED -j CONNMARK --restore-mark --mask 0x1ff\n");
#ifdef CLS_ACT
fprintf(fn, "-A PREROUTING -i %s -j IMQ --todev 0\n", pcWANIF);
#endif
#ifdef RTCONFIG_IPV6
if (ipv6_enabled() && *wan6face) {
fprintf(fn_ipv6, "-A PREROUTING -m conntrack --ctstate RELATED,ESTABLISHED -j CONNMARK --restore-mark --mask 0x1ff\n");
fprintf(fn_ipv6, "-A PREROUTING -m state --state RELATED,ESTABLISHED -j CONNMARK --restore-mark --mask 0x1ff\n");
#ifdef CLS_ACT
fprintf(fn_ipv6, "-A PREROUTING -i %s -j IMQ --todev 0\n", wan6face);
#endif
Expand Down