<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div>Hi,<br><br></div>using
 the nfs-kernel-server package on openwrt x86_64 machine seems to throw a
 bug in the rpc.mountd: it crashes when a client try to make a remote 
mount.<br><br></div>I discovered a sort of bug by the combination of uclibc and nfs-utils.<br><br></div>There is also a thread to this page that explain it <a href="https://bugs.alpinelinux.org/issues/1486" target="_blank">https://bugs.alpinelinux.org/issues/1486</a>.<br><br></div>I tried to patch the code as suggested there and it works correctly!<br><br></div>Please find attached a patch with the change.<br><br></div>I made it against the trunk<br><br></div>Hope to see it committed upstream.<br></div><br></div><div>Signed-off-by: Giuseppe Magnotta <<a href="mailto:giuseppe.magnotta@gmail.com">giuseppe.magnotta@gmail.com</a>><br></div><div><br><br></div>Thank you<br><br></div>Best regards,<br></div>Giuseppe<br><br>--- a/support/export/hostname.c<br>+++ b/support/export/hostname.c<br>@@ -101,6 +101,7 @@<br>         .ai_protocol    = (int)IPPROTO_UDP,<br>         .ai_flags    = AI_NUMERICHOST,<br>         .ai_family    = AF_UNSPEC,<br>+        .ai_socktype    = 0,<br>     };<br>     struct sockaddr_in sin;<br>     int error, inet4;<br>@@ -351,6 +352,7 @@<br>     /*<br>      * getaddrinfo(AI_NUMERICHOST) never fills in ai_canonname<br>      */<br>+#ifndef __UCLIBC__<br>     if (ai != NULL) {<br>         free(ai->ai_canonname);        /* just in case */<br>         ai->ai_canonname = strdup(buf);<br>@@ -359,6 +361,7 @@<br>             ai = NULL;<br>         }<br>     }<br>+#endif<br> <br>     return ai;<br> }<br>@@ -384,7 +387,9 @@<br> <br>     /*<br>      * getaddrinfo(AI_NUMERICHOST) never fills in ai_canonname<br>+     * ...well, it does on uclibc.<br>      */<br>+#ifndef __UCLIBC__<br>     if (ai != NULL) {<br>         ai->ai_canonname = strdup(buf);<br>         if (ai->ai_canonname == NULL) {<br>@@ -392,6 +397,7 @@<br>             ai = NULL;<br>         }<br>     }<br>+#endif<br> <br>     return ai;<br> }<br></div>