Commit 93c6e37c authored by Natanael Copa's avatar Natanael Copa

main/knock: backport fix for uninitialized tcpflags

ref #10032
upstream: https://github.com/jvinet/knock/issues/54
parent d955a610
......@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=knock
pkgver=0.7
pkgrel=1
pkgrel=2
pkgdesc="A simple port-knocking daemon"
url="http://www.zeroflux.org/projects/knock"
arch="all"
......@@ -12,6 +12,7 @@ makedepends="libpcap-dev"
install=
subpackages="$pkgname-doc"
source="http://www.zeroflux.org/proj/knock/files/$pkgname-$pkgver.tar.gz
init-tcpflags-variables.patch
knock.initd
knock.confd"
......@@ -50,12 +51,7 @@ package() {
"$pkgdir"/etc/conf.d/knockd || return 1
}
md5sums="cb6373fd4ccb42eeca3ff406b7fdb8a7 knock-0.7.tar.gz
82eec0859406f1394fcdbbeacad118ce knock.initd
8067d3b8401a0b5d513c44d3ff436032 knock.confd"
sha256sums="9938479c321066424f74c61f6bee46dfd355a828263dc89561a1ece3f56578a4 knock-0.7.tar.gz
16a8d08c1fe354ea7bef9b3b7854592e87f16fac4707f8410137c512b4545fc5 knock.initd
569d0596f28e6df05aeff16331fa5b19c60e4d6a2e36eec57dc9ac377ba3b46e knock.confd"
sha512sums="eab5d855f7111d9411e84a56a15e8ea74f41c5bd9dee27ab49f0d8d509eeeb96a60c508928c92916dc0ec9b737c447ca8ca5ed4db6479b389549d60e76a85aa7 knock-0.7.tar.gz
065f7d4d289eaa8c595a9f7ab6bd50647526e0f07ddd65c1eedb079f263ccdea015c405c06fd466954937827cc547879f6208c9a8462ecbabc391e6aa77a5d16 init-tcpflags-variables.patch
369010549a1b33efe9f634794f039249421778d49739e8f10e4d6baa83424e066a63c0ef637b70762ee34617e7b67f9ac6683125d35ded85d6779d6b2ef0f7db knock.initd
63fa311e6adf21450d4c93008a9537ec1b3c0dbed28e3daf955f2761127d9d756f2f7a84d8357d81a5e1a5a48453f9179d0c18cf18af0b9f30437c862a438d7f knock.confd"
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);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment