From patchwork Fri Dec 4 03:17: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: 1410816 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=d+r5W9cI; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4CnHvY4gfqz9sSs for ; Fri, 4 Dec 2020 14:17:45 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727753AbgLDDRo (ORCPT ); Thu, 3 Dec 2020 22:17:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727474AbgLDDRo (ORCPT ); Thu, 3 Dec 2020 22:17:44 -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 7FDCCC061A51 for ; Thu, 3 Dec 2020 19:17:04 -0800 (PST) Received: by mail-pl1-x642.google.com with SMTP id j1so2346110pld.3 for ; Thu, 03 Dec 2020 19:17: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=GruVPqLuOype9ik6Ae+LofiIzgnB3RBUwZpQkQt0gCY=; b=d+r5W9cIiX32t49DWQAfKBI0Nrg/+KqoSfkAjLNQVfd34eVKYnLPQY0Di6N7vUjfVv zON9KNS9yI+I77ml25IjGyB8Hc3TCTNQNWA5877JuC3xWZWmF7BTTX10xMeO/l2fHGqQ 7wkuQTLNrg2q+t1Ol3AmPbx4sC/0bLLuwfZ9zi364oxFBoTqqO1Ohjvq0nLHjVT6nwVp hdPhD5HKwCUM5LE1j0jtz7wQjB/Oqtvy79ZPwH6X1x5OcBUrmy6PYqLLoLOGY9nESvR/ OIC7dUt4MS6EHnHCPTSWqXa85oOlMuYMuVf8ZV0sWPXahmYHBgCPhq4bss+yIR2Rk7AL /xgg== 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=GruVPqLuOype9ik6Ae+LofiIzgnB3RBUwZpQkQt0gCY=; b=dwOOwd9MrdFjverK+z5L6CARV03LfbvZucQ+p9qseSPEDDijhmYKc8MpvV7V06fL5m 41f9iy+MXU+3L1r7Rr9ljRablYb5DntWXWbce58YyBENRkGRiOxebdOYsAaAdjYDS4be 8a/0j+luOs3pUdDUeBlzxWI5bLkkbYa06GaTVyF8gRbV3AP+c0Ik+T+QvEggqrzjIlef LbrdjRvDqlfPJJe5n3LCG1xdnQtrjTeQAUkfaGWTM74YVV9GpGz8A49+z0OK47L+1zU8 TMRbDx0kKO7gAthOwLhDD4odhYiJGKPpqmuJGckMV4nDTB+S9YzcNlm/jZfQi/Yf7Zes ULhw== X-Gm-Message-State: AOAM533hFjPr8fyUzyZAMrN/WMoyvvCur89twPH4+ssWdk3GA9gCMRqb Ci7MIfnXHjZbSGKTje/c+88aLaGA77rshQ== X-Google-Smtp-Source: ABdhPJzQ5M2CQcJEfJ9Db6aCsSueGdyF964TLGepXh9oQ0I3vTtineXpHvckXd5KQaTZsVyYDjTnaQ== X-Received: by 2002:a17:902:ab83:b029:d8:d979:f083 with SMTP id f3-20020a170902ab83b02900d8d979f083mr2062055plr.84.1607051824163; Thu, 03 Dec 2020 19:17:04 -0800 (PST) Received: from clinic20-Precision-T3610.hsd1.ca.comcast.net ([2601:648:8400:9ef4:bf20:728e:4c43:a644]) by smtp.gmail.com with ESMTPSA id b20sm2797308pfi.218.2020.12.03.19.17.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2020 19:17:03 -0800 (PST) From: Andreas Roeseler To: davem@davemloft.net, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, kuba@kernel.org Cc: netdev@vger.kernel.org Subject: [PATCH net-next 5/6] net: add support for sending RFC 8335 PROBE messages Date: Thu, 3 Dec 2020 19:17:02 -0800 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Modify the ping_supported function to support PROBE message types. This allows tools such as the ping command in the iputils package to be modified to send PROBE requests through the existing framework for sending ping requests. Signed-off-by: Andreas Roeseler --- net/ipv4/ping.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c index 248856b301c4..39bdcb2bfc92 100644 --- a/net/ipv4/ping.c +++ b/net/ipv4/ping.c @@ -453,7 +453,9 @@ EXPORT_SYMBOL_GPL(ping_bind); static inline int ping_supported(int family, int type, int code) { return (family == AF_INET && type == ICMP_ECHO && code == 0) || - (family == AF_INET6 && type == ICMPV6_ECHO_REQUEST && code == 0); + (family == AF_INET && type == ICMP_EXT_ECHO && code == 0) || + (family == AF_INET6 && type == ICMPV6_ECHO_REQUEST && code == 0) || + (family == AF_INET6 && type == ICMPV6_EXT_ECHO_REQUEST && code == 0); } /*