Changeset 51690 in vbox for trunk/src/VBox/NetworkServices
- Timestamp:
- Jun 23, 2014 2:58:11 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 94469
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/NetworkServices/NAT/pxping.c
r51684 r51690 1112 1112 struct ip_hdr *iph; 1113 1113 struct icmp_echo_hdr *icmph; 1114 u16_t iplen ;1114 u16_t iplen, ipoff; 1115 1115 1116 1116 memset(&sin, 0, sizeof(sin)); … … 1142 1142 1143 1143 /* no fragmentation */ 1144 if ((IPH_OFFSET(iph) & PP_HTONS(IP_OFFMASK | IP_MF)) != 0) { 1145 DPRINTF2(("%s: dropping fragmented datagram\n", __func__)); 1144 ipoff = IPH_OFFSET(iph); 1145 #if defined(RT_OS_DARWIN) 1146 /* darwin reports IPH_OFFSET in host byte order */ 1147 ipoff = htons(ipoff); 1148 IPH_OFFSET_SET(iph, ipoff); 1149 #endif 1150 if ((ipoff & PP_HTONS(IP_OFFMASK | IP_MF)) != 0) { 1151 DPRINTF2(("%s: dropping fragmented datagram (0x%04x)\n", 1152 __func__, ntohs(IPH_OFFSET(iph)))); 1146 1153 return; 1147 1154 } … … 1167 1174 /* darwin and solaris change IPH_LEN to payload length only */ 1168 1175 iplen += IP_HLEN; /* we verified there are no options */ 1169 IPH_LEN (iph) = htons(iplen);1176 IPH_LEN_SET(iph, htons(iplen)); 1170 1177 #endif 1171 1178 if (nread < iplen) {
Note:
See TracChangeset
for help on using the changeset viewer.