.. | .. |
---|
187 | 187 | match="oif $DEV" |
---|
188 | 188 | fib_rule4_test_match_n_redirect "$match" "$match" "oif redirect to table" |
---|
189 | 189 | |
---|
| 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 |
---|
190 | 194 | match="from $SRC_IP iif $DEV" |
---|
191 | 195 | fib_rule4_test_match_n_redirect "$match" "$match" "iif redirect to table" |
---|
| 196 | + ip netns exec testns sysctl -w net.ipv4.ip_forward=0 |
---|
192 | 197 | |
---|
193 | 198 | match="tos 0x10" |
---|
194 | 199 | fib_rule4_test_match_n_redirect "$match" "$match" "tos redirect to table" |
---|