forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 cde9070d9970eef1f7ec2360586c802a16230ad8
kernel/tools/testing/selftests/net/fib_rule_tests.sh
....@@ -187,8 +187,13 @@
187187 match="oif $DEV"
188188 fib_rule4_test_match_n_redirect "$match" "$match" "oif redirect to table"
189189
190
+ # need enable forwarding and disable rp_filter temporarily as all the
191
+ # addresses are in the same subnet and egress device == ingress device.
192
+ ip netns exec testns sysctl -w net.ipv4.ip_forward=1
193
+ ip netns exec testns sysctl -w net.ipv4.conf.$DEV.rp_filter=0
190194 match="from $SRC_IP iif $DEV"
191195 fib_rule4_test_match_n_redirect "$match" "$match" "iif redirect to table"
196
+ ip netns exec testns sysctl -w net.ipv4.ip_forward=0
192197
193198 match="tos 0x10"
194199 fib_rule4_test_match_n_redirect "$match" "$match" "tos redirect to table"