diff options
-rw-r--r-- | src/forward.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/forward.c b/src/forward.c index f3c38d7..786b11f 100644 --- a/src/forward.c +++ b/src/forward.c @@ -1863,7 +1863,7 @@ unsigned char *tcp_request(int confd, time_t now, int first, last; unsigned int flags = 0; - if (getpeername(confd, (struct sockaddr *)&peer_addr, &peer_len) == -1) + if (!packet || getpeername(confd, (struct sockaddr *)&peer_addr, &peer_len) == -1) return packet; #ifdef HAVE_CONNTRACK |