Index: /trunk/src/VBox/NetworkServices/NAT/pxping.c
===================================================================
--- /trunk/src/VBox/NetworkServices/NAT/pxping.c	(revision 51689)
+++ /trunk/src/VBox/NetworkServices/NAT/pxping.c	(revision 51690)
@@ -1112,5 +1112,5 @@
     struct ip_hdr *iph;
     struct icmp_echo_hdr *icmph;
-    u16_t iplen;
+    u16_t iplen, ipoff;
 
     memset(&sin, 0, sizeof(sin));
@@ -1142,6 +1142,13 @@
 
     /* no fragmentation */
-    if ((IPH_OFFSET(iph) & PP_HTONS(IP_OFFMASK | IP_MF)) != 0) {
-        DPRINTF2(("%s: dropping fragmented datagram\n", __func__));
+    ipoff = IPH_OFFSET(iph);
+#if defined(RT_OS_DARWIN)
+    /* darwin reports IPH_OFFSET in host byte order */
+    ipoff = htons(ipoff);
+    IPH_OFFSET_SET(iph, ipoff);
+#endif
+    if ((ipoff & PP_HTONS(IP_OFFMASK | IP_MF)) != 0) {
+        DPRINTF2(("%s: dropping fragmented datagram (0x%04x)\n",
+                  __func__, ntohs(IPH_OFFSET(iph))));
         return;
     }
@@ -1167,5 +1174,5 @@
     /* darwin and solaris change IPH_LEN to payload length only */
     iplen += IP_HLEN;           /* we verified there are no options */
-    IPH_LEN(iph) = htons(iplen);
+    IPH_LEN_SET(iph, htons(iplen));
 #endif
     if (nread < iplen) {
