summaryrefslogtreecommitdiffstats
path: root/src/vcl/ldp.c
diff options
context:
space:
mode:
authorwanghanlin <wanghanlin@corp.netease.com>2021-02-22 10:38:36 +0800
committerFlorin Coras <florin.coras@gmail.com>2021-02-22 22:17:22 +0000
commit0674f85c803b59ada3643bfaeba1b321abeb5d6a (patch)
tree752a60c978b64e31647594b5c8d3f13090dc4129 /src/vcl/ldp.c
parentf86b967c368ed982ca439a96bab4604025345c00 (diff)
vcl: support sockopt of SO_REUSEPORT and SO_DOMAIN
Type: fix Signed-off-by: wanghanlin <wanghanlin@corp.netease.com> Change-Id: I800cfffb07bf7d4c4d1454b73febdba03f7d6b75
Diffstat (limited to 'src/vcl/ldp.c')
-rw-r--r--src/vcl/ldp.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/vcl/ldp.c b/src/vcl/ldp.c
index b72c0c54acd..a10d4d02fb4 100644
--- a/src/vcl/ldp.c
+++ b/src/vcl/ldp.c
@@ -1952,9 +1952,15 @@ getsockopt (int fd, int level, int optname,
case SO_REUSEADDR:
rv = vls_attr (vlsh, VPPCOM_ATTR_GET_REUSEADDR, optval, optlen);
break;
+ case SO_REUSEPORT:
+ rv = vls_attr (vlsh, VPPCOM_ATTR_GET_REUSEPORT, optval, optlen);
+ break;
case SO_BROADCAST:
rv = vls_attr (vlsh, VPPCOM_ATTR_GET_BROADCAST, optval, optlen);
break;
+ case SO_DOMAIN:
+ rv = vls_attr (vlsh, VPPCOM_ATTR_GET_DOMAIN, optval, optlen);
+ break;
case SO_ERROR:
rv = vls_attr (vlsh, VPPCOM_ATTR_GET_ERROR, optval, optlen);
break;
@@ -2053,6 +2059,10 @@ setsockopt (int fd, int level, int optname,
rv = vls_attr (vlsh, VPPCOM_ATTR_SET_REUSEADDR,
(void *) optval, &optlen);
break;
+ case SO_REUSEPORT:
+ rv = vls_attr (vlsh, VPPCOM_ATTR_SET_REUSEPORT, (void *) optval,
+ &optlen);
+ break;
case SO_BROADCAST:
rv = vls_attr (vlsh, VPPCOM_ATTR_SET_BROADCAST,
(void *) optval, &optlen);