mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-17 21:26:13 -07:00
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 allow ping for the users group (GID 100): echo 100 100 > /proc/sys/net/ipv4/ping_group_range Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
565465fcae
commit
e6d43cfb1f
7 changed files with 147 additions and 1 deletions
|
|
@ -71,6 +71,8 @@ sofree(struct socket *so)
|
|||
slirp->tcp_last_so = &slirp->tcb;
|
||||
} else if (so == slirp->udp_last_so) {
|
||||
slirp->udp_last_so = &slirp->udb;
|
||||
} else if (so == slirp->icmp_last_so) {
|
||||
slirp->icmp_last_so = &slirp->icmp;
|
||||
}
|
||||
m_free(so->so_m);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue