]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: protocol: make sure the connect_* functions always receive a dst
authorWilly Tarreau <w@1wt.eu>
Mon, 2 May 2022 15:45:12 +0000 (17:45 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 2 May 2022 15:47:31 +0000 (17:47 +0200)
commit158b6cf102d68f003f323a2f381239fcbb665a7e
tree5e0a5ddb50b1762fbc0062143c88be3e8664e464
parent04e9acaef4945534cf4ea639f596368a032a0a37
CLEANUP: protocol: make sure the connect_* functions always receive a dst

Some of the protocol-level ->connect() functions currently dereference
the connection's destination address while others test it and return an
error. There's normally no more non-bogus code path that calls such
functions without a valid destination address on the connection, so
let's unify these functions and just place a BUG_ON() there, and drop
the useless test that's supposed to return an internal error.
src/proto_quic.c
src/proto_sockpair.c
src/proto_tcp.c
src/proto_uxst.c