TPROXY: implemented IP_RECVORIGDSTADDR socket option
authorBalazs Scheidler <bazsi@balabit.hu>
Mon, 17 Nov 2008 03:32:39 +0000 (19:32 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Nov 2008 03:32:39 +0000 (19:32 -0800)
commite8b2dfe9b4501ed0047459b2756ba26e5a940a69
tree6f7d497284a8951b8681517f7866851b32a7b02e
parent8164f1b79731ad8ad9c713dc53d587a3b746f82f
TPROXY: implemented IP_RECVORIGDSTADDR socket option

In case UDP traffic is redirected to a local UDP socket,
the originally addressed destination address/port
cannot be recovered with the in-kernel tproxy.

This patch adds an IP_RECVORIGDSTADDR sockopt that enables
a IP_ORIGDSTADDR ancillary message in recvmsg(). This
ancillary message contains the original destination address/port
of the packet being received.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/in.h
net/ipv4/ip_sockglue.c