diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2011-07-20 12:20:13 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-07-23 10:19:49 -0500 |
commit | 12b513d837c9da5277390ddaf98ca0058339977a (patch) | |
tree | 57d4e937818492effc1f31402dc830b1ca0b206c /slirp/udp.c | |
parent | 80f52a6694423da7a40e2ec39e14a5817184c7ef (diff) |
slirp: Fix restricted mode
This aligns the code to what the documentation claims: Allow everything
but requests that would have to be routed outside of the virtual LAN.
So we need to drop the unneeded IP-level filter, allow TFTP requests,
and add the missing protocol-level filter to ICMP.
CC: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'slirp/udp.c')
-rw-r--r-- | slirp/udp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/slirp/udp.c b/slirp/udp.c index 02b3793e9f..f1a9a10948 100644 --- a/slirp/udp.c +++ b/slirp/udp.c @@ -125,10 +125,6 @@ udp_input(register struct mbuf *m, int iphlen) goto bad; } - if (slirp->restricted) { - goto bad; - } - /* * handle TFTP */ @@ -137,6 +133,10 @@ udp_input(register struct mbuf *m, int iphlen) goto bad; } + if (slirp->restricted) { + goto bad; + } + /* * Locate pcb for datagram. */ |