diff options
author | Balazs Scheidler <bazsi@balabit.hu> | 2008-11-16 22:32:39 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-16 22:32:39 -0500 |
commit | e8b2dfe9b4501ed0047459b2756ba26e5a940a69 (patch) | |
tree | 6f7d497284a8951b8681517f7866851b32a7b02e /include | |
parent | 8164f1b79731ad8ad9c713dc53d587a3b746f82f (diff) |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/in.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/in.h b/include/linux/in.h index db458beef19d..d60122a3a088 100644 --- a/include/linux/in.h +++ b/include/linux/in.h | |||
@@ -80,6 +80,10 @@ struct in_addr { | |||
80 | /* BSD compatibility */ | 80 | /* BSD compatibility */ |
81 | #define IP_RECVRETOPTS IP_RETOPTS | 81 | #define IP_RECVRETOPTS IP_RETOPTS |
82 | 82 | ||
83 | /* TProxy original addresses */ | ||
84 | #define IP_ORIGDSTADDR 20 | ||
85 | #define IP_RECVORIGDSTADDR IP_ORIGDSTADDR | ||
86 | |||
83 | /* IP_MTU_DISCOVER values */ | 87 | /* IP_MTU_DISCOVER values */ |
84 | #define IP_PMTUDISC_DONT 0 /* Never send DF frames */ | 88 | #define IP_PMTUDISC_DONT 0 /* Never send DF frames */ |
85 | #define IP_PMTUDISC_WANT 1 /* Use per route hints */ | 89 | #define IP_PMTUDISC_WANT 1 /* Use per route hints */ |