aboutsummaryrefslogtreecommitdiff
path: root/slirp/ip_icmp.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2018-11-22 02:06:39 +0400
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2019-01-14 00:44:29 +0100
commiteb0b159614a09948107cfb31e2761709ba039835 (patch)
tree879c2918cc7c6679298de5035caeece676120de6 /slirp/ip_icmp.c
parent3402618c3a802650bac70d63c1b3be8dd5039a9f (diff)
slirp: remove remaining DEBUG blocks
Instead, rely on slirp_debug flags, or compile unconditionally (the substraction in cksum is unlikely to affect any benchmark result). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'slirp/ip_icmp.c')
-rw-r--r--slirp/ip_icmp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/slirp/ip_icmp.c b/slirp/ip_icmp.c
index 6c7e375ff8..cd2faeacb6 100644
--- a/slirp/ip_icmp.c
+++ b/slirp/ip_icmp.c
@@ -257,13 +257,12 @@ icmp_send_error(struct mbuf *msrc, u_char type, u_char code, int minsize,
/* check msrc */
if(!msrc) goto end_error;
ip = mtod(msrc, struct ip *);
-#ifdef DEBUG
- { char bufa[20], bufb[20];
+ if (slirp_debug & DBG_MISC) {
+ char bufa[20], bufb[20];
strcpy(bufa, inet_ntoa(ip->ip_src));
strcpy(bufb, inet_ntoa(ip->ip_dst));
DEBUG_MISC(" %.16s to %.16s\n", bufa, bufb);
}
-#endif
if(ip->ip_off & IP_OFFMASK) goto end_error; /* Only reply to fragment 0 */
/* Do not reply to source-only IPs */