diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-04-16 07:29:23 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-04-17 23:29:14 -0700 |
| commit | 1941fdae7eca1b92a957dfffa6a1ec7ef549dc60 (patch) | |
| tree | b0a0a0eb4e634fea60cf9cf1c9bde6a7824a9e66 /src/sp/transport/tls | |
| parent | d230d9b7569f780043f12eac846d96c3ec555f3b (diff) | |
| download | nng-1941fdae7eca1b92a957dfffa6a1ec7ef549dc60.tar.gz nng-1941fdae7eca1b92a957dfffa6a1ec7ef549dc60.tar.bz2 nng-1941fdae7eca1b92a957dfffa6a1ec7ef549dc60.zip | |
Log messages when peer sends too large message.
Also while here, remove unused sockaddr members from some structs.
This should save a bit of memory for servers with a lot of conns.
Diffstat (limited to 'src/sp/transport/tls')
| -rw-r--r-- | src/sp/transport/tls/tls.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sp/transport/tls/tls.c b/src/sp/transport/tls/tls.c index c5e4e90d..4412fa03 100644 --- a/src/sp/transport/tls/tls.c +++ b/src/sp/transport/tls/tls.c @@ -38,7 +38,6 @@ struct tlstran_pipe { nni_list sendq; nni_list recvq; tlstran_ep *ep; - nni_sockaddr sa; nni_atomic_flag reaped; nni_reap_node reap; uint8_t txlen[sizeof(uint64_t)]; @@ -76,7 +75,6 @@ struct tlstran_ep { nni_list waitpipes; // pipes waiting to match to socket nni_list negopipes; // pipes busy negotiating const char *host; - nng_sockaddr src; nng_sockaddr sa; nni_stat_item st_rcv_max; }; @@ -379,6 +377,9 @@ tlstran_pipe_recv_cb(void *arg) // Make sure the message payload is not too big. If it is // the caller will shut down the pipe. if ((len > p->rcvmax) && (p->rcvmax > 0)) { + nng_log_warn("NNG-RCVMAX", + "Rejected oversize message of %lu bytes on TLS", + (unsigned long) len); rv = NNG_EMSGSIZE; goto recv_error; } |
