Received: by 2002:a05:7412:b112:b0:f9:3106:f1c0 with SMTP id az18csp131330rdb; Mon, 18 Dec 2023 01:05:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IHK1dJ8cI7o0atq6UurcyEudl2CAfonIF5dugoCJ2L3ZcWWQE8bFJK3OfSp5Ov7tp62UaGV X-Received: by 2002:a05:6512:39cb:b0:50b:f03c:1ea2 with SMTP id k11-20020a05651239cb00b0050bf03c1ea2mr10513457lfu.84.1702890301024; Mon, 18 Dec 2023 01:05:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702890300; cv=none; d=google.com; s=arc-20160816; b=ETbyBVxLLQZfaTCjnzv/cIKnpgdeqOUMwpoyJH37OvozzbghwhSmsGilMh6Pjdy2P/ mnnGA9+JgSWhHPqY4YxCzz6koyWdFmHbaAQteFEO2sHT0T8acm8WFRu4w5clfhJb9IP2 2qtqrejkraKXbdUl5Zj/26ENedgwIYizDVQdH1kpOWTR5e3cGYecRC2QCwgFYP4qvSQX IAbZQ/InG2lHxSehD30whb3rSRGs6l38++89vS6RJw7NSlUbWbTQ4RhYEaM051O6D2OU h1JQ2nPG3Y7QqMMsXdMQP2a1tuSVBk/YUdeMnclK+zzzF/F6WZ/Bri64Ofy1+dJ634P2 XAKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=8YU1reJ9K3iukGIMAlWDnrpIVtAk/bboD9gXjUJSYOQ=; fh=G9R3k9cEYwB9YaDXokbdT+WuQlJ5FATgGDhomVg9P64=; b=uAol5BrYYzLEbdTxTZbtpaNKAlq5BJNn+dag1gTWT8O55Ai6TKf6kavdNIsR43a4/R 1M0lZpi/SUdEcevVNALhYdJ3vZDL0/DhqKNNQDu9ZPDWT3UZkWjNZnLK6o+jWP8zNlDf NV8SY/47SjlgOJkLEbCmbcvjovMMi9BJkLdz6vFupiLRDiBwu3Abx80LzGw1h0P3eGwH Q14UKOckDAEsdP2V+BchPY3g07/OUjisUzxFuA1DvZms6BbCVy2msSKw0VosLb8ZE4gp gbkOD7M72Ob838GLh0yIim30sGnBS75bYpKy3jlXCph1JXJRHRA1VW1k72q/wF0HT+GC pViA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="fgtT/IY4"; spf=pass (google.com: domain of linux-kernel+bounces-3206-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3206-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id bt12-20020a170906b14c00b00a2328f418fdsi1819657ejb.1027.2023.12.18.01.05.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 01:05:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-3206-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="fgtT/IY4"; spf=pass (google.com: domain of linux-kernel+bounces-3206-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3206-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 987D31F23057 for ; Mon, 18 Dec 2023 09:05:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D914F111A1; Mon, 18 Dec 2023 09:04:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fgtT/IY4" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D131412B6C; Mon, 18 Dec 2023 09:04:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-1d04c097e34so20541605ad.0; Mon, 18 Dec 2023 01:04:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702890287; x=1703495087; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=8YU1reJ9K3iukGIMAlWDnrpIVtAk/bboD9gXjUJSYOQ=; b=fgtT/IY4dLvX8ahW5kmvZNrHEY2hFJ72OMBd2lq2T8oIxjQC38Vsr0VhXOCuQLOYST OZVth1nc/iwrxueiwFSDd7fBTlqqS2GEPskPKKWfux25L2pFAeTAqp9o3qRWdiSCvruR eahF+n6ay9/kef7YNY2O8LwsJyUa+5NUEsGhHzTf3P5yFkQGI9iz7l5fie8Q4NdPSgMD EoUI5I37g33YtXnG6B3kX/9Xue7b5nWE01ifDX5kb3zAkUR7hM3WiJc9pi3lobby84Eo z43QrfEyGRO2o+b5BoeV767i5FRUQjE0n7Z+qtdFfLonActZOojcHvfEgYjiFMM+Aqkr WWPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702890287; x=1703495087; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=8YU1reJ9K3iukGIMAlWDnrpIVtAk/bboD9gXjUJSYOQ=; b=faeGhQdtjj9S0sZV0Xg69Go0vc+50Ex2Enp7K4HXiibjc2fFD0uLWBAhmSQ50X83xk aRnWXV7uAZ4lgDgNuqsX9Rm8BP8jDSH9gH/pzIJHhd5aVVXRpIJ5yWCi/zjNG+04S282 8bmitQylfv0BDP5ANQ/6siUXrz+wBvZAtF4cAMwkBRUhP5i2I5L6JEhXSF/9NhcsfYfw aZMVEqzSUiLy+Z50V0Selz8L3AF0zKNjE1R5v19PqeyhGZ8b/cjOiF2w9AdmtrtiXGox Fay8FAUAyrj8cmGXMxNlJLEeSh3sPjsWe4q33/t0oe2mQEU92Y+qOuUXLOrOnH/mLsgX pFEA== X-Gm-Message-State: AOJu0YzWXAb97uobZ2Zzzr22gn28hhYD+m6HcEy9WZ5jHmNcPbyOUOTQ ByfhbRg1+bWe+K3BodU1A7k= X-Received: by 2002:a17:902:c3c6:b0:1d3:a674:6da6 with SMTP id j6-20020a170902c3c600b001d3a6746da6mr2766688plj.49.1702890287101; Mon, 18 Dec 2023 01:04:47 -0800 (PST) Received: from Laptop-X1 ([43.228.180.230]) by smtp.gmail.com with ESMTPSA id b2-20020a170902bd4200b001d369beee67sm4196951plx.131.2023.12.18.01.04.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 01:04:46 -0800 (PST) Date: Mon, 18 Dec 2023 17:04:41 +0800 From: Hangbin Liu To: Dmitry Safonov Cc: Shuah Khan , David Ahern , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Salam Noureddine , Bob Gilligan , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, netdev@vger.kernel.org, Dmitry Safonov <0x7f454c46@gmail.com> Subject: Re: [PATCH 03/12] selftests/net: Add TCP-AO ICMPs accept test Message-ID: References: <20231215-tcp-ao-selftests-v1-0-f6c08180b985@arista.com> <20231215-tcp-ao-selftests-v1-3-f6c08180b985@arista.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231215-tcp-ao-selftests-v1-3-f6c08180b985@arista.com> On Fri, Dec 15, 2023 at 02:36:17AM +0000, Dmitry Safonov wrote: > Reverse to icmps-discard test: the server accepts ICMPs, using > TCP_AO_CMDF_ACCEPT_ICMP and it is expected to fail under ICMP > flood from client. Test that the default pre-TCP-AO behaviour functions > when TCP_AO_CMDF_ACCEPT_ICMP is set. > > Expected output for ipv4 version (in case it receives ICMP_PROT_UNREACH): > > # ./icmps-accept_ipv4 > > 1..3 > > # 3209[lib/setup.c:166] rand seed 1642623870 > > TAP version 13 > > # 3209[lib/proc.c:207] Snmp6 Ip6InReceives: 0 => 1 > > # 3209[lib/proc.c:207] Snmp6 Ip6InNoRoutes: 0 => 1 > > # 3209[lib/proc.c:207] Snmp6 Ip6InOctets: 0 => 76 > > # 3209[lib/proc.c:207] Snmp6 Ip6InNoECTPkts: 0 => 1 > > # 3209[lib/proc.c:207] Tcp InSegs: 3 => 23 > > # 3209[lib/proc.c:207] Tcp OutSegs: 2 => 22 > > # 3209[lib/proc.c:207] IcmpMsg InType3: 0 => 4 > > # 3209[lib/proc.c:207] Icmp InMsgs: 0 => 4 > > # 3209[lib/proc.c:207] Icmp InDestUnreachs: 0 => 4 > > # 3209[lib/proc.c:207] Ip InReceives: 3 => 27 > > # 3209[lib/proc.c:207] Ip InDelivers: 3 => 27 > > # 3209[lib/proc.c:207] Ip OutRequests: 2 => 22 > > # 3209[lib/proc.c:207] IpExt InOctets: 288 => 3420 > > # 3209[lib/proc.c:207] IpExt OutOctets: 124 => 3244 > > # 3209[lib/proc.c:207] IpExt InNoECTPkts: 3 => 25 > > # 3209[lib/proc.c:207] TcpExt TCPPureAcks: 1 => 2 > > # 3209[lib/proc.c:207] TcpExt TCPOrigDataSent: 0 => 20 > > # 3209[lib/proc.c:207] TcpExt TCPDelivered: 0 => 19 > > # 3209[lib/proc.c:207] TcpExt TCPAOGood: 3 => 23 > > ok 1 InDestUnreachs delivered 4 > > ok 2 server failed with -92: Protocol not available > > ok 3 TCPAODroppedIcmps counter didn't change: 0 >= 0 > > # Totals: pass:3 fail:0 xfail:0 xpass:0 skip:0 error:0 > > Expected output for ipv6 version (in case it receives ADM_PROHIBITED): > > # ./icmps-accept_ipv6 > > 1..3 > > # 3277[lib/setup.c:166] rand seed 1642624035 > > TAP version 13 > > # 3277[lib/proc.c:207] Snmp6 Ip6InReceives: 6 => 31 > > # 3277[lib/proc.c:207] Snmp6 Ip6InDelivers: 4 => 29 > > # 3277[lib/proc.c:207] Snmp6 Ip6OutRequests: 4 => 24 > > # 3277[lib/proc.c:207] Snmp6 Ip6InOctets: 592 => 4492 > > # 3277[lib/proc.c:207] Snmp6 Ip6OutOctets: 332 => 3852 > > # 3277[lib/proc.c:207] Snmp6 Ip6InNoECTPkts: 6 => 31 > > # 3277[lib/proc.c:207] Snmp6 Icmp6InMsgs: 1 => 6 > > # 3277[lib/proc.c:207] Snmp6 Icmp6InDestUnreachs: 0 => 5 > > # 3277[lib/proc.c:207] Snmp6 Icmp6InType1: 0 => 5 > > # 3277[lib/proc.c:207] Tcp InSegs: 3 => 23 > > # 3277[lib/proc.c:207] Tcp OutSegs: 2 => 22 > > # 3277[lib/proc.c:207] TcpExt TCPPureAcks: 1 => 2 > > # 3277[lib/proc.c:207] TcpExt TCPOrigDataSent: 0 => 20 > > # 3277[lib/proc.c:207] TcpExt TCPDelivered: 0 => 19 > > # 3277[lib/proc.c:207] TcpExt TCPAOGood: 3 => 23 > > ok 1 Icmp6InDestUnreachs delivered 5 > > ok 2 server failed with -13: Permission denied > > ok 3 TCPAODroppedIcmps counter didn't change: 0 >= 0 > > # Totals: pass:3 fail:0 xfail:0 xpass:0 skip:0 error:0 > > With some luck the server may fail with ECONNREFUSED (depending on what > icmp packet was delivered firstly). > For the kernel error handlers see: tab_unreach[] and icmp_err_convert[]. > > Signed-off-by: Dmitry Safonov Tested-by: Hangbin Liu