aboutsummaryrefslogtreecommitdiff
path: root/server.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2024-06-17 20:47:24 +0000
committerOmar Polo <op@omarpolo.com>2024-06-17 20:47:24 +0000
commit27c6dc180f5ae74ef07f444ee3732ff95ca5bfff (patch)
tree5a956abeb197d8df1811b72f389703f417e2420d /server.c
parentf92ef76b28fa484a75f93b30bcee907f024cb8b7 (diff)
inline PROXY_PROTO_PARSE_* and EXPECT_SUCCESS macros
Diffstat (limited to 'server.c')
-rw-r--r--server.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/server.c b/server.c
index be81835..b8ab2f2 100644
--- a/server.c
+++ b/server.c
@@ -1342,7 +1342,7 @@ read_cb(struct tls *ctx, void *buf, size_t buflen, void *cb_arg)
size_t consumed = 0;
int parse_status = proxy_proto_v1_parse(&pp1, c->buf.data, c->buf.len, &consumed);
- if (PROXY_PROTO_PARSE_SUCCESS != parse_status) {
+ if (parse_status == -1) {
log_warnx("read_cb: received invalid proxy protocol header");
return -1;
}