hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
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"