aboutsummaryrefslogtreecommitdiffstats
path: root/main/knock/init-tcpflags-variables.patch
blob: 9a503f4ce2ba5827ae3a8ed9820930a8856eabb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From 4a5e12b2c01bd13d8d5ece5c8cbc6139ec2de765 Mon Sep 17 00:00:00 2001
From: TDFKAOlli <TDFKAOlli@ish.de>
Date: Sun, 7 Jan 2018 22:46:35 +0100
Subject: [PATCH] Fixed issue #54 by initializing tcpflags variables after
 malloc of doors memory

---
 src/knockd.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/knockd.c b/src/knockd.c
index d23a3cf..70515b5 100644
--- a/src/knockd.c
+++ b/src/knockd.c
@@ -583,6 +583,12 @@ int parseconfig(char *configfile)
 				door->start_command = NULL;
 				door->cmd_timeout = CMD_TIMEOUT; /* default command timeout (seconds) */
 				door->stop_command = NULL;
+				door->flag_fin = DONT_CARE;
+				door->flag_syn = DONT_CARE;
+				door->flag_rst = DONT_CARE;
+				door->flag_psh = DONT_CARE;
+				door->flag_ack = DONT_CARE;
+				door->flag_urg = DONT_CARE;
 				door->one_time_sequences_fd = NULL;
 				door->pcap_filter_exp = NULL;
 				doors = list_add(doors, door);