WakeupController: remove --nflog-range
Trying to use the --nflog-range option for truncating packets received
with NFLOG does actually nothing and causes warnings to be printed by
IptablesRestoreController in netd.
The warning was added in https://patchwork.kernel.org/patch/9191269/
to iptables which also introduces a new XT_NFLOG_F_COPY_LEN
constant for passing down the packet copy len argument to the kernel
via a new --nflog-size option in iptables.
This patch removes the --nflog-range which is not necessary.
In reality WakeupController already specify a range argument when
subcribing to NFLOG using the NFLogListener interface in netd.
This sets the NFULNL_COPY_PACKET argument when doing the initial
Netlink request to NFLOG.
Bug: 73918721
Test: built, flashed, checked wakeup events are still correctly logged,
checked that warnings are not printed anymore.
Change-Id: I742aaecf8563d5e476805301e0435a412bb37e6a
diff --git a/server/WakeupControllerTest.cpp b/server/WakeupControllerTest.cpp
index f7812e5..500c5f9 100644
--- a/server/WakeupControllerTest.cpp
+++ b/server/WakeupControllerTest.cpp
@@ -289,7 +289,7 @@
const char kExpected[] =
"*mangle\n-A wakeupctrl_mangle_INPUT -i test:prefix"
" -j NFLOG --nflog-prefix wlan8 --nflog-group 3 --nflog-threshold 8"
- " --nflog-range 60 -m mark --mark 0x12345678/0x0f0f0f0f -m limit --limit 10/s\nCOMMIT\n";
+ " -m mark --mark 0x12345678/0x0f0f0f0f -m limit --limit 10/s\nCOMMIT\n";
EXPECT_CALL(mIptables, execute(V4V6, kExpected, _)).WillOnce(Return(0));
mController.addInterface(kPrefix, kIfName, kMark, kMask);
}
@@ -302,7 +302,7 @@
const char kExpected[] =
"*mangle\n-D wakeupctrl_mangle_INPUT -i test:prefix"
" -j NFLOG --nflog-prefix wlan8 --nflog-group 3 --nflog-threshold 8"
- " --nflog-range 60 -m mark --mark 0x12345678/0xf0f0f0f0 -m limit --limit 10/s\nCOMMIT\n";
+ " -m mark --mark 0x12345678/0xf0f0f0f0 -m limit --limit 10/s\nCOMMIT\n";
EXPECT_CALL(mIptables, execute(V4V6, kExpected, _)).WillOnce(Return(0));
mController.delInterface(kPrefix, kIfName, kMark, kMask);
}