From patchwork Sat Jan 9 18:53:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Ahern X-Patchwork-Id: 12008675 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 578E5C43381 for ; Sat, 9 Jan 2021 18:55:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 32B83239D1 for ; Sat, 9 Jan 2021 18:55:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726381AbhAISz0 (ORCPT ); Sat, 9 Jan 2021 13:55:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:46790 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726336AbhAISzZ (ORCPT ); Sat, 9 Jan 2021 13:55:25 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4F43B239FC; Sat, 9 Jan 2021 18:54:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610218453; bh=HJa9IxIP7Q035YSq3gk1tCBTIST4dvqtxPzRs77R/k4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DbT3qJJktvvYxhrSFFFmpw+Ud7ZsFB9EOhIcX54FkrADjC021RNMCKHdDEmbyvy5l faVRDROvKsGCZ4EJEGgjW5w5s4iQMKbSqqeewjKFxlU8VG5McU2hI9YwqeqIJePKkJ 6kzhxcpK1SHHWyoAoodBPB/e5eS6zIsrmACvNGRmB50MYKERKI3Mmm39lEQwxL3zc2 3Vf19y0D7++JLGaxXDEz6zR84awljBtIkkGWpp1yEqhD+JE0Dq/h8kC0AQZeTDa+dT YVPHJPx7mG8vyGI2Un928ERClCglQY6SfLN+iuXva0XVsNsvVS25FkOwIlhn2v7ftY AIAEbkiJ2GN1w== From: David Ahern To: netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, schoen@loyalty.org, David Ahern Subject: [PATCH 08/11] selftests: Make address validation apply only to client mode Date: Sat, 9 Jan 2021 11:53:55 -0700 Message-Id: <20210109185358.34616-9-dsahern@kernel.org> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <20210109185358.34616-1-dsahern@kernel.org> References: <20210109185358.34616-1-dsahern@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: David Ahern When a single instance of nettest is used for client and server make sure address validation is only done for client mode. Signed-off-by: David Ahern --- tools/testing/selftests/net/nettest.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/testing/selftests/net/nettest.c b/tools/testing/selftests/net/nettest.c index b1d6874d69ee..ff64012ac586 100644 --- a/tools/testing/selftests/net/nettest.c +++ b/tools/testing/selftests/net/nettest.c @@ -1718,6 +1718,12 @@ static int ipc_child(int fd, struct sock_args *args) server_mode = 1; /* to tell log_msg in case we are in both_mode */ + /* when running in both mode, address validation applies + * solely to client side + */ + args->has_expected_laddr = 0; + args->has_expected_raddr = 0; + rc = do_server(args, fd); free(outbuf);