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 2021/04/22 18:55:14 UTC

[GitHub] [incubator-nuttx-apps] antmerlino opened a new pull request #691: addroute: inet_pton cannot accept slash notation.

antmerlino opened a new pull request #691:
URL: https://github.com/apache/incubator-nuttx-apps/pull/691


   ## Summary
   addroute: inet_pton cannot accept slash notation.  We must fixup the argument before calling.
   
   ## Impact
   Fix addroute for cases using slash notation.
   
   ## Testing
   Built and ran configuration.
   
   


-- 
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



[GitHub] [incubator-nuttx-apps] xiaoxiang781216 merged pull request #691: addroute: inet_pton cannot accept slash notation.

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #691:
URL: https://github.com/apache/incubator-nuttx-apps/pull/691


   


-- 
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



[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #691: addroute: inet_pton cannot accept slash notation.

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #691:
URL: https://github.com/apache/incubator-nuttx-apps/pull/691#discussion_r618904132



##########
File path: nshlib/nsh_routecmds.c
##########
@@ -236,6 +236,17 @@ int cmd_addroute(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
       goto errout;
     }
 
+  /* We need to remove the slash notation before passing it to inet_pton */
+
+  if (shift > 0)
+    {
+      sptr = strchr(argv[1], '/');

Review comment:
       @antmerlino sptr isn't defined in this function.




-- 
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