ZDR: New builtin replacement for RPC/XDR called ZDR
[deb_libnfs.git] / examples / nfsclient-bcast.c
index 89b1376aae9c9dcb1026202e732c680133ad42b3..e73cfaff98d92fdb2d257f8e2ed4aa904385e886 100644 (file)
@@ -30,6 +30,7 @@
 #include <sys/time.h>
 #include <net/if.h>
 #include <netdb.h>
+#include "libnfs-zdr.h"
 #include "libnfs.h"
 #include "libnfs-raw.h"
 #include "libnfs-private.h"
@@ -128,7 +129,7 @@ int main(int argc _U_, char *argv[] _U_)
        ifc.ifc_buf = NULL;
        ifc.ifc_len = size;
 
-       while (ifc.ifc_len == size) {
+       while(ifc.ifc_len > (size - sizeof(struct ifreq))) {
                size *= 2;
 
                free(ifc.ifc_buf);