aboutsummaryrefslogtreecommitdiff
path: root/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
commit8a21a4aabf12e599098e33a46204323098fd3f12 (patch)
treeb2bc89bd6143c5405210a335203bbd93900458d1 /ip_input.c
parent647beeab660bed4b2562eb217c4384e6a68c7924 (diff)
downloadslirp-8a21a4aabf12e599098e33a46204323098fd3f12.zip
slirp-8a21a4aabf12e599098e33a46204323098fd3f12.tar.gz
slirp-8a21a4aabf12e599098e33a46204323098fd3f12.tar.bz2
slirp: Allow disabling IPv4 or IPv6v2.6.0-rc1
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 'ip_input.c')
-rw-r--r--ip_input.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ip_input.c b/ip_input.c
index 7326092..cc6de45 100644
--- a/ip_input.c
+++ b/ip_input.c
@@ -77,6 +77,10 @@ void 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);