From nobody Tue Nov 26 21:07:25 2024 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XyZsD1vWrz5f1lg for ; Tue, 26 Nov 2024 21:07:28 +0000 (UTC) (envelope-from pi@freebsd.org) Received: from fc.opsec.eu (fc.opsec.eu [IPv6:2001:14f8:200:4::4]) by mx1.freebsd.org (Postfix) with ESMTP id 4XyZsB4Y9nz47Yv for ; Tue, 26 Nov 2024 21:07:26 +0000 (UTC) (envelope-from pi@freebsd.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=softfail (mx1.freebsd.org: 2001:14f8:200:4::4 is neither permitted nor denied by domain of pi@freebsd.org) smtp.mailfrom=pi@freebsd.org; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=freebsd.org (policy=none) Received: from pi (uid 104) (envelope-from pi@freebsd.org) id 844da by fc.opsec.eu (DragonFly Mail Agent v0.13+ on fc.opsec.eu); Tue, 26 Nov 2024 22:07:25 +0100 Date: Tue, 26 Nov 2024 22:07:25 +0100 From: Kurt Jaeger To: Damjan Jovanovic Cc: freebsd-net@freebsd.org Subject: Re: MSG_ERRQUEUE in socket recvmsg ? Message-ID: References: List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spamd-Result: default: False [1.89 / 15.00]; VIOLATED_DIRECT_SPF(3.50)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_LONG(-0.81)[-0.806]; MIME_GOOD(-0.10)[text/plain]; ONCE_RECEIVED(0.10)[]; RCVD_NO_TLS_LAST(0.10)[]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : No valid SPF, No valid DKIM,none]; MISSING_XM_UA(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; GREYLIST(0.00)[pass,meta]; RCPT_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:12502, ipnet:2001:14f8::/32, country:DE]; FREEFALL_USER(0.00)[pi]; R_SPF_SOFTFAIL(0.00)[~all]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[freebsd-net@freebsd.org]; TAGGED_RCPT(0.00)[]; TO_DN_SOME(0.00)[] X-Rspamd-Queue-Id: 4XyZsB4Y9nz47Yv X-Spamd-Bar: + Hi! > > there's a tool called tracepath (similar to traceroute) and some > > implementation in python: > > https://github.com/keiichishima/pytracepath > > It depends on recv(2) having some MSG_ERRQUEUE flag. > It looks like pytracepath not only uses that non-standard flag to enable > reporting of errors for some optional purpose, but relies on the specific > format of those errors, such as the embedded IP addresses, to implement its > core functionality. > > That tool is completely locked into Linux. Yes, I'm aware. But maybe someone is working on some MSG_ERRQUEUE ? > FreeBSD's traceroute is implemented using raw sockets instead. Yes, this forces it to have a root s-bit. I've found a python traceroute code: https://github.com/mihika09/Python-Traceroute and will have a look at that. -- pi@FreeBSD.org +49 171 3101372 Now what ?