aboutsummaryrefslogtreecommitdiff
path: root/slirp/ip_icmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'slirp/ip_icmp.c')
-rw-r--r--slirp/ip_icmp.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/slirp/ip_icmp.c b/slirp/ip_icmp.c
index 8bc97a0..b67a373 100644
--- a/slirp/ip_icmp.c
+++ b/slirp/ip_icmp.c
@@ -114,8 +114,7 @@ icmp_input(m, hlen)
case ICMP_ECHO:
icp->icmp_type = ICMP_ECHOREPLY;
ip->ip_len += hlen; /* since ip_input subtracts this */
- if (ip->ip_dst.s_addr == our_addr.s_addr ||
- (ip->ip_dst.s_addr == (special_addr.s_addr|htonl(CTL_ALIAS))) ) {
+ if (ip->ip_dst.s_addr == alias_addr.s_addr) {
icmp_reflect(m);
} else {
struct socket *so;
@@ -161,7 +160,7 @@ icmp_input(m, hlen)
icmp_error(m, ICMP_UNREACH,ICMP_UNREACH_NET, 0,strerror(errno));
udp_detach(so);
}
- } /* if ip->ip_dst.s_addr == our_addr.s_addr */
+ } /* if ip->ip_dst.s_addr == alias_addr.s_addr */
break;
case ICMP_UNREACH:
/* XXX? report error? close socket? */
@@ -311,7 +310,7 @@ icmp_error(msrc, type, code, minsize, message)
ip->ip_ttl = MAXTTL;
ip->ip_p = IPPROTO_ICMP;
ip->ip_dst = ip->ip_src; /* ip adresses */
- ip->ip_src = our_addr;
+ ip->ip_src = alias_addr;
(void ) ip_output((struct socket *)NULL, m);