From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCHv2 net-next 2/2] selftests: add a selftest for directed broadcast forwarding Date: Mon, 2 Jul 2018 09:12:25 -0600 Message-ID: References: <62ecbcf0c905dde3bfde51cd260e2f7c59e21028.1530512974.git.lucien.xin@gmail.com> <03b43b2dbda208510514082b2bd94643c3a6580c.1530512974.git.lucien.xin@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: davem@davemloft.net, Davide Caratti , idosch@idosch.org To: Xin Long , network dev Return-path: Received: from mail-pg0-f66.google.com ([74.125.83.66]:34598 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752458AbeGBPM3 (ORCPT ); Mon, 2 Jul 2018 11:12:29 -0400 Received: by mail-pg0-f66.google.com with SMTP id y5-v6so1003564pgv.1 for ; Mon, 02 Jul 2018 08:12:28 -0700 (PDT) In-Reply-To: <03b43b2dbda208510514082b2bd94643c3a6580c.1530512974.git.lucien.xin@gmail.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: 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] Why the need for the iptables rule? 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.