summaryrefslogtreecommitdiffstats
path: root/src/vcl/ldp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vcl/ldp.c')
-rw-r--r--src/vcl/ldp.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/vcl/ldp.c b/src/vcl/ldp.c
index 2256a2b9061..a8062b4ca8d 100644
--- a/src/vcl/ldp.c
+++ b/src/vcl/ldp.c
@@ -67,6 +67,10 @@
#define UDP_SEGMENT 103
#endif
+#ifndef SO_ORIGINAL_DST
+/* from <linux/netfilter_ipv4.h> */
+#define SO_ORIGINAL_DST 80
+#endif
typedef struct ldp_worker_ctx_
{
u8 *io_buffer;
@@ -2043,6 +2047,21 @@ getsockopt (int fd, int level, int optname,
break;
}
break;
+ case SOL_IP:
+ switch (optname)
+ {
+ case SO_ORIGINAL_DST:
+ rv =
+ vls_attr (vlsh, VPPCOM_ATTR_GET_ORIGINAL_DST, optval, optlen);
+ break;
+ default:
+ LDBG (0,
+ "ERROR: fd %d: getsockopt SOL_IP: vlsh %u "
+ "optname %d unsupported!",
+ fd, vlsh, optname);
+ break;
+ }
+ break;
case SOL_IPV6:
switch (optname)
{