int net_init_l2tpv3(const NetClientOptions *opts,

                    const char *name,

                    NetClientState *peer, Error **errp)

{

    /* FIXME error_setg(errp, ...) on failure */

    const NetdevL2TPv3Options *l2tpv3;

    NetL2TPV3State *s;

    NetClientState *nc;

    int fd = -1, gairet;

    struct addrinfo hints;

    struct addrinfo *result = NULL;

    char *srcport, *dstport;



    nc = qemu_new_net_client(&net_l2tpv3_info, peer, "l2tpv3", name);



    s = DO_UPCAST(NetL2TPV3State, nc, nc);



    s->queue_head = 0;

    s->queue_tail = 0;

    s->header_mismatch = false;



    assert(opts->type == NET_CLIENT_OPTIONS_KIND_L2TPV3);

    l2tpv3 = opts->u.l2tpv3;



    if (l2tpv3->has_ipv6 && l2tpv3->ipv6) {

        s->ipv6 = l2tpv3->ipv6;

    } else {

        s->ipv6 = false;

    }



    if ((l2tpv3->has_offset) && (l2tpv3->offset > 256)) {

        error_report("l2tpv3_open : offset must be less than 256 bytes");

        goto outerr;

    }



    if (l2tpv3->has_rxcookie || l2tpv3->has_txcookie) {

        if (l2tpv3->has_rxcookie && l2tpv3->has_txcookie) {

            s->cookie = true;

        } else {

            goto outerr;

        }

    } else {

        s->cookie = false;

    }



    if (l2tpv3->has_cookie64 || l2tpv3->cookie64) {

        s->cookie_is_64  = true;

    } else {

        s->cookie_is_64  = false;

    }



    if (l2tpv3->has_udp && l2tpv3->udp) {

        s->udp = true;

        if (!(l2tpv3->has_srcport && l2tpv3->has_dstport)) {

            error_report("l2tpv3_open : need both src and dst port for udp");

            goto outerr;

        } else {

            srcport = l2tpv3->srcport;

            dstport = l2tpv3->dstport;

        }

    } else {

        s->udp = false;

        srcport = NULL;

        dstport = NULL;

    }





    s->offset = 4;

    s->session_offset = 0;

    s->cookie_offset = 4;

    s->counter_offset = 4;



    s->tx_session = l2tpv3->txsession;

    if (l2tpv3->has_rxsession) {

        s->rx_session = l2tpv3->rxsession;

    } else {

        s->rx_session = s->tx_session;

    }



    if (s->cookie) {

        s->rx_cookie = l2tpv3->rxcookie;

        s->tx_cookie = l2tpv3->txcookie;

        if (s->cookie_is_64 == true) {

            /* 64 bit cookie */

            s->offset += 8;

            s->counter_offset += 8;

        } else {

            /* 32 bit cookie */

            s->offset += 4;

            s->counter_offset += 4;

        }

    }



    memset(&hints, 0, sizeof(hints));



    if (s->ipv6) {

        hints.ai_family = AF_INET6;

    } else {

        hints.ai_family = AF_INET;

    }

    if (s->udp) {

        hints.ai_socktype = SOCK_DGRAM;

        hints.ai_protocol = 0;

        s->offset += 4;

        s->counter_offset += 4;

        s->session_offset += 4;

        s->cookie_offset += 4;

    } else {

        hints.ai_socktype = SOCK_RAW;

        hints.ai_protocol = IPPROTO_L2TP;

    }



    gairet = getaddrinfo(l2tpv3->src, srcport, &hints, &result);



    if ((gairet != 0) || (result == NULL)) {

        error_report(

            "l2tpv3_open : could not resolve src, errno = %s",

            gai_strerror(gairet)

        );

        goto outerr;

    }

    fd = socket(result->ai_family, result->ai_socktype, result->ai_protocol);

    if (fd == -1) {

        fd = -errno;

        error_report("l2tpv3_open : socket creation failed, errno = %d", -fd);

        goto outerr;

    }

    if (bind(fd, (struct sockaddr *) result->ai_addr, result->ai_addrlen)) {

        error_report("l2tpv3_open :  could not bind socket err=%i", errno);

        goto outerr;

    }

    if (result) {

        freeaddrinfo(result);

    }



    memset(&hints, 0, sizeof(hints));



    if (s->ipv6) {

        hints.ai_family = AF_INET6;

    } else {

        hints.ai_family = AF_INET;

    }

    if (s->udp) {

        hints.ai_socktype = SOCK_DGRAM;

        hints.ai_protocol = 0;

    } else {

        hints.ai_socktype = SOCK_RAW;

        hints.ai_protocol = IPPROTO_L2TP;

    }



    result = NULL;

    gairet = getaddrinfo(l2tpv3->dst, dstport, &hints, &result);

    if ((gairet != 0) || (result == NULL)) {

        error_report(

            "l2tpv3_open : could not resolve dst, error = %s",

            gai_strerror(gairet)

        );

        goto outerr;

    }



    s->dgram_dst = g_new0(struct sockaddr_storage, 1);

    memcpy(s->dgram_dst, result->ai_addr, result->ai_addrlen);

    s->dst_size = result->ai_addrlen;



    if (result) {

        freeaddrinfo(result);

    }



    if (l2tpv3->has_counter && l2tpv3->counter) {

        s->has_counter = true;

        s->offset += 4;

    } else {

        s->has_counter = false;

    }



    if (l2tpv3->has_pincounter && l2tpv3->pincounter) {

        s->has_counter = true;  /* pin counter implies that there is counter */

        s->pin_counter = true;

    } else {

        s->pin_counter = false;

    }



    if (l2tpv3->has_offset) {

        /* extra offset */

        s->offset += l2tpv3->offset;

    }



    if ((s->ipv6) || (s->udp)) {

        s->header_size = s->offset;

    } else {

        s->header_size = s->offset + sizeof(struct iphdr);

    }



    s->msgvec = build_l2tpv3_vector(s, MAX_L2TPV3_MSGCNT);

    s->vec = g_new(struct iovec, MAX_L2TPV3_IOVCNT);

    s->header_buf = g_malloc(s->header_size);



    qemu_set_nonblock(fd);



    s->fd = fd;

    s->counter = 0;



    l2tpv3_read_poll(s, true);



    snprintf(s->nc.info_str, sizeof(s->nc.info_str),

             "l2tpv3: connected");

    return 0;

outerr:

    qemu_del_net_client(nc);

    if (fd >= 0) {

        close(fd);

    }

    if (result) {

        freeaddrinfo(result);

    }

    return -1;

}

int net_init_l2tpv3(const NetClientOptions *opts,

                    const char *name,

                    NetClientState *peer, Error **errp)

{

    

    const NetdevL2TPv3Options *l2tpv3;

    NetL2TPV3State *s;

    NetClientState *nc;

    int fd = -1, gairet;

    struct addrinfo hints;

    struct addrinfo *result = NULL;

    char *srcport, *dstport;



    nc = qemu_new_net_client(&net_l2tpv3_info, peer, "l2tpv3", name);



    s = DO_UPCAST(NetL2TPV3State, nc, nc);



    s->queue_head = 0;

    s->queue_tail = 0;

    s->header_mismatch = false;



    assert(opts->type == NET_CLIENT_OPTIONS_KIND_L2TPV3);

    l2tpv3 = opts->u.l2tpv3;



    if (l2tpv3->has_ipv6 && l2tpv3->ipv6) {

        s->ipv6 = l2tpv3->ipv6;

    } else {

        s->ipv6 = false;

    }



    if ((l2tpv3->has_offset) && (l2tpv3->offset > 256)) {

        error_report("l2tpv3_open : offset must be less than 256 bytes");

        goto outerr;

    }



    if (l2tpv3->has_rxcookie || l2tpv3->has_txcookie) {

        if (l2tpv3->has_rxcookie && l2tpv3->has_txcookie) {

            s->cookie = true;

        } else {

            goto outerr;

        }

    } else {

        s->cookie = false;

    }



    if (l2tpv3->has_cookie64 || l2tpv3->cookie64) {

        s->cookie_is_64  = true;

    } else {

        s->cookie_is_64  = false;

    }



    if (l2tpv3->has_udp && l2tpv3->udp) {

        s->udp = true;

        if (!(l2tpv3->has_srcport && l2tpv3->has_dstport)) {

            error_report("l2tpv3_open : need both src and dst port for udp");

            goto outerr;

        } else {

            srcport = l2tpv3->srcport;

            dstport = l2tpv3->dstport;

        }

    } else {

        s->udp = false;

        srcport = NULL;

        dstport = NULL;

    }





    s->offset = 4;

    s->session_offset = 0;

    s->cookie_offset = 4;

    s->counter_offset = 4;



    s->tx_session = l2tpv3->txsession;

    if (l2tpv3->has_rxsession) {

        s->rx_session = l2tpv3->rxsession;

    } else {

        s->rx_session = s->tx_session;

    }



    if (s->cookie) {

        s->rx_cookie = l2tpv3->rxcookie;

        s->tx_cookie = l2tpv3->txcookie;

        if (s->cookie_is_64 == true) {

            

            s->offset += 8;

            s->counter_offset += 8;

        } else {

            

            s->offset += 4;

            s->counter_offset += 4;

        }

    }



    memset(&hints, 0, sizeof(hints));



    if (s->ipv6) {

        hints.ai_family = AF_INET6;

    } else {

        hints.ai_family = AF_INET;

    }

    if (s->udp) {

        hints.ai_socktype = SOCK_DGRAM;

        hints.ai_protocol = 0;

        s->offset += 4;

        s->counter_offset += 4;

        s->session_offset += 4;

        s->cookie_offset += 4;

    } else {

        hints.ai_socktype = SOCK_RAW;

        hints.ai_protocol = IPPROTO_L2TP;

    }



    gairet = getaddrinfo(l2tpv3->src, srcport, &hints, &result);



    if ((gairet != 0) || (result == NULL)) {

        error_report(

            "l2tpv3_open : could not resolve src, errno = %s",

            gai_strerror(gairet)

        );

        goto outerr;

    }

    fd = socket(result->ai_family, result->ai_socktype, result->ai_protocol);

    if (fd == -1) {

        fd = -errno;

        error_report("l2tpv3_open : socket creation failed, errno = %d", -fd);

        goto outerr;

    }

    if (bind(fd, (struct sockaddr *) result->ai_addr, result->ai_addrlen)) {

        error_report("l2tpv3_open :  could not bind socket err=%i", errno);

        goto outerr;

    }

    if (result) {

        freeaddrinfo(result);

    }



    memset(&hints, 0, sizeof(hints));



    if (s->ipv6) {

        hints.ai_family = AF_INET6;

    } else {

        hints.ai_family = AF_INET;

    }

    if (s->udp) {

        hints.ai_socktype = SOCK_DGRAM;

        hints.ai_protocol = 0;

    } else {

        hints.ai_socktype = SOCK_RAW;

        hints.ai_protocol = IPPROTO_L2TP;

    }



    result = NULL;

    gairet = getaddrinfo(l2tpv3->dst, dstport, &hints, &result);

    if ((gairet != 0) || (result == NULL)) {

        error_report(

            "l2tpv3_open : could not resolve dst, error = %s",

            gai_strerror(gairet)

        );

        goto outerr;

    }



    s->dgram_dst = g_new0(struct sockaddr_storage, 1);

    memcpy(s->dgram_dst, result->ai_addr, result->ai_addrlen);

    s->dst_size = result->ai_addrlen;



    if (result) {

        freeaddrinfo(result);

    }



    if (l2tpv3->has_counter && l2tpv3->counter) {

        s->has_counter = true;

        s->offset += 4;

    } else {

        s->has_counter = false;

    }



    if (l2tpv3->has_pincounter && l2tpv3->pincounter) {

        s->has_counter = true;  

        s->pin_counter = true;

    } else {

        s->pin_counter = false;

    }



    if (l2tpv3->has_offset) {

        

        s->offset += l2tpv3->offset;

    }



    if ((s->ipv6) || (s->udp)) {

        s->header_size = s->offset;

    } else {

        s->header_size = s->offset + sizeof(struct iphdr);

    }



    s->msgvec = build_l2tpv3_vector(s, MAX_L2TPV3_MSGCNT);

    s->vec = g_new(struct iovec, MAX_L2TPV3_IOVCNT);

    s->header_buf = g_malloc(s->header_size);



    qemu_set_nonblock(fd);



    s->fd = fd;

    s->counter = 0;



    l2tpv3_read_poll(s, true);



    snprintf(s->nc.info_str, sizeof(s->nc.info_str),

             "l2tpv3: connected");

    return 0;

outerr:

    qemu_del_net_client(nc);

    if (fd >= 0) {

        close(fd);

    }

    if (result) {

        freeaddrinfo(result);

    }

    return -1;

}

int FUNC_0(const NetClientOptions *VAR_0,

                    const char *VAR_1,

                    NetClientState *VAR_2, Error **VAR_3)

{

    

    const NetdevL2TPv3Options *VAR_4;

    NetL2TPV3State *s;

    NetClientState *nc;

    int VAR_5 = -1, VAR_6;

    struct addrinfo VAR_7;

    struct addrinfo *VAR_8 = NULL;

    char *VAR_9, *VAR_10;



    nc = qemu_new_net_client(&net_l2tpv3_info, VAR_2, "VAR_4", VAR_1);



    s = DO_UPCAST(NetL2TPV3State, nc, nc);



    s->queue_head = 0;

    s->queue_tail = 0;

    s->header_mismatch = false;



    assert(VAR_0->type == NET_CLIENT_OPTIONS_KIND_L2TPV3);

    VAR_4 = VAR_0->u.VAR_4;



    if (VAR_4->has_ipv6 && VAR_4->ipv6) {

        s->ipv6 = VAR_4->ipv6;

    } else {

        s->ipv6 = false;

    }



    if ((VAR_4->has_offset) && (VAR_4->offset > 256)) {

        error_report("l2tpv3_open : offset must be less than 256 bytes");

        goto outerr;

    }



    if (VAR_4->has_rxcookie || VAR_4->has_txcookie) {

        if (VAR_4->has_rxcookie && VAR_4->has_txcookie) {

            s->cookie = true;

        } else {

            goto outerr;

        }

    } else {

        s->cookie = false;

    }



    if (VAR_4->has_cookie64 || VAR_4->cookie64) {

        s->cookie_is_64  = true;

    } else {

        s->cookie_is_64  = false;

    }



    if (VAR_4->has_udp && VAR_4->udp) {

        s->udp = true;

        if (!(VAR_4->has_srcport && VAR_4->has_dstport)) {

            error_report("l2tpv3_open : need both src and dst port for udp");

            goto outerr;

        } else {

            VAR_9 = VAR_4->VAR_9;

            VAR_10 = VAR_4->VAR_10;

        }

    } else {

        s->udp = false;

        VAR_9 = NULL;

        VAR_10 = NULL;

    }





    s->offset = 4;

    s->session_offset = 0;

    s->cookie_offset = 4;

    s->counter_offset = 4;



    s->tx_session = VAR_4->txsession;

    if (VAR_4->has_rxsession) {

        s->rx_session = VAR_4->rxsession;

    } else {

        s->rx_session = s->tx_session;

    }



    if (s->cookie) {

        s->rx_cookie = VAR_4->rxcookie;

        s->tx_cookie = VAR_4->txcookie;

        if (s->cookie_is_64 == true) {

            

            s->offset += 8;

            s->counter_offset += 8;

        } else {

            

            s->offset += 4;

            s->counter_offset += 4;

        }

    }



    memset(&VAR_7, 0, sizeof(VAR_7));



    if (s->ipv6) {

        VAR_7.ai_family = AF_INET6;

    } else {

        VAR_7.ai_family = AF_INET;

    }

    if (s->udp) {

        VAR_7.ai_socktype = SOCK_DGRAM;

        VAR_7.ai_protocol = 0;

        s->offset += 4;

        s->counter_offset += 4;

        s->session_offset += 4;

        s->cookie_offset += 4;

    } else {

        VAR_7.ai_socktype = SOCK_RAW;

        VAR_7.ai_protocol = IPPROTO_L2TP;

    }



    VAR_6 = getaddrinfo(VAR_4->src, VAR_9, &VAR_7, &VAR_8);



    if ((VAR_6 != 0) || (VAR_8 == NULL)) {

        error_report(

            "l2tpv3_open : could not resolve src, errno = %s",

            gai_strerror(VAR_6)

        );

        goto outerr;

    }

    VAR_5 = socket(VAR_8->ai_family, VAR_8->ai_socktype, VAR_8->ai_protocol);

    if (VAR_5 == -1) {

        VAR_5 = -errno;

        error_report("l2tpv3_open : socket creation failed, errno = %d", -VAR_5);

        goto outerr;

    }

    if (bind(VAR_5, (struct sockaddr *) VAR_8->ai_addr, VAR_8->ai_addrlen)) {

        error_report("l2tpv3_open :  could not bind socket err=%i", errno);

        goto outerr;

    }

    if (VAR_8) {

        freeaddrinfo(VAR_8);

    }



    memset(&VAR_7, 0, sizeof(VAR_7));



    if (s->ipv6) {

        VAR_7.ai_family = AF_INET6;

    } else {

        VAR_7.ai_family = AF_INET;

    }

    if (s->udp) {

        VAR_7.ai_socktype = SOCK_DGRAM;

        VAR_7.ai_protocol = 0;

    } else {

        VAR_7.ai_socktype = SOCK_RAW;

        VAR_7.ai_protocol = IPPROTO_L2TP;

    }



    VAR_8 = NULL;

    VAR_6 = getaddrinfo(VAR_4->dst, VAR_10, &VAR_7, &VAR_8);

    if ((VAR_6 != 0) || (VAR_8 == NULL)) {

        error_report(

            "l2tpv3_open : could not resolve dst, error = %s",

            gai_strerror(VAR_6)

        );

        goto outerr;

    }



    s->dgram_dst = g_new0(struct sockaddr_storage, 1);

    memcpy(s->dgram_dst, VAR_8->ai_addr, VAR_8->ai_addrlen);

    s->dst_size = VAR_8->ai_addrlen;



    if (VAR_8) {

        freeaddrinfo(VAR_8);

    }



    if (VAR_4->has_counter && VAR_4->counter) {

        s->has_counter = true;

        s->offset += 4;

    } else {

        s->has_counter = false;

    }



    if (VAR_4->has_pincounter && VAR_4->pincounter) {

        s->has_counter = true;  

        s->pin_counter = true;

    } else {

        s->pin_counter = false;

    }



    if (VAR_4->has_offset) {

        

        s->offset += VAR_4->offset;

    }



    if ((s->ipv6) || (s->udp)) {

        s->header_size = s->offset;

    } else {

        s->header_size = s->offset + sizeof(struct iphdr);

    }



    s->msgvec = build_l2tpv3_vector(s, MAX_L2TPV3_MSGCNT);

    s->vec = g_new(struct iovec, MAX_L2TPV3_IOVCNT);

    s->header_buf = g_malloc(s->header_size);



    qemu_set_nonblock(VAR_5);



    s->VAR_5 = VAR_5;

    s->counter = 0;



    l2tpv3_read_poll(s, true);



    snprintf(s->nc.info_str, sizeof(s->nc.info_str),

             "VAR_4: connected");

    return 0;

outerr:

    qemu_del_net_client(nc);

    if (VAR_5 >= 0) {

        close(VAR_5);

    }

    if (VAR_8) {

        freeaddrinfo(VAR_8);

    }

    return -1;

}

int FUNC_0(const NetClientOptions *VAR_0,
const char *VAR_1,
NetClientState *VAR_2, Error **VAR_3)
{ const NetdevL2TPv3Options *VAR_4; NetL2TPV3State *s; NetClientState *nc; int VAR_5 = -1, VAR_6; struct addrinfo VAR_7; struct addrinfo *VAR_8 = NULL; char *VAR_9, *VAR_10; nc = qemu_new_net_client(&net_l2tpv3_info, VAR_2, "VAR_4", VAR_1); s = DO_UPCAST(NetL2TPV3State, nc, nc); s->queue_head = 0; s->queue_tail = 0; s->header_mismatch = false; assert(VAR_0->type == NET_CLIENT_OPTIONS_KIND_L2TPV3); VAR_4 = VAR_0->u.VAR_4; if (VAR_4->has_ipv6 && VAR_4->ipv6) { s->ipv6 = VAR_4->ipv6; } else { s->ipv6 = false; } if ((VAR_4->has_offset) && (VAR_4->offset > 256)) { error_report("l2tpv3_open : offset must be less than 256 bytes"); goto outerr; } if (VAR_4->has_rxcookie || VAR_4->has_txcookie) { if (VAR_4->has_rxcookie && VAR_4->has_txcookie) { s->cookie = true; } else { goto outerr; } } else { s->cookie = false; } if (VAR_4->has_cookie64 || VAR_4->cookie64) { s->cookie_is_64  = true; } else { s->cookie_is_64  = false; } if (VAR_4->has_udp && VAR_4->udp) { s->udp = true; if (!(VAR_4->has_srcport && VAR_4->has_dstport)) { error_report("l2tpv3_open : need both src and dst port for udp"); goto outerr; } else { VAR_9 = VAR_4->VAR_9; VAR_10 = VAR_4->VAR_10; } } else { s->udp = false; VAR_9 = NULL; VAR_10 = NULL; } s->offset = 4; s->session_offset = 0; s->cookie_offset = 4; s->counter_offset = 4; s->tx_session = VAR_4->txsession; if (VAR_4->has_rxsession) { s->rx_session = VAR_4->rxsession; } else { s->rx_session = s->tx_session; } if (s->cookie) { s->rx_cookie = VAR_4->rxcookie; s->tx_cookie = VAR_4->txcookie; if (s->cookie_is_64 == true) { s->offset += 8; s->counter_offset += 8; } else { s->offset += 4; s->counter_offset += 4; } } memset(&VAR_7, 0, sizeof(VAR_7)); if (s->ipv6) { VAR_7.ai_family = AF_INET6; } else { VAR_7.ai_family = AF_INET; } if (s->udp) { VAR_7.ai_socktype = SOCK_DGRAM; VAR_7.ai_protocol = 0; s->offset += 4; s->counter_offset += 4; s->session_offset += 4; s->cookie_offset += 4; } else { VAR_7.ai_socktype = SOCK_RAW; VAR_7.ai_protocol = IPPROTO_L2TP; } VAR_6 = getaddrinfo(VAR_4->src, VAR_9, &VAR_7, &VAR_8); if ((VAR_6 != 0) || (VAR_8 == NULL)) { error_report(
"l2tpv3_open : could not resolve src, errno = %s",
gai_strerror(VAR_6)
); goto outerr; } VAR_5 = socket(VAR_8->ai_family, VAR_8->ai_socktype, VAR_8->ai_protocol); if (VAR_5 == -1) { VAR_5 = -errno; error_report("l2tpv3_open : socket creation failed, errno = %d", -VAR_5); goto outerr; } if (bind(VAR_5, (struct sockaddr *) VAR_8->ai_addr, VAR_8->ai_addrlen)) { error_report("l2tpv3_open :  could not bind socket err=%i", errno); goto outerr; } if (VAR_8) { freeaddrinfo(VAR_8); } memset(&VAR_7, 0, sizeof(VAR_7)); if (s->ipv6) { VAR_7.ai_family = AF_INET6; } else { VAR_7.ai_family = AF_INET; } if (s->udp) { VAR_7.ai_socktype = SOCK_DGRAM; VAR_7.ai_protocol = 0; } else { VAR_7.ai_socktype = SOCK_RAW; VAR_7.ai_protocol = IPPROTO_L2TP; } VAR_8 = NULL; VAR_6 = getaddrinfo(VAR_4->dst, VAR_10, &VAR_7, &VAR_8); if ((VAR_6 != 0) || (VAR_8 == NULL)) { error_report(
"l2tpv3_open : could not resolve dst, error = %s",
gai_strerror(VAR_6)
); goto outerr; } s->dgram_dst = g_new0(struct sockaddr_storage, 1); memcpy(s->dgram_dst, VAR_8->ai_addr, VAR_8->ai_addrlen); s->dst_size = VAR_8->ai_addrlen; if (VAR_8) { freeaddrinfo(VAR_8); } if (VAR_4->has_counter && VAR_4->counter) { s->has_counter = true; s->offset += 4; } else { s->has_counter = false; } if (VAR_4->has_pincounter && VAR_4->pincounter) { s->has_counter = true; s->pin_counter = true; } else { s->pin_counter = false; } if (VAR_4->has_offset) { s->offset += VAR_4->offset; } if ((s->ipv6) || (s->udp)) { s->header_size = s->offset; } else { s->header_size = s->offset + sizeof(struct iphdr); } s->msgvec = build_l2tpv3_vector(s, MAX_L2TPV3_MSGCNT); s->vec = g_new(struct iovec, MAX_L2TPV3_IOVCNT); s->header_buf = g_malloc(s->header_size); qemu_set_nonblock(VAR_5); s->VAR_5 = VAR_5; s->counter = 0; l2tpv3_read_poll(s, true); snprintf(s->nc.info_str, sizeof(s->nc.info_str),
"VAR_4: connected"); return 0; outerr:
qemu_del_net_client(nc); if (VAR_5 >= 0) { close(VAR_5); } if (VAR_8) { freeaddrinfo(VAR_8); } return -1; }