diff options
| -rw-r--r-- | meta-networking/recipes-filter/conntrack-tools/conntrack-tools_1.4.2.bb (renamed from meta-networking/recipes-filter/conntrack-tools/conntrack-tools_1.4.0.bb) | 5 | ||||
| -rw-r--r-- | meta-networking/recipes-filter/conntrack-tools/files/0001-conntrackd-build-fix-crash-when-optional-kernel-modu.patch | 85 |
2 files changed, 88 insertions, 2 deletions
diff --git a/meta-networking/recipes-filter/conntrack-tools/conntrack-tools_1.4.0.bb b/meta-networking/recipes-filter/conntrack-tools/conntrack-tools_1.4.2.bb index 57fe21c056..7b11d206cc 100644 --- a/meta-networking/recipes-filter/conntrack-tools/conntrack-tools_1.4.0.bb +++ b/meta-networking/recipes-filter/conntrack-tools/conntrack-tools_1.4.2.bb | |||
| @@ -9,9 +9,10 @@ SRC_URI = " \ | |||
| 9 | http://www.netfilter.org/projects/conntrack-tools/files/conntrack-tools-${PV}.tar.bz2;name=tar \ | 9 | http://www.netfilter.org/projects/conntrack-tools/files/conntrack-tools-${PV}.tar.bz2;name=tar \ |
| 10 | file://conntrack-failover \ | 10 | file://conntrack-failover \ |
| 11 | file://init \ | 11 | file://init \ |
| 12 | file://0001-conntrackd-build-fix-crash-when-optional-kernel-modu.patch \ | ||
| 12 | " | 13 | " |
| 13 | SRC_URI[tar.md5sum] = "ee737c774e01349f75e935228a2d851b" | 14 | SRC_URI[tar.md5sum] = "b1f9d006e7bf000a77395ff7cd3fac16" |
| 14 | SRC_URI[tar.sha256sum] = "036b032a5c4d180aad686df21399d74506b9b3d3000794eb13ac313482e24896" | 15 | SRC_URI[tar.sha256sum] = "e5c423dc077f9ca8767eaa6cf40446943905711c6a8fe27f9cc1977d4d6aa11e" |
| 15 | 16 | ||
| 16 | inherit autotools-brokensep update-rc.d pkgconfig | 17 | inherit autotools-brokensep update-rc.d pkgconfig |
| 17 | 18 | ||
diff --git a/meta-networking/recipes-filter/conntrack-tools/files/0001-conntrackd-build-fix-crash-when-optional-kernel-modu.patch b/meta-networking/recipes-filter/conntrack-tools/files/0001-conntrackd-build-fix-crash-when-optional-kernel-modu.patch new file mode 100644 index 0000000000..a7ab6d687c --- /dev/null +++ b/meta-networking/recipes-filter/conntrack-tools/files/0001-conntrackd-build-fix-crash-when-optional-kernel-modu.patch | |||
| @@ -0,0 +1,85 @@ | |||
| 1 | From c392c159605956c7bd4a264ab4490e2b2704c0cd Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Pablo Neira Ayuso <pablo@netfilter.org> | ||
| 3 | Date: Fri, 13 Jun 2014 12:53:17 +0200 | ||
| 4 | Subject: [PATCH] conntrackd: build: fix crash when optional kernel modules are | ||
| 5 | not loaded | ||
| 6 | |||
| 7 | Upstream-Status: Backport | ||
| 8 | |||
| 9 | Fix a possible crash if conntrackd sees DCCP, SCTP and ICMPv6 traffic | ||
| 10 | and the corresponding kernel modules that track this traffic are not | ||
| 11 | available. | ||
| 12 | |||
| 13 | Fixes: http://bugzilla.netfilter.org/show_bug.cgi?id=910 | ||
| 14 | Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | ||
| 15 | --- | ||
| 16 | src/build.c | 22 +++++++++++++--------- | ||
| 17 | 1 file changed, 13 insertions(+), 9 deletions(-) | ||
| 18 | |||
| 19 | diff --git a/src/build.c b/src/build.c | ||
| 20 | index 5799b51..9ba8b57 100644 | ||
| 21 | --- a/src/build.c | ||
| 22 | +++ b/src/build.c | ||
| 23 | @@ -105,14 +105,14 @@ static enum nf_conntrack_attr nat_type[] = | ||
| 24 | ATTR_ORIG_NAT_SEQ_OFFSET_AFTER, ATTR_REPL_NAT_SEQ_CORRECTION_POS, | ||
| 25 | ATTR_REPL_NAT_SEQ_OFFSET_BEFORE, ATTR_REPL_NAT_SEQ_OFFSET_AFTER }; | ||
| 26 | |||
| 27 | +/* ICMP, UDP and TCP are always loaded with nf_conntrack_ipv4 */ | ||
| 28 | static void build_l4proto_tcp(const struct nf_conntrack *ct, struct nethdr *n) | ||
| 29 | { | ||
| 30 | - ct_build_group(ct, ATTR_GRP_ORIG_PORT, n, NTA_PORT, | ||
| 31 | - sizeof(struct nfct_attr_grp_port)); | ||
| 32 | - | ||
| 33 | if (!nfct_attr_is_set(ct, ATTR_TCP_STATE)) | ||
| 34 | return; | ||
| 35 | |||
| 36 | + ct_build_group(ct, ATTR_GRP_ORIG_PORT, n, NTA_PORT, | ||
| 37 | + sizeof(struct nfct_attr_grp_port)); | ||
| 38 | ct_build_u8(ct, ATTR_TCP_STATE, n, NTA_TCP_STATE); | ||
| 39 | if (CONFIG(sync).tcp_window_tracking) { | ||
| 40 | ct_build_u8(ct, ATTR_TCP_WSCALE_ORIG, n, NTA_TCP_WSCALE_ORIG); | ||
| 41 | @@ -122,12 +122,12 @@ static void build_l4proto_tcp(const struct nf_conntrack *ct, struct nethdr *n) | ||
| 42 | |||
| 43 | static void build_l4proto_sctp(const struct nf_conntrack *ct, struct nethdr *n) | ||
| 44 | { | ||
| 45 | - ct_build_group(ct, ATTR_GRP_ORIG_PORT, n, NTA_PORT, | ||
| 46 | - sizeof(struct nfct_attr_grp_port)); | ||
| 47 | - | ||
| 48 | + /* SCTP is optional, make sure nf_conntrack_sctp is loaded */ | ||
| 49 | if (!nfct_attr_is_set(ct, ATTR_SCTP_STATE)) | ||
| 50 | return; | ||
| 51 | |||
| 52 | + ct_build_group(ct, ATTR_GRP_ORIG_PORT, n, NTA_PORT, | ||
| 53 | + sizeof(struct nfct_attr_grp_port)); | ||
| 54 | ct_build_u8(ct, ATTR_SCTP_STATE, n, NTA_SCTP_STATE); | ||
| 55 | ct_build_u32(ct, ATTR_SCTP_VTAG_ORIG, n, NTA_SCTP_VTAG_ORIG); | ||
| 56 | ct_build_u32(ct, ATTR_SCTP_VTAG_REPL, n, NTA_SCTP_VTAG_REPL); | ||
| 57 | @@ -135,18 +135,22 @@ static void build_l4proto_sctp(const struct nf_conntrack *ct, struct nethdr *n) | ||
| 58 | |||
| 59 | static void build_l4proto_dccp(const struct nf_conntrack *ct, struct nethdr *n) | ||
| 60 | { | ||
| 61 | - ct_build_group(ct, ATTR_GRP_ORIG_PORT, n, NTA_PORT, | ||
| 62 | - sizeof(struct nfct_attr_grp_port)); | ||
| 63 | - | ||
| 64 | + /* DCCP is optional, make sure nf_conntrack_dccp is loaded */ | ||
| 65 | if (!nfct_attr_is_set(ct, ATTR_DCCP_STATE)) | ||
| 66 | return; | ||
| 67 | |||
| 68 | + ct_build_group(ct, ATTR_GRP_ORIG_PORT, n, NTA_PORT, | ||
| 69 | + sizeof(struct nfct_attr_grp_port)); | ||
| 70 | ct_build_u8(ct, ATTR_DCCP_STATE, n, NTA_DCCP_STATE); | ||
| 71 | ct_build_u8(ct, ATTR_DCCP_ROLE, n, NTA_DCCP_ROLE); | ||
| 72 | } | ||
| 73 | |||
| 74 | static void build_l4proto_icmp(const struct nf_conntrack *ct, struct nethdr *n) | ||
| 75 | { | ||
| 76 | + /* This is also used by ICMPv6 and nf_conntrack_ipv6 is optional */ | ||
| 77 | + if (!nfct_attr_is_set(ct, ATTR_ICMP_TYPE)) | ||
| 78 | + return; | ||
| 79 | + | ||
| 80 | ct_build_u8(ct, ATTR_ICMP_TYPE, n, NTA_ICMP_TYPE); | ||
| 81 | ct_build_u8(ct, ATTR_ICMP_CODE, n, NTA_ICMP_CODE); | ||
| 82 | ct_build_u16(ct, ATTR_ICMP_ID, n, NTA_ICMP_ID); | ||
| 83 | -- | ||
| 84 | 1.9.1 | ||
| 85 | |||
