From 12b513d837c9da5277390ddaf98ca0058339977a Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Wed, 20 Jul 2011 12:20:13 +0200 Subject: 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 Signed-off-by: Jan Kiszka Signed-off-by: Anthony Liguori --- slirp/udp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'slirp/udp.c') diff --git a/slirp/udp.c b/slirp/udp.c index 02b3793..f1a9a10 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. */ -- cgit v1.1