[][MAC80211][hnat][Add iptables pkttype rules to skip Multicast binding]
[Description]
Add iptables pkttype rules to skip Multicast binding.
Without this patch, the multicast traffic will be bound mistakely.
[Release-log]
N/A
Change-Id: Iccbdef9e4cc17dbf536d6892fb73a4ea00ab43c4
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/9269710
diff --git a/21.02/files/target/linux/mediatek/base-files/sbin/smp-mt76.sh b/21.02/files/target/linux/mediatek/base-files/sbin/smp-mt76.sh
index 5b8710a..4830806 100755
--- a/21.02/files/target/linux/mediatek/base-files/sbin/smp-mt76.sh
+++ b/21.02/files/target/linux/mediatek/base-files/sbin/smp-mt76.sh
@@ -119,6 +119,11 @@
iptables -I FORWARD -p udp -j FLOWOFFLOAD --hw
ip6tables -D FORWARD -p udp -j FLOWOFFLOAD --hw
ip6tables -I FORWARD -p udp -j FLOWOFFLOAD --hw
+ #Multicast skip Binding
+ iptables -D FORWARD -m pkttype --pkt-type multicast -j ACCEPT
+ iptables -I FORWARD -m pkttype --pkt-type multicast -j ACCEPT
+ ip6tables -D FORWARD -m pkttype --pkt-type multicast -j ACCEPT
+ ip6tables -I FORWARD -m pkttype --pkt-type multicast -j ACCEPT
else
dbg2 "WED_ENABLE OFF irq/iptable seting"
@@ -190,6 +195,11 @@
iptables -I FORWARD -p udp -j FLOWOFFLOAD --hw
ip6tables -D FORWARD -p udp -j FLOWOFFLOAD --hw
ip6tables -I FORWARD -p udp -j FLOWOFFLOAD --hw
+ #Multicast skip Binding
+ iptables -D FORWARD -m pkttype --pkt-type multicast -j ACCEPT
+ iptables -I FORWARD -m pkttype --pkt-type multicast -j ACCEPT
+ ip6tables -D FORWARD -m pkttype --pkt-type multicast -j ACCEPT
+ ip6tables -I FORWARD -m pkttype --pkt-type multicast -j ACCEPT
#AX6000 AX7800 - SOC
if [[ "$WIFI_RADIO1" -eq "1" ]]; then
@@ -286,6 +296,11 @@
iptables -I FORWARD -p udp -j FLOWOFFLOAD --hw
ip6tables -D FORWARD -p udp -j FLOWOFFLOAD --hw
ip6tables -I FORWARD -p udp -j FLOWOFFLOAD --hw
+ #Multicast skip Binding
+ iptables -D FORWARD -m pkttype --pkt-type multicast -j ACCEPT
+ iptables -I FORWARD -m pkttype --pkt-type multicast -j ACCEPT
+ ip6tables -D FORWARD -m pkttype --pkt-type multicast -j ACCEPT
+ ip6tables -I FORWARD -m pkttype --pkt-type multicast -j ACCEPT
if [[ "$WIFI_RADIO1" -eq "1" ]]; then
wifi1_irq=237