public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [0/2] udp: copy  ttl or hop limit from socket to tap
@ 2025-04-24  2:43 Jon Maloy
  0 siblings, 0 replies; only message in thread
From: Jon Maloy @ 2025-04-24  2:43 UTC (permalink / raw)
  To: sbrivio, dgibson, jmaloy, passt-dev

The following patches were meant as a preparation for supporting
traceroute from remote to internal peers.

Unfortunately we ran into two showstoppers during this work.

1: We cannot read IPv4 ttl from the dual-stack socket we are using
   as listener. setsockopt(IP_RECVTTL) is simply not supported by
   the kernel for IPv6 socket, even in dual-stack mode. It is not
   acceptable from a memory consumption viewpoint to create two
   listener sockets, one for IPv4 and one for IPv6, for each bound
   port.
2: There is no way we can create and send ICMP response messages 
   to be sent out from the outgoing socket unless we can access
   it with privileges, which we cannot in PASST.

Because of this, these patches are posted mostly as a documentation
of the work done, maybe to be applied some time in the future if
new conditions permit.


Jon Maloy (2):
  make ttl parametrized
  udp: copy incoming packet TTL from socket to tap

 checksum.c     |  7 +++--
 checksum.h     |  2 +-
 ip.h           | 11 ++++---
 tap.c          | 16 +++++-----
 tap.h          |  6 ++--
 tcp.c          |  5 ++--
 udp.c          | 79 +++++++++++++++++++++++++++++++++++++-------------
 udp_flow.c     | 18 ++++++++++++
 udp_internal.h |  4 +--
 udp_vu.c       |  5 ++--
 util.c         |  5 ++++
 11 files changed, 112 insertions(+), 46 deletions(-)

-- 
2.48.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-04-24  2:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-24  2:43 [0/2] udp: copy ttl or hop limit from socket to tap Jon Maloy

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).