- Timestamp:
- Nov 21, 2013 3:52:15 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/NetworkServices/NAT/pxping.c
r49607 r49609 232 232 g_pxping.sock4 = sock4; 233 233 if (g_pxping.sock4 != INVALID_SOCKET) { 234 #ifdef ICMP_FILTER235 struct icmp_filter flt = { ~(uint32_t)(1U << ICMP_ECHOREPLY) };236 237 status = setsockopt(icmpsock4, IPPROTO_ICMP, ICMP_FILTER,238 &flt, sizeof(flt));239 if (status < 0) {240 perror("ICMP_FILTER");241 }242 #endif /* ICMP_FILTER */243 244 234 g_pxping.ttl = -1; 245 235 g_pxping.tos = 0; … … 255 245 g_pxping.sock6 = sock6; 256 246 if (g_pxping.sock6 != INVALID_SOCKET) { 257 #ifdef ICMP6_FILTER258 struct icmp6_filter flt;259 ICMP6_FILTER_SETBLOCKALL(&flt);260 261 ICMP6_FILTER_SETPASS(ICMP6_ECHO_REPLY, &flt);262 263 ICMP6_FILTER_SETPASS(ICMP6_DST_UNREACH, &flt);264 ICMP6_FILTER_SETPASS(ICMP6_PACKET_TOO_BIG, &flt);265 ICMP6_FILTER_SETPASS(ICMP6_TIME_EXCEEDED, &flt);266 ICMP6_FILTER_SETPASS(ICMP6_PARAM_PROB, &flt);267 268 status = setsockopt(icmpsock6, IPPROTO_ICMPV6, ICMP6_FILTER,269 &flt, sizeof(flt));270 if (status < 0) {271 perror("ICMP6_FILTER");272 }273 #endif /* ICMP6_FILTER */274 275 247 g_pxping.hopl = -1; 276 248
Note:
See TracChangeset
for help on using the changeset viewer.