Changeset 14633 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Nov 26, 2008 12:17:39 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/ip_icmp.c
r14623 r14633 122 122 switch (icp->icmp_type) { 123 123 case ICMP_ECHO: 124 #ifndef VBOX_WITH_SLIRP_ICMP 124 125 icp->icmp_type = ICMP_ECHOREPLY; 126 #endif /* !VBOX_WITH_SLIRP_ICMP */ 125 127 ip->ip_len += hlen; /* since ip_input subtracts this */ 126 128 if (ip->ip_dst.s_addr == alias_addr.s_addr) { 129 #ifdef VBOX_WITH_SLIRP_ICMP 130 icp->icmp_type = ICMP_ECHOREPLY; 131 #endif /* VBOX_WITH_SLIRP_ICMP */ 127 132 icmp_reflect(pData, m); 128 133 } else { … … 131 136 if ((so = socreate()) == NULL) goto freeit; 132 137 #ifndef VBOX_WITH_SLIRP_ICMP 133 if(udp_attach(pData, so) == -1) {138 if(udp_attach(pData, so) == -1) 134 139 #else 135 if(icmp_attach(pData, so) == -1) {140 if(icmp_attach(pData, so) == -1) 136 141 #endif 142 { 137 143 DEBUG_MISC((dfd,"icmp_input udp_attach errno = %d-%s\n", 138 144 errno,strerror(errno))); … … 167 173 } 168 174 addr.sin_port = so->so_fport; 175 #ifndef VBOX_WITH_SLIRP_ICMP 169 176 if(sendto(so->s, icmp_ping_msg, strlen(icmp_ping_msg), 0, 170 177 (struct sockaddr *)&addr, sizeof(addr)) == -1) { … … 174 181 udp_detach(pData, so); 175 182 } 183 #else /* !VBOX_WITH_SLIRP_ICMP */ 184 if(sendto(so->s, icp, icmplen, 0, 185 (struct sockaddr *)&addr, sizeof(addr)) == -1) { 186 DEBUG_MISC((dfd,"icmp_input udp sendto tx errno = %d-%s\n", 187 errno,strerror(errno))); 188 icmp_error(pData, m, ICMP_UNREACH,ICMP_UNREACH_NET, 0,strerror(errno)); 189 } 190 191 #endif /* VBOX_WITH_SLIRP_ICMP */ 176 192 } /* if ip->ip_dst.s_addr == alias_addr.s_addr */ 177 193 break;
Note:
See TracChangeset
for help on using the changeset viewer.