diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-03-20 12:29:54 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-04-01 17:51:55 +0200 |
commit | 0b11c036620251f8f831ab8f0d9a7280ec1c4813 (patch) | |
tree | c8f390cd7e7cc6986b6a5febcdcaf5c99bc6012f /slirp/ip6_input.c | |
parent | de1d099a448beb2ec39af4bd9ce4dd6452a18cb5 (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/ip6_input.c')
-rw-r--r-- | slirp/ip6_input.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/slirp/ip6_input.c b/slirp/ip6_input.c index c0b11e73cd..ac2e3ea882 100644 --- a/slirp/ip6_input.c +++ b/slirp/ip6_input.c @@ -24,6 +24,11 @@ void ip6_cleanup(Slirp *slirp) void ip6_input(struct mbuf *m) { struct ip6 *ip6; + Slirp *slirp = m->slirp; + + if (!slirp->in6_enabled) { + goto bad; + } DEBUG_CALL("ip6_input"); DEBUG_ARG("m = %lx", (long)m); |