From: David Ahern <dsahern@gmail.com>
To: Xin Long <lucien.xin@gmail.com>
Cc: network dev <netdev@vger.kernel.org>, davem <davem@davemloft.net>,
Davide Caratti <dcaratti@redhat.com>,
Ido Schimmel <idosch@idosch.org>
Subject: Re: [PATCHv2 net-next 2/2] selftests: add a selftest for directed broadcast forwarding
Date: Tue, 3 Jul 2018 13:23:41 -0600 [thread overview]
Message-ID: <5e5f7edf-1313-cfef-9005-b05ec9051b25@gmail.com> (raw)
In-Reply-To: <CADvbK_ciwsQuJ3Ep0_oFzmFSAPGMB9vjB=KXZ=feG5X1M=oZnw@mail.gmail.com>
On 7/3/18 5:36 AM, Xin Long wrote:
> On Mon, Jul 2, 2018 at 11:12 PM, David Ahern <dsahern@gmail.com> wrote:
>> On 7/2/18 12:30 AM, Xin Long wrote:
>>> +ping_ipv4()
>>> +{
>>> + sysctl_set net.ipv4.icmp_echo_ignore_broadcasts 0
>>> + bc_forwarding_disable
>>> + ping_test $h1 198.51.100.255
>>> +
>>> + iptables -A INPUT -i vrf-r1 -p icmp -j DROP
>>> + bc_forwarding_restore
>>> + bc_forwarding_enable
>>> + ping_test $h1 198.51.100.255
>>> +
>>> + bc_forwarding_restore
>>> + iptables -D INPUT -i vrf-r1 -p icmp -j DROP
>>> + sysctl_restore net.ipv4.icmp_echo_ignore_broadcasts
>>> +}
>>
>> Both tests fail for me:
>> TEST: ping [FAIL]
>> TEST: ping [FAIL]
> I think 'ip vrf exec ...' is not working in your env, while
> the testing is using "ip vrf exec vrf-h1 ping ..."
>
> You can test it by:
> # ip link add dev vrf-test type vrf table 1111
> # ip vrf exec vrf-test ls
well, that's embarrassing. yes, I updated ip and forgot to apply the bpf
workaround to define the syscall number (not defined in jessie).
>
>>
>> Why the need for the iptables rule?
> This iptables rule is to block the echo_request packet going to
> route's local_in.
> When bc_forwarding is NOT doing forwarding well but the packet
> goes to the route's local_in, it will fail.
>
> Without this rule, the 2nd ping will always succeed, we can't tell the
> echo_reply is from route or h2.
>
> Or you have a better way to test this?
your commands are not a proper test. The test should succeed and fail
based on the routing lookup, not iptables rules.
>
>>
>> And, PAUSE_ON_FAIL is not working to take a look at why tests are
>> failing. e.g.,
>>
>> PAUSE_ON_FAIL=yes ./router_broadcast.sh
>>
>> just continues on. Might be something with the infrastructure scripts.
> Yes, in ./router_broadcast.sh, it loads lib.sh where it loads forwarding.config
> where it has "PAUSE_ON_FAIL=no", which would override your
> "PAUSE_ON_FAIL=yes".
>
ack. bit by that as well.
next prev parent reply other threads:[~2018-07-03 19:23 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-02 6:30 [PATCHv2 net-next 0/2] route: add support and selftests for directed broadcast forwarding Xin Long
2018-07-02 6:30 ` [PATCHv2 net-next 1/2] route: add support " Xin Long
2018-07-02 6:30 ` [PATCHv2 net-next 2/2] selftests: add a selftest " Xin Long
2018-07-02 15:12 ` David Ahern
2018-07-03 11:36 ` Xin Long
2018-07-03 19:23 ` David Ahern [this message]
2018-07-04 17:56 ` Xin Long
2018-07-04 18:31 ` David Ahern
2018-07-04 18:36 ` David Ahern
2018-07-05 7:57 ` Xin Long
2018-07-05 13:18 ` David Ahern
2018-07-05 14:07 ` Xin Long
2018-07-06 9:50 ` Xin Long
2018-07-07 14:51 ` David Ahern
2018-07-04 20:39 ` Ido Schimmel
2018-07-05 8:21 ` Xin Long
2018-07-05 15:38 ` Xin Long
2018-07-02 9:57 ` [PATCHv2 net-next 1/2] route: add support " Davide Caratti
2018-07-02 15:05 ` David Ahern
2018-07-03 11:38 ` Xin Long
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5e5f7edf-1313-cfef-9005-b05ec9051b25@gmail.com \
--to=dsahern@gmail.com \
--cc=davem@davemloft.net \
--cc=dcaratti@redhat.com \
--cc=idosch@idosch.org \
--cc=lucien.xin@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).