From patchwork Sat Nov 14 03:24:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Roeseler X-Patchwork-Id: 11905369 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=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, 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 DC7B8C5519F for ; Sat, 14 Nov 2020 03:24:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 95D5522274 for ; Sat, 14 Nov 2020 03:24:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XOOfClxU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726406AbgKNDYE (ORCPT ); Fri, 13 Nov 2020 22:24:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726228AbgKNDYE (ORCPT ); Fri, 13 Nov 2020 22:24:04 -0500 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65E90C0613D1 for ; Fri, 13 Nov 2020 19:24:04 -0800 (PST) Received: by mail-pl1-x641.google.com with SMTP id 35so1308581ple.12 for ; Fri, 13 Nov 2020 19:24:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gwBdhPmSI5a7WujO9iGH/b77+h0jcMM/Td7CNtnnb6U=; b=XOOfClxU7aItcD5Loc2I1HD3H3n8gk/S631gu3/EjzOCdLJdsVCUfDSc9hUh8jn9OU TtEDuC3ffWhgjDnFQNSavbGmcVvzUtSJpti6MN+qDB3E71YBjQZlNnonHpQDEPcYg4jT IQXHD1j2DdbcYBBsktladb5AvVxbIBmLpiXIsdOSCSF9TP+AppeDX0ZpjsCMmOR92Kme sEqzKVcoRk7majccoAQmUC7o1WvhBwbxdx9irAJmUAahipCKdw5WBtTbsy6NhpRIDlix k8yYhITLocenN0ty3kXeaR4eLM/gz8BRpGRD3IRRk3aMfnFFn39cIwOZH9NR2p2GAoAM tDPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gwBdhPmSI5a7WujO9iGH/b77+h0jcMM/Td7CNtnnb6U=; b=KSy4yvAODH5o3YXl8z1joAHEohAYFKVmVC4h1CiJmA1NnjOfjp2SzQri1BQwp9Z39i /pfy1/SemzeOqYgN90A5z5KUD2G267pRLfBuKUI0H691DOCVFbS5ndD+K+cFz1Je2+pl jFMhWhXmwKvXfKLfbr9CbxjUq19LzAXmn59apkKNzZRgpKpSYwia6KNE2wJO5Claz8Tg N5yxHwSsYT8wmLufFlr1w+hBKnTdzT/icXMDG4wCm4wiqs6Akvfsa74oYrow1ywK1nfz SGB8oCyZasqscsFjyfr9PMvKQ7auFAMd3PA8uCULYYnupyciF56l/76A3zrtIzpFRd8L fBPg== X-Gm-Message-State: AOAM5326+yO5HqyuzBZx5mFKoJlicg6U39kSI81G6omdgE4XGmCXScAE zoitfPIxWj/998vrHWMjlpE= X-Google-Smtp-Source: ABdhPJzQiK5qcl94JA14+4s3WkKZ/4ZOcihlBy92ab4mBhVHJJgBucTj/gaEhpkRLrL8Eg4Bjo3RGA== X-Received: by 2002:a17:90a:2d6:: with SMTP id d22mr5125271pjd.38.1605324244010; Fri, 13 Nov 2020 19:24:04 -0800 (PST) Received: from aroeseler-LY545.hsd1.ca.comcast.net ([2601:648:8400:9ef4:34d:9355:e74:4f1b]) by smtp.googlemail.com with ESMTPSA id u22sm9875729pgf.24.2020.11.13.19.24.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Nov 2020 19:24:03 -0800 (PST) From: Andreas Roeseler To: davem@davemloft.net Cc: kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, kuba@kernel.org, netdev@vger.kernel.org Subject: [PATCH v2 net-next 1/3] net: add support for sending probe messages Date: Fri, 13 Nov 2020 19:24:02 -0800 Message-Id: <63bf7511ad13c956bc0d243b180c17eeb113b5da.1605323689.git.andreas.a.roeseler@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Modifying the ping_supported function to support probe message types allows the user to send probe requests through the existing framework for sending ping requests. Signed-off-by: Andreas Roeseler --- Changes since v1: - Switch to correct base tree --- net/ipv4/ping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c index 39b403f854c..70cb505f3e9 100644 --- a/net/ipv4/ping.c +++ b/net/ipv4/ping.c @@ -303,7 +303,7 @@ out: static inline int ping_supported(int type, int code) { - if (type == ICMP_ECHO && code == 0) + if ((type == ICMP_ECHO || type == ICMP_EXT_ECHO) && code == 0) return 1; return 0; } From patchwork Sat Nov 14 03:24:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Roeseler X-Patchwork-Id: 11905375 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=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, 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 123B5C61DD8 for ; Sat, 14 Nov 2020 03:24:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C228622250 for ; Sat, 14 Nov 2020 03:24:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="r6Z5sGvy" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726419AbgKNDYO (ORCPT ); Fri, 13 Nov 2020 22:24:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726228AbgKNDYO (ORCPT ); Fri, 13 Nov 2020 22:24:14 -0500 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 316D9C0613D1 for ; Fri, 13 Nov 2020 19:24:14 -0800 (PST) Received: by mail-pj1-x1041.google.com with SMTP id ei22so1326162pjb.2 for ; Fri, 13 Nov 2020 19:24:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6eXZN523wTS0YR6uyfw4Y6Si2ociubscC3FNxQrFs1k=; b=r6Z5sGvyc7KoBKD5APw1ucqUxXLqfgWLFpWJZCC+hvQyvhLlLaFea+secxkbXAkLBO 1mdIV6IXJq73+q+HOACrBNaRHul8nChOXWwEKHtpQZTZK4Fm4oHkD3MY548cLEzqp5sH wyJlqt7nFGaCI3fRT3UmrkGwuUoGVvT0hUKAoxfnGKJiDBif8AlZvDvkb97oiYO//DSd ivlGoRgAE5sEuRzxmhhGlcPjCifCwiMVmmEDZiRmcq10V/M/3yBdhKe5f412Qnd4ZWfr 9l3TyOkXrA/HxA56cYNOrJivvlh7Avniy4QEOv9AydaC2X5MMKXQw0RYFWazwbXU9Rf4 LM6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6eXZN523wTS0YR6uyfw4Y6Si2ociubscC3FNxQrFs1k=; b=JZAfJodiDMEJ8GoTdWl0Ls+Yrxx5uoi0LrpkSvODtXdAFdB8uEa51esJBu7wqjnpkC 8u9DBAZbZYUZxm2p5bhnOluHsI4HeJk9zgHe5EUd/3QybEKp/XOUhShHudOneuBZYG64 vI60VUFXWPD1VwD/yv3Cmaq9WhImLDaJoxYS+ryLjMRWlyZLI4bB6eUgy8cnWWw8KjNd rJqk2I59aNO1yKcV+Jg1jgtxflMKN76tGZz/YAQc/xHjneAfxlDT2K8Yp1EKzhFpL7RU zRlwpCRSrvgiRRlllpOfQFrsfk7COa0iboqcIuEN1nDp28wGuw5SHNlhCYnozuWZkyIp RhBg== X-Gm-Message-State: AOAM5308M3a4QQEK/1irZdy/+ef7wL5wjtT4Qvh27iLYlMF0uy6nV8Bi bN6jIjXGM96i0mNHKGbXq/k= X-Google-Smtp-Source: ABdhPJyMGpj3kARMsTKABAJ9kKP9wk3sJSoogml5uyQ+pb+3aP8djAnH1Z5co8Yqk49RxrvZAcywpQ== X-Received: by 2002:a17:90a:5c85:: with SMTP id r5mr6198462pji.199.1605324252497; Fri, 13 Nov 2020 19:24:12 -0800 (PST) Received: from aroeseler-LY545.hsd1.ca.comcast.net ([2601:648:8400:9ef4:34d:9355:e74:4f1b]) by smtp.googlemail.com with ESMTPSA id k9sm11192739pfp.68.2020.11.13.19.24.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Nov 2020 19:24:12 -0800 (PST) From: Andreas Roeseler To: davem@davemloft.net Cc: kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, kuba@kernel.org, netdev@vger.kernel.org Subject: [PATCH v2 net-next 2/3] icmp: define probe message types Date: Fri, 13 Nov 2020 19:24:11 -0800 Message-Id: <1ea3b0b7ff42054bfc1bb9ee19e487a3671f3a6a.1605323689.git.andreas.a.roeseler@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org The types of ICMP Extended Echo Request and ICMP Extended Echo Reply are defined in sections 2 and 3 of RFC8335. Signed-off-by: Andreas Roeseler --- Changes since v1: - Switch to correct base tree --- include/linux/icmp.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/icmp.h b/include/linux/icmp.h index 474f2a51cf0..acc9bcbc72b 100644 --- a/include/linux/icmp.h +++ b/include/linux/icmp.h @@ -64,6 +64,9 @@ #define ICMP_EXC_TTL 0 /* TTL count exceeded */ #define ICMP_EXC_FRAGTIME 1 /* Fragment Reass time exceeded */ +/* Codes for EXT_ECHO (Probe) */ +#define ICMP_EXT_ECHO 42 +#define ICMP_EXT_ECHOREPLY 43 struct icmphdr { __u8 type; From patchwork Sat Nov 14 03:24:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Roeseler X-Patchwork-Id: 11905373 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=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, 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 1F489C63699 for ; Sat, 14 Nov 2020 03:24:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E841122245 for ; Sat, 14 Nov 2020 03:24:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="q8WeKkXd" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726433AbgKNDYT (ORCPT ); Fri, 13 Nov 2020 22:24:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726228AbgKNDYS (ORCPT ); Fri, 13 Nov 2020 22:24:18 -0500 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB306C0613D1 for ; Fri, 13 Nov 2020 19:24:18 -0800 (PST) Received: by mail-pl1-x642.google.com with SMTP id j5so5474050plk.7 for ; Fri, 13 Nov 2020 19:24:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=woxCj4aYOv76RczeGQM14d6wQBOSJs+MuH5i0NJX+Z0=; b=q8WeKkXdmJ2REexhrpLjN0Y2yUvxm+pRbetz+N3/GvNOSVFATs1Xhr7MXh9Nq20HtA yUuSW5CNY1VlqX9Nx2y0+q9EasuWt5RrMcw4KwumVywgq8XMRcE537zbKm7G0Xsu2pwB iz3Wo9stiiO+8Q84yk8DGPKF9oloU1D9DGdBRav81hyhWNlK5T1vck01Hdme7UVNa8Rf Ojk6WoTswsR1VWqLn0r+AU5hmYV8Ggmm5gaN//WEJIOqWXk8XdW6aFjkZ0mI/fbvJ5d9 EUBpmU2Dc9wCySW4BmFjHIi6kPcqiWJlOCGDeKWdsdVpW6+xFZ24hbK4w7M4kPhTvZqU WvGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=woxCj4aYOv76RczeGQM14d6wQBOSJs+MuH5i0NJX+Z0=; b=KbQqSJV9KuROVLjDLfYiFszET31M+cxX/aL9JiAnEbjLcR53F5/pYhICwKwQpdHUf7 AoHzNj2KstE14r/2Fdq2nOHI0NbcSlpxESzX8SHGx9HrxxBu3FVI64GT1tir6+FVCywn xY2GGUm7FtOjBqOE2W2U+J3cGzDxKbzHCLyq21FF8MCy18/WO/L6cWxqmUtk7/9YXwA3 vGp+twC5OrtmZICj2xbMc8WfZPoPIZTbcoW8wr17EvkaaAzUGBtamPL6V4909rqtFA3U WX4/4m3h4ucDhxpJ8eHSvsIe3zPcow7R7NBy39u2TraK06Og9voqGetMZOgODzIQcNlb Bfzw== X-Gm-Message-State: AOAM533MZ19rIcsNsM1uJycTpwXF6Mtc7CF05hHAf6HOEBDM3/PnfAiI sAzqTVWDETXjF/Uee6fmhMI= X-Google-Smtp-Source: ABdhPJzjy08E2Hh066hScD8HfYDgtWh0+uOeCnGs2fXdla5fUXTNtkygUQIrTQFwvk6rDnHD3UnmmA== X-Received: by 2002:a17:90a:708c:: with SMTP id g12mr6414301pjk.36.1605324258510; Fri, 13 Nov 2020 19:24:18 -0800 (PST) Received: from aroeseler-LY545.hsd1.ca.comcast.net ([2601:648:8400:9ef4:34d:9355:e74:4f1b]) by smtp.googlemail.com with ESMTPSA id k8sm9934442pgi.39.2020.11.13.19.24.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Nov 2020 19:24:18 -0800 (PST) From: Andreas Roeseler To: davem@davemloft.net Cc: kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, kuba@kernel.org, netdev@vger.kernel.org Subject: [PATCH v2 net-next 3/3] ICMPv6: define probe message types Date: Fri, 13 Nov 2020 19:24:17 -0800 Message-Id: <03d35bcb7aa843ede4fb3bc224b7eba85c12d522.1605323689.git.andreas.a.roeseler@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org The types of ICMPV6 Extended Echo Request and ICMPV6 Extended Echo Reply are defined in sections 2 and 3 of RFC8335. Signed-off-by: Andreas Roeseler --- Changes since v1: - Switch to correct base tree --- include/linux/icmpv6.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/icmpv6.h b/include/linux/icmpv6.h index ba45e6bc076..c6186774584 100644 --- a/include/linux/icmpv6.h +++ b/include/linux/icmpv6.h @@ -137,6 +137,12 @@ static inline struct icmp6hdr *icmp6_hdr(const struct sk_buff *skb) #define ICMPV6_UNK_NEXTHDR 1 #define ICMPV6_UNK_OPTION 2 +/* + * Codes for EXT_ECHO (Probe) + */ +#define ICMPV6_EXT_ECHO_REQUEST 160 +#define ICMPV6_EXT_ECHO_REPLY 161 + /* * constants for (set|get)sockopt */