From c64ed0cc03ec15c044ca2bb4ed23ab18bc84125b Mon Sep 17 00:00:00 2001 From: "chao.an" Date: Mon, 8 Jun 2020 15:30:14 +0800 Subject: [PATCH] igmp: bypass MULTICAST_LOOP/TTL options Signed-off-by: chao.an Change-Id: I4c8064283327b04ece2037419e2693e8ae3abaab --- net/inet/ipv4_setsockopt.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/net/inet/ipv4_setsockopt.c b/net/inet/ipv4_setsockopt.c index e1e21eb7ac7..5dc1f8b5022 100644 --- a/net/inet/ipv4_setsockopt.c +++ b/net/inet/ipv4_setsockopt.c @@ -183,17 +183,21 @@ int ipv4_setsockopt(FAR struct socket *psock, int option, } } break; - - /* The following IPv4 socket options are defined, but not implemented */ - - case IP_MULTICAST_IF: /* Set local device for a multicast - * socket */ case IP_MULTICAST_TTL: /* Set/read the time-to-live value of * outgoing multicast packets */ case IP_MULTICAST_LOOP: /* Set/read boolean that determines * whether sent multicast packets * should be looped back to local * sockets. */ + { + ret = OK; + } + break; + + /* The following IPv4 socket options are defined, but not implemented */ + + case IP_MULTICAST_IF: /* Set local device for a multicast + * socket */ case IP_UNBLOCK_SOURCE: /* Unblock previously blocked multicast * source */ case IP_BLOCK_SOURCE: /* Stop receiving multicast data from