summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/forward.c2
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