Statistics
| Branch: | Revision:

root / slirp / ip_input.c @ 1a0ca1e1

History | View | Annotate | Download (16.4 kB)

# Date Author Comment
cf2846b5 07/27/2011 12:10 pm Stefan Weil

slirp: Fix unusual "comments" in unused code

cppcheck detected two rather strange comments which were not
correctly written as C comments.

They did not cause any harm because they were framed by
#ifdef notdef ... #endif, so they were never compiled.

Fix them nevertheless (we could also remove the unused code)....

e6d43cfb 07/23/2011 06:19 pm Jan Kiszka

slirp: Forward ICMP echo requests via unprivileged sockets

Linux 3.0 gained support for unprivileged ICMP ping sockets. Use this
feature to forward guest pings to the outer world. The host admin has to
set the ping_group_range in order to grant access to those sockets. To...

12b513d8 07/23/2011 06:19 pm Jan Kiszka

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....

3acccfc6 07/23/2011 06:19 pm Jan Kiszka

slirp: Replace m_freem with m_free

Remove this pointless wrapping.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

0d491754 09/17/2010 01:46 pm Hervé Poussineau

Accept packets with TTL=1

Packets with TTL=1 may be directed to local network (DHCP/DNS servers for example), so don't discard them
This is required by old versions of NetBSD which send DHCP DISCOVER packets with TTL=1

Signed-off-by: Hervé Poussineau <>...

b6dce92e 07/25/2010 05:59 pm Stefan Weil

slirp: Replace u_int8_t, u_int16_t, u_int32_t, u_int64_t by standard int types

There is no need to have a second set of integral types.
Replace them by the standard types from stdint.h.

Signed-off-by: Stefan Weil <>
Signed-off-by: Aurelien Jarno <>

65528b19 09/30/2009 09:56 pm Michael S. Tsirkin

slirp: fix unmatched bracket in if 0

Fix unmatched bracket in commented out code

Signed-off-by: Michael S. Tsirkin <>
Signed-off-by: Blue Swirl <>

460fec67 06/29/2009 04:52 pm Jan Kiszka

slirp: Factor out internal state structure

The essence of this patch is to stuff (almost) all global variables of
the slirp stack into the structure Slirp. In this step, we still keep
the structure as global variable, directly accessible by the whole
stack. Changes to the external interface of slirp will be applied in...

285f7a62 06/29/2009 04:52 pm Jan Kiszka

slirp: Make IP packet ID consistent

Currently, ip_id is always initialized to 0 on slirp startup (despite
the broken attempt to derive it from the clock). This is good for
reproducibility. But it is not preserved across save/restore. This patch
therefore drops the dead initialization code from ip_init and introduces...

0d62c4cf 06/29/2009 04:52 pm Jan Kiszka

slirp: Drop dead code

After all its years inside the qemu tree, there is no point in keeping
the dead code paths of slirp. This patch is a first round of removing
usually commented out code parts. More cleanups need to follow (and
maybe finally a proper reindention)....

0fe6a7f2 06/29/2009 04:52 pm Jan Kiszka

slirp: Drop statistic code

As agreed on the mailing list, there is no interest in keeping the
usually disabled slirp statistics in the tree. So this patch removes
them.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

a13a4126 06/29/2009 04:52 pm Jan Kiszka

slirp: Rework internal configuration

The user mode IP stack is currently only minimally configurable /wrt to
its virtual IP addresses. This is unfortunate if some guest has a fixed
idea of which IP addresses to use.

Therefore this patch prepares the stack for fully configurable IP...

511d2b14 03/07/2009 05:32 pm blueswir1

Sparse fixes: NULL use, header order, ANSI prototypes, static

Fix Sparse warnings: * use NULL instead of plain 0 * rearrange header include order to avoid redefining types accidentally * ANSIfy SLIRP * avoid "restrict" keyword * add static

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6736 c046a42c-6fe2-441c-8c8c-71466251a162

f2ba730e 02/06/2009 11:37 pm blueswir1

Fix SIGSEGV crash in slirp networking code

Fix SIGSEGV crash in networking code (bug was introduced in r6288).
Thanks to Gleb Natapov for finding this fix.

Signed-off-by: Stefan Weil <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6545 c046a42c-6fe2-441c-8c8c-71466251a162

2f5f8996 01/26/2009 09:37 pm aliguori

Remove the advertising clause from the slirp license

According to the FSF, the 4-clause BSD license, which slirp is covered under,
is not compatible with the GPL or LGPL1.

[1] http://www.fsf.org/licensing/licenses/index_html#GPLIncompatibleLicenses

There are three declared copyright holders in slirp that use the 4-clause...

429d0a3d 01/13/2009 09:48 pm blueswir1

Fix 64 bit issue in slirp

Signed-off-by: Gleb Natapov <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6288 c046a42c-6fe2-441c-8c8c-71466251a162

a9ba3a85 01/08/2009 09:24 pm aliguori

Add slirp_restrict option (Gleb Natapov)

Add "slirp firewall" to permit connection only to vmchannel addresses.

Signed-off-by: Gleb Natapov <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6241 c046a42c-6fe2-441c-8c8c-71466251a162

9634d903 10/26/2007 10:01 pm blueswir1

Use const and static as needed, disable unused code

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3452 c046a42c-6fe2-441c-8c8c-71466251a162

31a60e22 10/26/2007 09:42 pm blueswir1

Make Slirp statistics gathering and output conditional to LOG_ENABLED
Add 'info slirp' command to monitor to display statistics
Disable Slirp debugging code by default

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3451 c046a42c-6fe2-441c-8c8c-71466251a162

5fafdf24 09/17/2007 12:08 am ths

find -type f | xargs sed -i 's/[\t ]$//g' # on most files

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162

fedc54ad 05/01/2006 02:02 pm bellard

fixed IP packet rassembly logic (Ed Swierk)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1880 c046a42c-6fe2-441c-8c8c-71466251a162

f0cbd3ec 04/22/2004 03:10 am bellard

initial user mode network support

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@733 c046a42c-6fe2-441c-8c8c-71466251a162