Skip to content

builtin port driver: source IP propagation does not work for UDP #576

@AkihiroSuda

Description

@AkihiroSuda

#565 added source IP propagation for TCP, but it still does not support UDP.

rootlesskit --net=gvisor-tap-vsock --port-driver=builtin -p 0.0.0.0:8000:8000/udp python3 -c 'import socket; s=socket.socket(type=socket.SOCK_DGRAM); s.bind(("",8000)); data,addr=s.recvfrom(1024); print(addr[0]); s.sendto(data,addr)' &
  sleep 3; echo hello | nc -u -w1 192.168.5.15 8000; kill %1

This should print the actual client IP, not 127.0.0.1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions