diff mbox series

[v3] linux-user: add missing MULTICAST_IF get/setsockopt option

Message ID 20210317011936.9707-1-jiaxun.yang@flygoat.com (mailing list archive)
State New, archived
Headers show
Series [v3] linux-user: add missing MULTICAST_IF get/setsockopt option | expand

Commit Message

Jiaxun Yang March 17, 2021, 1:19 a.m. UTC
{IP,IPV6}_MULTICAST_IF was not supported.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reported-by: Yunqiang Su <syq@debian.org>
---
v3: Add missing reported-by.
---
 linux-user/syscall.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 389ec09764..77343130b3 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -2219,6 +2219,7 @@  static abi_long do_setsockopt(int sockfd, int level, int optname,
 #ifdef IP_FREEBIND
         case IP_FREEBIND:
 #endif
+        case IP_MULTICAST_IF:
         case IP_MULTICAST_TTL:
         case IP_MULTICAST_LOOP:
             val = 0;
@@ -2265,6 +2266,7 @@  static abi_long do_setsockopt(int sockfd, int level, int optname,
         case IPV6_V6ONLY:
         case IPV6_RECVPKTINFO:
         case IPV6_UNICAST_HOPS:
+        case IPV6_MULTICAST_IF:
         case IPV6_MULTICAST_HOPS:
         case IPV6_MULTICAST_LOOP:
         case IPV6_RECVERR:
@@ -2891,6 +2893,7 @@  get_timeout:
 #ifdef IP_FREEBIND
         case IP_FREEBIND:
 #endif
+        case IP_MULTICAST_IF:
         case IP_MULTICAST_TTL:
         case IP_MULTICAST_LOOP:
             if (get_user_u32(len, optlen))
@@ -2926,6 +2929,7 @@  get_timeout:
         case IPV6_V6ONLY:
         case IPV6_RECVPKTINFO:
         case IPV6_UNICAST_HOPS:
+        case IPV6_MULTICAST_IF:
         case IPV6_MULTICAST_HOPS:
         case IPV6_MULTICAST_LOOP:
         case IPV6_RECVERR: