mirror of
http://git.haproxy.org/git/haproxy.git
synced 2026-02-10 08:22:43 +02:00
qc_snd_buf returned a size_t which means that it was never negative
despite its documentation. Thus the caller who checked for this was
never informed of a sendto error.
Clean this by changing the return value of qc_snd_buf() to an integer.
A 0 is returned on success. Every other values are considered as an
error.
This commit should be backported up to 2.6. Note that to not cause
malfunctions, it must be backported after the previous patch :
906b058954
MINOR: quic: explicitely ignore sendto error
This is to ensure that a sendto error does not cause send to be
interrupted which may cause a stalled transfer without a proper retry
mechanism.
The impact of this bug seems null as caller explicitely ignores sendto
error. However this part of code seems to be subject to strange issues
and it may fix them in part. It may be of interest for github issue #1808.
57 lines
1.8 KiB
C
57 lines
1.8 KiB
C
/*
|
|
* include/haproxy/quic_sock.h
|
|
* This file contains declarations for QUIC sockets.
|
|
*
|
|
* Copyright 2020 Frederic Lecaille <flecaille@haproxy.com>
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation, version 2.1
|
|
* exclusively.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
|
|
#ifndef _HAPROXY_QUIC_SOCK_H
|
|
#define _HAPROXY_QUIC_SOCK_H
|
|
#ifdef USE_QUIC
|
|
#ifndef USE_OPENSSL
|
|
#error "Must define USE_OPENSSL"
|
|
#endif
|
|
|
|
#include <sys/socket.h>
|
|
#include <sys/types.h>
|
|
|
|
#include <haproxy/api.h>
|
|
#include <haproxy/connection-t.h>
|
|
#include <haproxy/listener-t.h>
|
|
#include <haproxy/quic_sock-t.h>
|
|
|
|
int quic_session_accept(struct connection *cli_conn);
|
|
int quic_sock_get_src(struct connection *conn, struct sockaddr *addr, socklen_t len);
|
|
int quic_sock_get_dst(struct connection *conn, struct sockaddr *addr, socklen_t len);
|
|
int quic_sock_accepting_conn(const struct receiver *rx);
|
|
struct connection *quic_sock_accept_conn(struct listener *l, int *status);
|
|
void quic_sock_fd_iocb(int fd);
|
|
int qc_snd_buf(struct quic_conn *qc, const struct buffer *buf, size_t count,
|
|
int flags);
|
|
|
|
void quic_accept_push_qc(struct quic_conn *qc);
|
|
|
|
#endif /* USE_QUIC */
|
|
#endif /* _HAPROXY_QUIC_SOCK_H */
|
|
|
|
/*
|
|
* Local variables:
|
|
* c-indent-level: 8
|
|
* c-basic-offset: 8
|
|
* End:
|
|
*/
|