You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/12/05 08:30:23 UTC

[GitHub] [incubator-nuttx] btashton commented on a change in pull request #2415: net/igmp: add MULTICAST_TTL support

btashton commented on a change in pull request #2415:
URL: https://github.com/apache/incubator-nuttx/pull/2415#discussion_r536557076



##########
File path: net/inet/ipv4_setsockopt.c
##########
@@ -184,16 +189,41 @@ 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 */
+        {
+          if (psock->s_type != SOCK_DGRAM ||
+              value_len != sizeof(int))

Review comment:
       This is not correct.  I should be able to use `unsigned char ttl;` as the input to set the ttl.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org