Changeset 15443 in vbox
- Timestamp:
- Dec 13, 2008 1:57:35 PM (16 years ago)
- Location:
- trunk/src/VBox/Devices/Network/slirp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/ip_icmp.c
r15407 r15443 278 278 int status; 279 279 uint32_t dst; 280 int ttl; 280 281 281 282 /* int code; */ … … 408 409 /* Send the packet */ 409 410 # ifndef RT_OS_WINDOWS 410 LogRel(("NAT/ICMP: try to set TTL(%d)\n", ip->ip_ttl)); 411 status = setsockopt(pData->icmp_socket.s, IPPROTO_IP, IP_TTL, (void *)&ip->ip_ttl, sizeof(ip->ip_ttl)); 411 ttl = ip->ip_ttl; 412 LogRel(("NAT/ICMP: try to set TTL(%d)\n", ttl)); 413 status = setsockopt(pData->icmp_socket.s, IPPROTO_IP, IP_TTL, (void *)&ttl, sizeof(ttl)); 412 414 if (status < 0) 413 415 { -
trunk/src/VBox/Devices/Network/slirp/udp.c
r15355 r15443 73 73 struct socket *so; 74 74 #ifdef VBOX_WITH_SLIRP_ICMP 75 int ret; 75 int ret; 76 int ttl; 76 77 #endif 77 78 … … 245 246 246 247 #ifdef VBOX_WITH_SLIRP_ICMP 247 ip->ip_ttl = save_ip.ip_ttl;248 ret = setsockopt(so->s, IPPROTO_IP, IP_TTL, (void *)&ip->ip_ttl, sizeof(ip->ip_ttl));248 ttl = ip->ip_ttl = save_ip.ip_ttl; 249 ret = setsockopt(so->s, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl)); 249 250 if (ret < 0) { 250 251 LogRel(("NAT: Error (%s) occurred while setting TTL(%d) attribute of IP packet to socket %R[natsock]\n", strerror(errno), ip->ip_ttl, so));
Note:
See TracChangeset
for help on using the changeset viewer.