From ffe02f5585d3fd722f9eb0ecdce6f128444c63d1 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Fri, 1 Apr 2016 00:46:35 +0200 Subject: slirp: Mark pieces missing IPv6 support Signed-off-by: Samuel Thibault --- net/slirp.c | 1 + slirp/misc.c | 3 +++ slirp/slirp.c | 5 +++++ slirp/socket.c | 1 + slirp/tcp_input.c | 2 ++ slirp/tcp_subr.c | 2 ++ slirp/udp.c | 1 + 7 files changed, 15 insertions(+) diff --git a/net/slirp.c b/net/slirp.c index 4ec989b592..a8fd9e6364 100644 --- a/net/slirp.c +++ b/net/slirp.c @@ -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; diff --git a/slirp/misc.c b/slirp/misc.c index d9fc586a24..937a418d4e 100644 --- a/slirp/misc.c +++ b/slirp/misc.c @@ -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"; diff --git a/slirp/slirp.c b/slirp/slirp.c index 55591430dc..cbdf9f778d 100644 --- a/slirp/slirp.c +++ b/slirp/slirp.c @@ -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) { diff --git a/slirp/socket.c b/slirp/socket.c index 4dc5e2907d..f2428a3ae8 100644 --- a/slirp/socket.c +++ b/slirp/socket.c @@ -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; diff --git a/slirp/tcp_input.c b/slirp/tcp_input.c index 6749b32f5d..b10477fc57 100644 --- a/slirp/tcp_input.c +++ b/slirp/tcp_input.c @@ -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) { diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c index 1d7e72dca7..1db59caa89 100644 --- a/slirp/tcp_subr.c +++ b/slirp/tcp_subr.c @@ -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) { diff --git a/slirp/udp.c b/slirp/udp.c index 3d9a19b85a..fa9f4a08bd 100644 --- a/slirp/udp.c +++ b/slirp/udp.c @@ -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); -- cgit v1.2.3