slirp: Mark pieces missing IPv6 support
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
This commit is contained in:
parent
1fd71067da
commit
ffe02f5585
@ -885,6 +885,7 @@ static ssize_t guestfwd_write(const void *buf, size_t len, void *chr)
|
||||
|
||||
static int slirp_guestfwd(SlirpState *s, const char *config_str, Error **errp)
|
||||
{
|
||||
/* TODO: IPv6 */
|
||||
struct in_addr server = { .s_addr = 0 };
|
||||
struct GuestFwd *fwd;
|
||||
const char *p;
|
||||
|
@ -28,6 +28,7 @@ remque(void *a)
|
||||
element->qh_rlink = NULL;
|
||||
}
|
||||
|
||||
/* TODO: IPv6 */
|
||||
struct gfwd_list *
|
||||
add_guestfwd(struct gfwd_list **ex_ptr,
|
||||
SlirpWriteCb write_cb, void *opaque,
|
||||
@ -254,6 +255,8 @@ char *slirp_connection_info(Slirp *slirp)
|
||||
" Protocol[State] FD Source Address Port "
|
||||
"Dest. Address Port RecvQ SendQ\n");
|
||||
|
||||
/* TODO: IPv6 */
|
||||
|
||||
for (so = slirp->tcb.so_next; so != &slirp->tcb; so = so->so_next) {
|
||||
if (so->so_state & SS_HOSTFWD) {
|
||||
state = "HOST_FORWARD";
|
||||
|
@ -729,6 +729,7 @@ static void arp_input(Slirp *slirp, const uint8_t *pkt, int pkt_len)
|
||||
if (ah->ar_tip == slirp->vnameserver_addr.s_addr ||
|
||||
ah->ar_tip == slirp->vhost_addr.s_addr)
|
||||
goto arp_ok;
|
||||
/* TODO: IPv6 */
|
||||
for (ex_ptr = slirp->guestfwd_list; ex_ptr; ex_ptr = ex_ptr->ex_next) {
|
||||
if (ex_ptr->ex_addr.s_addr == ah->ar_tip)
|
||||
goto arp_ok;
|
||||
@ -945,6 +946,7 @@ int if_encap(Slirp *slirp, struct mbuf *ifm)
|
||||
}
|
||||
|
||||
/* Drop host forwarding rule, return 0 if found. */
|
||||
/* TODO: IPv6 */
|
||||
int slirp_remove_hostfwd(Slirp *slirp, int is_udp, struct in_addr host_addr,
|
||||
int host_port)
|
||||
{
|
||||
@ -970,6 +972,7 @@ int slirp_remove_hostfwd(Slirp *slirp, int is_udp, struct in_addr host_addr,
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* TODO: IPv6 */
|
||||
int slirp_add_hostfwd(Slirp *slirp, int is_udp, struct in_addr host_addr,
|
||||
int host_port, struct in_addr guest_addr, int guest_port)
|
||||
{
|
||||
@ -988,6 +991,7 @@ int slirp_add_hostfwd(Slirp *slirp, int is_udp, struct in_addr host_addr,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* TODO: IPv6 */
|
||||
static bool
|
||||
check_guestfwd(Slirp *slirp, struct in_addr *guest_addr, int guest_port)
|
||||
{
|
||||
@ -1065,6 +1069,7 @@ slirp_find_ctl_socket(Slirp *slirp, struct in_addr guest_addr, int guest_port)
|
||||
{
|
||||
struct socket *so;
|
||||
|
||||
/* TODO: IPv6 */
|
||||
for (so = slirp->tcb.so_next; so != &slirp->tcb; so = so->so_next) {
|
||||
if (so->so_faddr.s_addr == guest_addr.s_addr &&
|
||||
htons(so->so_fport) == guest_port) {
|
||||
|
@ -687,6 +687,7 @@ struct socket *
|
||||
tcp_listen(Slirp *slirp, uint32_t haddr, unsigned hport, uint32_t laddr,
|
||||
unsigned lport, int flags)
|
||||
{
|
||||
/* TODO: IPv6 */
|
||||
struct sockaddr_in addr;
|
||||
struct socket *so;
|
||||
int s, opt = 1;
|
||||
|
@ -388,6 +388,7 @@ findso:
|
||||
* as if it was LISTENING, and continue...
|
||||
*/
|
||||
if (so == NULL) {
|
||||
/* TODO: IPv6 */
|
||||
if (slirp->restricted) {
|
||||
/* Any hostfwds will have an existing socket, so we only get here
|
||||
* for non-hostfwd connections. These should be dropped, unless it
|
||||
@ -609,6 +610,7 @@ findso:
|
||||
* If this is destined for the control address, then flag to
|
||||
* tcp_ctl once connected, otherwise connect
|
||||
*/
|
||||
/* TODO: IPv6 */
|
||||
if (af == AF_INET &&
|
||||
(so->so_faddr.s_addr & slirp->vnetwork_mask.s_addr) ==
|
||||
slirp->vnetwork_addr.s_addr) {
|
||||
|
@ -626,6 +626,7 @@ tcp_emu(struct socket *so, struct mbuf *m)
|
||||
switch(so->so_emu) {
|
||||
int x, i;
|
||||
|
||||
/* TODO: IPv6 */
|
||||
case EMU_IDENT:
|
||||
/*
|
||||
* Identification protocol as per rfc-1413
|
||||
@ -964,6 +965,7 @@ int tcp_ctl(struct socket *so)
|
||||
DEBUG_CALL("tcp_ctl");
|
||||
DEBUG_ARG("so = %p", so);
|
||||
|
||||
/* TODO: IPv6 */
|
||||
if (so->so_faddr.s_addr != slirp->vhost_addr.s_addr) {
|
||||
/* Check if it's pty_exec */
|
||||
for (ex_ptr = slirp->guestfwd_list; ex_ptr; ex_ptr = ex_ptr->ex_next) {
|
||||
|
@ -322,6 +322,7 @@ struct socket *
|
||||
udp_listen(Slirp *slirp, uint32_t haddr, unsigned hport, uint32_t laddr,
|
||||
unsigned lport, int flags)
|
||||
{
|
||||
/* TODO: IPv6 */
|
||||
struct sockaddr_in addr;
|
||||
struct socket *so;
|
||||
socklen_t addrlen = sizeof(struct sockaddr_in);
|
||||
|
Loading…
Reference in New Issue
Block a user