From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (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 65E7770800; Mon, 2 Dec 2024 21:28:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733174904; cv=none; b=lYIcYaTQp4zBdUVb4YT1BLArwSqzlOCOU7YAQR97Ach5d0vVPsx8Ak1XkAVOzvsddWR9rqHswCD2bDyq17AK7ccun7pspohgiyVW/SrTed2PucwyX8aDybomwR7lUXCQQ/lkve3Xr8QT/eyt+LY2dRtRSsIa6pxhQ3hNNM8aN9o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733174904; c=relaxed/simple; bh=xEyiY89CFoyIC6RJOf5yxjlGAjYfDd0YclyWYUnj1wU=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HsbfbjLHW6AHCfxKc+oL8+8G1UBmYJqyh/XW9UghhkZp60Sr4njBoA5+4QnbIpqggYNEc2TzBRev2cjOZYo+5+Wo8sQR9rhiEPiuFGm1RessIt5gn4T+KKKu1jNZA1JMfff4KNEtJR80/3qxjnvKhWRKcts1gwRaZTPqbLxyxns= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=meuKDiwW; arc=none smtp.client-ip=209.85.221.48 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="meuKDiwW" Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-385e1fcb0e1so1499196f8f.2; Mon, 02 Dec 2024 13:28:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733174901; x=1733779701; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=d+TbYMTL7pdvSVVUGiDfIrHjRUykt9pBPOmZDspqpv4=; b=meuKDiwWlkRxb2+ccGKKc93mpLpDp+yYSVwwO9BIWwEVGkxff9om1d7seZcr5R6HVH POCg3BK70WKsqTNDMGLQodw64bdjqh5zsihxy797mQ37Qc1seZuI5TwU3CUPwM6Kqoy7 bUUXDIeRBqa5mNuHLNpKM1Esys6l+8ISqLuk1S51/eFI/1LYNE0uF0qBEWzwjyVtTiCJ Qp44iB8pO4YG/OLE3Z6bKDB+8Vw7AmWXqL++OOcvUT4UTJUjInWtTIU/nxyBt6Q0hCRa TAWNfKTrgCCrV4H7tQDc1UtuTjZtRGIFjJWNE2xXlj7VfCx0EBGD/sgaKeB1FlJYhXJ5 HXEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733174901; x=1733779701; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=d+TbYMTL7pdvSVVUGiDfIrHjRUykt9pBPOmZDspqpv4=; b=QiVwIFyx8bd0kIHG2gU+DB+3IKEb5JoxpdM7S/BJ61Tbp6zX9kJemMxSPQVXgGcBcq 700DVTWBA6KJkN/Xq4u2sH3Vx+26DjjV/MlYLFr4SuvXk37hvJTZ4l0hgyZlPPIQvCDK 9OtxBMlhpt48a2re4DAPdJDFc4smSdXAMcnzPZNEbt9Qs22BsI+W1jYKgyM0iXsuZkdL Mu/KS4i6EGgpFBdqQFYbIrlqavbTgS1vyJ3NxcDkDZqllyCuDcHHCQ2wmXFbe9eD3uwY 51OX3oNpxGjEa9yRxGMid2SmMhJvEfI3OMzrq+AJ6cosJrilxbYNuUSgkS42UFXOSBnY 8jaA== X-Forwarded-Encrypted: i=1; AJvYcCVFjVACM5Nsfa1Q9WwOW3x9wzjMgOCAcieJBri49ZX7uN3+QT/xpE+7GV3qMB3ADeM5+UlOHD3H@vger.kernel.org, AJvYcCWROQjlM71xknCvtqxf9uvk3XAmp6GmxeRHZwrDpwIeQObbi4IvqnshUeuGv/HC/uKUcAtkguS4@vger.kernel.org, AJvYcCWdMm44tuIfGa2YNAz3kZ3nh7uJRX7RB0XSlP6lU9XrmM8W+tZeQFEbXWEanvv7QFRSyL4taeIRbFUtoYw=@vger.kernel.org, AJvYcCXEa/3dNXsSzHGyQiyMPvberTFGWgQ0JKPn7wR0o3S30Z6PnhqWtwSk4IQhc8SP6Ojz/9ucaa/tzv40QirxNQq8@vger.kernel.org X-Gm-Message-State: AOJu0Yzk2t0Al19Gihr6JjlukV2lG0f9UP6fZ1AoutNrd8hjhPwuDlgF 24lLK/Voo5bjm62bWLYHz88e/+ij5MuhQecAFcRbPw+xsXZlOrQi X-Gm-Gg: ASbGnct1tU0NOQGqaxv9B8fL3v9e+rhG4bZZidqu1e/dUT4trbg4vCSoqSxi78seOIc uXUHYczLCIKSOAiAXwy2euE8m5EnK8ekHnHWCopU6W/dAcfpLfp0Pd4WBT0F6gbojVOB3MWm1vs hK/rnr3K/CJ18DuPhwRsvWySMWtU8jjb9muiTAPRcA065Q+KUec26gKrT0XRB/MMVdArS7i3xhC EJ1BB8+mwvAi8cIbY960wpaPAgtXLZFdx+L3AXtknbyTqZYemy2Ay3aS+C9Ro44n7O/4fG6pGs2 BsayBQ== X-Google-Smtp-Source: AGHT+IF+ZISfH0DvNTDiAbFqRbtpMicPQtHEBxTSXE3ToSiPa1WjslQrrR4kA6zhUQ3UgoD/mZkIXg== X-Received: by 2002:a05:6000:4604:b0:385:f114:15d6 with SMTP id ffacd0b85a97d-385fd3caf15mr9878f8f.13.1733174900591; Mon, 02 Dec 2024 13:28:20 -0800 (PST) Received: from Ansuel-XPS. (93-34-91-161.ip49.fastwebnet.it. [93.34.91.161]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-385f13e4457sm4450311f8f.35.2024.12.02.13.28.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Dec 2024 13:28:20 -0800 (PST) Message-ID: <674e2674.df0a0220.33ed66.d434@mx.google.com> X-Google-Original-Message-ID: Date: Mon, 2 Dec 2024 22:28:16 +0100 From: Christian Marangi To: Vladimir Oltean Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , Petr Machata , Benjamin Poirier , Hangbin Liu , Jiri Pirko , Ido Schimmel , netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [net PATCH 1/2] selftests: net: lib: fix broken ping with coreutils ping util References: <20241130113314.6488-1-ansuelsmth@gmail.com> <20241130154307.cskk55ecltjkinqz@skbuf> <674b334a.050a0220.3b307b.ee8b@mx.google.com> <20241130154840.lv4rmor4dv66cctf@skbuf> <674e1af7.050a0220.3799ad.fa5e@mx.google.com> <20241202212429.n4f2ig6mx4fb27dz@skbuf> Precedence: bulk X-Mailing-List: netdev@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: <20241202212429.n4f2ig6mx4fb27dz@skbuf> On Mon, Dec 02, 2024 at 11:24:29PM +0200, Vladimir Oltean wrote: > On Mon, Dec 02, 2024 at 09:39:15PM +0100, Christian Marangi wrote: > > Mhh the problem seems to be -c > > > > Let me post some outputs... > > > > root@OpenWrt:~# ping -V > > ping from iputils 20240117 > > libcap: no, IDN: no, NLS: no, error.h: no, getrandom(): yes, __fpending(): yes > > root@OpenWrt:~# ping -c 10 192.168.1.1 > > PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data. > > 64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.102 ms > > 64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.084 ms > > 64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.236 ms > > ^C > > --- 192.168.1.1 ping statistics --- > > 3 packets transmitted, 3 received, 0% packet loss, time 2080ms > > rtt min/avg/max/mdev = 0.084/0.140/0.236/0.067 ms > > root@OpenWrt:~# ping 192.168.1.1 -c 10 > > ping: -c: Name does not resolve > > > > As you can see swapping the ip cause this "Name does not resolve" error. > > Ok, I opened the iputils source code and there isn't any relevant recent > change there. But it uses getopt(3), and that seems to be implemented > more simplistically for musl libc: > https://wiki.musl-libc.org/functional-differences-from-glibc.html > "musl and the POSIX standard getopt stop processing options at the first > non-option argument with no permutation." > > On GNU libc: > $ ping 192.168.1.1 -c 1 > PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data. > 64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.696 ms > > --- 192.168.1.1 ping statistics --- > 1 packets transmitted, 1 received, 0% packet loss, time 0ms > rtt min/avg/max/mdev = 0.696/0.696/0.696/0.000 ms Well it's definitely that... As we use musl as glibc is BIIIG and won't ever fit 4mb of flash ahahha Also I just notice msend suffer the very same problem... root@OpenWrt:~# ip vrf exec vlan1 msend -g ff2e::0102:0304 -I lan1 -c 1 Now sending to multicast group: [ff2e::0102:0304]:4444 sendto: Address family not supported by protocol root@OpenWrt:~# ip vrf exec vlan1 msend -I lan1 -c -g 1ff2e::0102:0304 Now sending to multicast group: [224.1.1.1]:4444 Sending msg 1, TTL 1, to [224.1.1.1]:4444: Sending msg 2, TTL 1, to [224.1.1.1]:4444: -- Ansuel