aboutsummaryrefslogtreecommitdiff
path: root/slirp/ip_input.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-03-20 12:29:54 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-04-01 17:51:55 +0200
commit0b11c036620251f8f831ab8f0d9a7280ec1c4813 (patch)
treec8f390cd7e7cc6986b6a5febcdcaf5c99bc6012f /slirp/ip_input.c
parentde1d099a448beb2ec39af4bd9ce4dd6452a18cb5 (diff)
slirp: Allow disabling IPv4 or IPv6
Add ipv4 and ipv6 boolean options, so the user can setup IPv4-only and IPv6-only network environments. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'slirp/ip_input.c')
-rw-r--r--slirp/ip_input.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/slirp/ip_input.c b/slirp/ip_input.c
index b464f6baf0..cdd54833a3 100644
--- a/slirp/ip_input.c
+++ b/slirp/ip_input.c
@@ -80,6 +80,10 @@ ip_input(struct mbuf *m)
register struct ip *ip;
int hlen;
+ if (!slirp->in_enabled) {
+ goto bad;
+ }
+
DEBUG_CALL("ip_input");
DEBUG_ARG("m = %p", m);
DEBUG_ARG("m_len = %d", m->m_len);