aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2021-06-07 00:04:23 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2021-06-07 00:04:25 +0200
commit3704690e191df79818a38da964cb673a802b8e9e (patch)
treec96802027f20e1a73f00894f8a004a548fb5c542
parent8c621ee887b41f1815f435491fd7bea63c2b8d6c (diff)
downloadslirp-3704690e191df79818a38da964cb673a802b8e9e.zip
slirp-3704690e191df79818a38da964cb673a802b8e9e.tar.gz
slirp-3704690e191df79818a38da964cb673a802b8e9e.tar.bz2
icmp: Document the use of UDP echo service
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
-rw-r--r--src/ip_icmp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ip_icmp.c b/src/ip_icmp.c
index 5ffadd6..9917f36 100644
--- a/src/ip_icmp.c
+++ b/src/ip_icmp.c
@@ -185,8 +185,13 @@ void icmp_input(struct mbuf *m, int hlen)
so = socreate(slirp);
if (icmp_send(so, m, hlen) == 0) {
+ /* We could send this as ICMP, good! */
return;
}
+
+ /* We could not send this as ICMP, try to send it on UDP echo
+ * service (7), wishfully hoping that it is open there. */
+
if (udp_attach(so, AF_INET) == -1) {
DEBUG_MISC("icmp_input udp_attach errno = %d-%s", errno,
strerror(errno));