From 6ae6d4efde7af2edadbaf56176c6687d0f3d4dd2 Mon Sep 17 00:00:00 2001 From: Allan LeSage Date: Wed, 16 Aug 2023 18:46:22 +0000 Subject: [PATCH 01/15] Changelog as suggested. --- ChangeLog | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ChangeLog b/ChangeLog index a99d5920..be7dcd72 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +nmsg (1.1.0) + + * Multiple performance improvements to JSON formatting. + + * Multiple performance and concurrency improvements in nmsg_io loop. + + * Add new dnsobs message type for raw passive DNS observations. + + * Format DNS messages as JSON in base:dnsqr, base:dnstap, and base:dnsobs. + + * Format base:encode payload in human readable form in JSON output. + + * Replace yajl with json-c for JSON parsing. + + * nmsgtool: exit with nonzero status when interrupted by signal. + + -- Farsight Security, Inc. Wed, 16 Aug 2023 18:43:40 +0000 + nmsg (1.0.1) * nmsgtool: Fix use-after-free bug in statistics debugging From 789e46fc3cdf53ec122ac36f42c5fb7d854c9204 Mon Sep 17 00:00:00 2001 From: Allan LeSage Date: Wed, 16 Aug 2023 18:53:53 +0000 Subject: [PATCH 02/15] Copyright updates (source-side, and some corrections). --- COPYRIGHT | 3 ++- nmsg/base/dns.c | 1 + nmsg/base/dnsobs.c | 3 ++- nmsg/base/dnsqr.c | 1 + nmsg/base/dnstap.c | 1 + nmsg/base/encode.c | 1 + nmsg/base/nmsg_msg_base.c | 3 ++- nmsg/container.c | 3 ++- nmsg/input.c | 1 + nmsg/input_json.c | 3 ++- nmsg/io.c | 1 + nmsg/msgmod.h | 1 + nmsg/msgmod/message.c | 3 ++- nmsg/msgmod/transparent.h | 1 + nmsg/msgmod/transparent_json.c | 3 ++- nmsg/msgmod/transparent_message.c | 3 ++- nmsg/msgmod/transparent_module.c | 1 + nmsg/msgmod/transparent_payload.c | 3 ++- nmsg/output.c | 1 + nmsg/output_json.c | 1 + nmsg/output_nmsg.c | 1 + nmsg/payload.c | 1 + nmsg/private.h | 3 ++- nmsg/strbuf.c | 3 ++- nmsg/strbuf.h | 1 + src/io.c | 1 + src/nmsgtool.c | 1 + src/nmsgtool.h | 1 + src/process_args.c | 1 + tests/test-io.c | 1 + tests/test-misc.c | 1 + tests/test-parse.c | 1 + 32 files changed, 43 insertions(+), 11 deletions(-) diff --git a/COPYRIGHT b/COPYRIGHT index 38300b24..6d316282 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1,6 +1,7 @@ Most nmsg code is under the following copyright and license: - Copyright (c) 2008-2020 by Farsight Security, Inc. + Copyright (c) 2023 DomainTools LLC + Copyright (c) 2008-2021 by Farsight Security, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/nmsg/base/dns.c b/nmsg/base/dns.c index cceaad9a..7611fb25 100644 --- a/nmsg/base/dns.c +++ b/nmsg/base/dns.c @@ -1,6 +1,7 @@ /* dns nmsg message module */ /* + * Copyright (c) 2023 DomainTools LLC * Copyright (c) 2009, 2015, 2021 by Farsight Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/nmsg/base/dnsobs.c b/nmsg/base/dnsobs.c index 895a31e2..fd08aa6d 100644 --- a/nmsg/base/dnsobs.c +++ b/nmsg/base/dnsobs.c @@ -1,7 +1,7 @@ /* dnsobs nmsg message module */ /* - * Copyright (c) 2023 by Farsight Security, Inc. + * Copyright (c) 2023 DomainTools LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -133,6 +133,7 @@ dnsobs_get_response(nmsg_message_t msg, return (nmsg_res_success); } + static nmsg_res dnsobs_sid_print(nmsg_message_t msg, struct nmsg_msgmod_field *field, diff --git a/nmsg/base/dnsqr.c b/nmsg/base/dnsqr.c index 77d6a81a..7c3d2ecc 100644 --- a/nmsg/base/dnsqr.c +++ b/nmsg/base/dnsqr.c @@ -1,6 +1,7 @@ /* dnsqr nmsg message module */ /* + * Copyright (c) 2023 DomainTools LLC * Copyright (c) 2010-2016, 2018, 2019, 2021 by Farsight Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/nmsg/base/dnstap.c b/nmsg/base/dnstap.c index 1c19f0b9..ef175676 100644 --- a/nmsg/base/dnstap.c +++ b/nmsg/base/dnstap.c @@ -1,6 +1,7 @@ /* dnstap nmsg message module */ /* + * Copyright (c) 2023 DomainTools LLC * Copyright (c) 2016 by Farsight Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/nmsg/base/encode.c b/nmsg/base/encode.c index 87ec5eb6..3308c2dd 100644 --- a/nmsg/base/encode.c +++ b/nmsg/base/encode.c @@ -1,6 +1,7 @@ /* encode nmsg message module */ /* + * Copyright (c) 2023 DomainTools LLC * Copyright (c) 2011 by Farsight Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/nmsg/base/nmsg_msg_base.c b/nmsg/base/nmsg_msg_base.c index 07908a1d..49675ff1 100644 --- a/nmsg/base/nmsg_msg_base.c +++ b/nmsg/base/nmsg_msg_base.c @@ -1,7 +1,8 @@ /* nmsg_msg_base.c - base nmsg_msg modules */ /* - * Copyright (c) 2008-2012 by Farsight Security, Inc. + * Copyright (c) 2022 DomainTools LLC + * Copyright (c) 2008-2012, 2016 by Farsight Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/nmsg/container.c b/nmsg/container.c index c4ddbac0..b4e268dd 100644 --- a/nmsg/container.c +++ b/nmsg/container.c @@ -1,5 +1,6 @@ /* - * Copyright (c) 2012 by Farsight Security, Inc. + * Copyright (c) 2023 DomainTools LLC + * Copyright (c) 2012, 2018 by Farsight Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/nmsg/input.c b/nmsg/input.c index 0315263b..eea01f35 100644 --- a/nmsg/input.c +++ b/nmsg/input.c @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 DomainTools LLC * Copyright (c) 2008-2019 by Farsight Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/nmsg/input_json.c b/nmsg/input_json.c index 85b20a47..be0474fc 100644 --- a/nmsg/input_json.c +++ b/nmsg/input_json.c @@ -1,5 +1,6 @@ /* - * Copyright (c) 2015 by Farsight Security, Inc. + * Copyright (c) 2023 DomainTools LLC + * Copyright (c) 2015, 2019 by Farsight Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/nmsg/io.c b/nmsg/io.c index b2c8b559..5ed7e952 100644 --- a/nmsg/io.c +++ b/nmsg/io.c @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 DomainTools LLC * Copyright (c) 2008-2021 by Farsight Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/nmsg/msgmod.h b/nmsg/msgmod.h index 9ccfd608..a424dbcc 100644 --- a/nmsg/msgmod.h +++ b/nmsg/msgmod.h @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 DomainTools LLC * Copyright (c) 2008-2015 by Farsight Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/nmsg/msgmod/message.c b/nmsg/msgmod/message.c index ea520652..bac05129 100644 --- a/nmsg/msgmod/message.c +++ b/nmsg/msgmod/message.c @@ -1,5 +1,6 @@ /* - * Copyright (c) 2009-2012, 2015 by Farsight Security, Inc. + * Copyright (c) 2023 DomainTools LLC + * Copyright (c) 2009-2012, 2015-2016, 2018-2019 by Farsight Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/nmsg/msgmod/transparent.h b/nmsg/msgmod/transparent.h index d63b33df..4bb60636 100644 --- a/nmsg/msgmod/transparent.h +++ b/nmsg/msgmod/transparent.h @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 DomainTools LLC * Copyright (c) 2009, 2015 by Farsight Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/nmsg/msgmod/transparent_json.c b/nmsg/msgmod/transparent_json.c index 20971606..08e57116 100644 --- a/nmsg/msgmod/transparent_json.c +++ b/nmsg/msgmod/transparent_json.c @@ -1,5 +1,6 @@ /* - * Copyright (c) 2015 by Farsight Security, Inc. + * Copyright (c) 2023 DomainTools LLC + * Copyright (c) 2015-2019 by Farsight Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/nmsg/msgmod/transparent_message.c b/nmsg/msgmod/transparent_message.c index c42d025c..5315f70e 100644 --- a/nmsg/msgmod/transparent_message.c +++ b/nmsg/msgmod/transparent_message.c @@ -1,5 +1,6 @@ /* - * Copyright (c) 2009-2012, 2015 by Farsight Security, Inc. + * Copyright (c) 2023 DomainTools LLC + * Copyright (c) 2009-2012, 2015-2016, 2019 by Farsight Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/nmsg/msgmod/transparent_module.c b/nmsg/msgmod/transparent_module.c index f7825dcd..3b42793e 100644 --- a/nmsg/msgmod/transparent_module.c +++ b/nmsg/msgmod/transparent_module.c @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 DomainTools LLC * Copyright (c) 2009, 2010, 2012 by Farsight Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/nmsg/msgmod/transparent_payload.c b/nmsg/msgmod/transparent_payload.c index ffcfd81a..77c5fe43 100644 --- a/nmsg/msgmod/transparent_payload.c +++ b/nmsg/msgmod/transparent_payload.c @@ -1,5 +1,6 @@ /* - * Copyright (c) 2009-2016 by Farsight Security, Inc. + * Copyright (c) 2023 DomainTools LLC + * Copyright (c) 2009-2017, 2019 by Farsight Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/nmsg/output.c b/nmsg/output.c index a168b530..d20aaa20 100644 --- a/nmsg/output.c +++ b/nmsg/output.c @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 DomainTools LLC * Copyright (c) 2008-2019 by Farsight Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/nmsg/output_json.c b/nmsg/output_json.c index d9fa2532..cad307bb 100644 --- a/nmsg/output_json.c +++ b/nmsg/output_json.c @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 DomainTools LLC * Copyright (c) 2015 by Farsight Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/nmsg/output_nmsg.c b/nmsg/output_nmsg.c index 35ba8366..9086bc6c 100644 --- a/nmsg/output_nmsg.c +++ b/nmsg/output_nmsg.c @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 DomainTools LLC * Copyright (c) 2008-2019 by Farsight Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/nmsg/payload.c b/nmsg/payload.c index 2504c4fb..c6388282 100644 --- a/nmsg/payload.c +++ b/nmsg/payload.c @@ -1,4 +1,5 @@ /* + * Coypright (c) 2023 DomainTools LLC * Copyright (c) 2008-2013 by Farsight Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/nmsg/private.h b/nmsg/private.h index 7b9dc897..a348b5fa 100644 --- a/nmsg/private.h +++ b/nmsg/private.h @@ -1,5 +1,6 @@ /* - * Copyright (c) 2008-2015, 2019 by Farsight Security, Inc. + * Copyright (c) 2023 DomainTools LLC + * Copyright (c) 2008-2015, 2019, 2021 by Farsight Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/nmsg/strbuf.c b/nmsg/strbuf.c index 2abf4269..8a44f552 100644 --- a/nmsg/strbuf.c +++ b/nmsg/strbuf.c @@ -1,5 +1,6 @@ /* - * Copyright (c) 2009, 2012 by Farsight Security, Inc. + * Copyright (c) 2023 DomainTools LLC + * Copyright (c) 2009, 2012-2013, 2016 by Farsight Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/nmsg/strbuf.h b/nmsg/strbuf.h index 25b54376..5ecc8c20 100644 --- a/nmsg/strbuf.h +++ b/nmsg/strbuf.h @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 DomainTools LLC * Copyright (c) 2009-2015 by Farsight Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/io.c b/src/io.c index 198e1f3f..5d7efa96 100644 --- a/src/io.c +++ b/src/io.c @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 DomainTools LLC * Copyright (c) 2008-2019, 2021 by Farsight Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/nmsgtool.c b/src/nmsgtool.c index d05b69cf..153890e4 100644 --- a/src/nmsgtool.c +++ b/src/nmsgtool.c @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 DomainTools LLC * Copyright (c) 2008-2021 by Farsight Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/nmsgtool.h b/src/nmsgtool.h index 099a776f..07209211 100644 --- a/src/nmsgtool.h +++ b/src/nmsgtool.h @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 DomainTools LLC * Copyright (c) 2008-2019, 2021 by Farsight Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/process_args.c b/src/process_args.c index 13306886..4215f4d5 100644 --- a/src/process_args.c +++ b/src/process_args.c @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 DomainTools LLC * Copyright (c) 2008-2015, 2019, 2021 by Farsight Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tests/test-io.c b/tests/test-io.c index 35f6e456..c024a9d4 100644 --- a/tests/test-io.c +++ b/tests/test-io.c @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 DomainTools LLC * Copyright (c) 2018, 2021 by Farsight Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tests/test-misc.c b/tests/test-misc.c index cea38e38..98abb50e 100644 --- a/tests/test-misc.c +++ b/tests/test-misc.c @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 DomainTools LLC * Copyright (c) 2018, 2021 by Farsight Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tests/test-parse.c b/tests/test-parse.c index 41857f2b..e7e8dcdb 100644 --- a/tests/test-parse.c +++ b/tests/test-parse.c @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 DomainTools LLC * Copyright (c) 2018 by Farsight Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); From 65c985e50b3a179fc742e26dff2a44abee6baf27 Mon Sep 17 00:00:00 2001 From: Allan LeSage Date: Wed, 16 Aug 2023 18:56:18 +0000 Subject: [PATCH 03/15] Version bump to 1.1.0. --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 2f50e64a..9941bc77 100644 --- a/Makefile.am +++ b/Makefile.am @@ -121,7 +121,7 @@ nobase_nodist_include_HEADERS = \ lib_LTLIBRARIES = nmsg/libnmsg.la -VERSION_INFO = 8:0:0 +VERSION_INFO = 9:0:1 nmsg_libnmsg_la_LDFLAGS = \ $(AM_LDFLAGS) \ From 8b4de24474551cdff37f7b2dbb4de85a2208b28e Mon Sep 17 00:00:00 2001 From: Allan LeSage Date: Wed, 16 Aug 2023 18:56:41 +0000 Subject: [PATCH 04/15] Libtool version increment to reflect addition of symbols. --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 2ad053dc..eeb0fcb7 100644 --- a/configure.ac +++ b/configure.ac @@ -1,8 +1,8 @@ AC_PREREQ(2.64) m4_define(nmsg_major_version, 1) -m4_define(nmsg_minor_version, 0) -m4_define(nmsg_patchlevel_version, 1) +m4_define(nmsg_minor_version, 1) +m4_define(nmsg_patchlevel_version, 0) m4_define(nmsg_version, nmsg_major_version.nmsg_minor_version.nmsg_patchlevel_version) m4_define(nmsg_version_number, From e277570a81a26240c5e1765d7ac823fb37403d14 Mon Sep 17 00:00:00 2001 From: Allan LeSage Date: Wed, 16 Aug 2023 18:59:10 +0000 Subject: [PATCH 05/15] Brush up debhelper dependency, remove outmoded autoreconf reference. --- debian/compat | 1 - debian/control | 3 +-- debian/rules | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) delete mode 100644 debian/compat diff --git a/debian/compat b/debian/compat deleted file mode 100644 index ec635144..00000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/debian/control b/debian/control index 8e679005..6abc06fb 100644 --- a/debian/control +++ b/debian/control @@ -3,8 +3,7 @@ Section: net Priority: optional Maintainer: Farsight Security, Inc. Build-Depends: - debhelper (>= 9~), - dh-autoreconf (>= 5~), + debhelper-compat (= 13), docbook-xsl, docbook-xsl-ns, docbook5-xml, diff --git a/debian/rules b/debian/rules index 430afed1..4f307682 100755 --- a/debian/rules +++ b/debian/rules @@ -7,7 +7,7 @@ include /usr/share/dpkg/buildflags.mk CFLAGS += -fno-omit-frame-pointer %: - dh $@ --with autoreconf --parallel + dh $@ override_dh_strip: From ee6566ac3a45018fd0ae5cfeeaef958ed929db7f Mon Sep 17 00:00:00 2001 From: Allan LeSage Date: Wed, 16 Aug 2023 18:59:58 +0000 Subject: [PATCH 06/15] Migrate to the standard Debian Apache-2 license and bump copyright years. --- debian/copyright | 45 ++++++++++++++++++++------------------------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/debian/copyright b/debian/copyright index 60a21c67..60d9d773 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,25 +1,20 @@ -This package was debianized by Robert S. Edmonds on -Tue, 16 Jun 2009 20:16:19 -0400. - -It was downloaded from: - - https://dl.farsightsecurity.com/dist/nmsg/ - https://github.com/farsightsec/nmsg - -Copyright holders: - - Copyright (c) 2008-2021 by Farsight Security, Inc. - -License: - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + +Files: * +Copyright: 2023 DomainTools LLC + 2008-2021 by Farsight Security, Inc. +License: Apache-2.0 + Licensed under the Apache License, Version 2.0 (the "License"); you + may not use this file except in compliance with the License. You may + obtain a copy of the License at + . + http://www.apache.org/licenses/LICENSE-2.0. + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. See the License for the specific language governing + permissions and limitations under the License. + . + On Debian systems, the complete text of the Apache version 2.0 license + can be found in "/usr/share/common-licenses/Apache-2.0". From ac51ea8b089296abb9fffca23dbbdce8120491b1 Mon Sep 17 00:00:00 2001 From: Allan LeSage Date: Wed, 16 Aug 2023 19:27:32 +0000 Subject: [PATCH 07/15] Changelog for 1.1.0-1 release. --- debian/changelog | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/debian/changelog b/debian/changelog index 28d366f4..3bbd0549 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,21 @@ +nmsg (1.1.0-1) debian-fsi; urgency=medium + + * Multiple performance improvements to JSON formatting. + + * Multiple performance and concurrency improvements in nmsg_io loop. + + * Add new dnsobs message type for raw passive DNS observations. + + * Format DNS messages as JSON in base:dnsqr, base:dnstap, and base:dnsobs. + + * Format base:encode payload in human readable form in JSON output. + + * Replace yajl with json-c for JSON parsing. + + * nmsgtool: exit with nonzero status when interrupted by signal. + + -- Farsight Security, Inc. Wed, 16 Aug 2023 18:43:40 +0000 + nmsg (1.0.1-1) debian-fsi; urgency=medium * nmsgtool: Fix use-after-free bug in statistics debugging From 7ff947a39fb9085671a1a799fdea3af6a981ff5f Mon Sep 17 00:00:00 2001 From: Allan LeSage Date: Wed, 16 Aug 2023 19:29:11 +0000 Subject: [PATCH 08/15] Add symbols to reflect added. --- debian/libnmsg8.symbols | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/libnmsg8.symbols b/debian/libnmsg8.symbols index cb0dad2a..3b811667 100644 --- a/debian/libnmsg8.symbols +++ b/debian/libnmsg8.symbols @@ -169,6 +169,8 @@ libnmsg.so.8 libnmsg8 #MINVER# nmsg_sock_parse@Base 0.6.11 nmsg_sock_parse_sockspec@Base 0.6.11 nmsg_strbuf_append@Base 0.5.0 + nmsg_strbuf_append_str@Base 1.1.0 + nmsg_strbuf_append_str_json@Base 1.1.0 nmsg_strbuf_destroy@Base 0.5.0 nmsg_strbuf_init@Base 0.5.0 nmsg_strbuf_len@Base 0.5.0 From 8154442959e5be22c26661b8ca538eb0ab9388ad Mon Sep 17 00:00:00 2001 From: Allan LeSage Date: Wed, 16 Aug 2023 19:40:57 +0000 Subject: [PATCH 09/15] Ship libnmsg.a in the -dev package. --- debian/libnmsg-dev.install | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/libnmsg-dev.install b/debian/libnmsg-dev.install index 00962612..1491b47c 100644 --- a/debian/libnmsg-dev.install +++ b/debian/libnmsg-dev.install @@ -1,3 +1,4 @@ usr/include +usr/lib/*/libnmsg.a usr/lib/*/libnmsg*.so usr/lib/*/pkgconfig/*.pc From 27a66f89cd629bcba6711c2fdd8279810cb7c5ce Mon Sep 17 00:00:00 2001 From: Allan LeSage Date: Wed, 16 Aug 2023 19:41:38 +0000 Subject: [PATCH 10/15] Ship the .proto files in the -dev package. --- debian/libnmsg-dev.install | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/libnmsg-dev.install b/debian/libnmsg-dev.install index 1491b47c..7490d78f 100644 --- a/debian/libnmsg-dev.install +++ b/debian/libnmsg-dev.install @@ -2,3 +2,4 @@ usr/include usr/lib/*/libnmsg.a usr/lib/*/libnmsg*.so usr/lib/*/pkgconfig/*.pc +usr/share/nmsg/base/*.proto From 4f5ae9d53397763e4bfdafc120c5d5a34b164ca5 Mon Sep 17 00:00:00 2001 From: Allan LeSage Date: Wed, 16 Aug 2023 19:44:28 +0000 Subject: [PATCH 11/15] Don't ship .la files per Debian directive. --- debian/not-installed | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 debian/not-installed diff --git a/debian/not-installed b/debian/not-installed new file mode 100644 index 00000000..353ebd4d --- /dev/null +++ b/debian/not-installed @@ -0,0 +1,3 @@ +usr/lib/*/libnmsg.la +usr/lib/*/nmsg/nmsg_flt1_sample.la +usr/lib/*/nmsg/nmsg_msg9_base.la From 99dbaa38a005cac7c440b29d290ccbbb0e11e906 Mon Sep 17 00:00:00 2001 From: Allan LeSage Date: Thu, 31 Aug 2023 20:34:43 +0000 Subject: [PATCH 12/15] Changelog updates. --- ChangeLog | 4 ++++ debian/changelog | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index be7dcd72..726e6146 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,10 @@ nmsg (1.1.0) * nmsgtool: exit with nonzero status when interrupted by signal. + * Correct container size calculation when sequencing. + + * Address doxygen deprecations. + -- Farsight Security, Inc. Wed, 16 Aug 2023 18:43:40 +0000 nmsg (1.0.1) diff --git a/debian/changelog b/debian/changelog index 3bbd0549..8a49f4f3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,10 @@ nmsg (1.1.0-1) debian-fsi; urgency=medium * nmsgtool: exit with nonzero status when interrupted by signal. + * Correct container size calculation when sequencing. + + * Address doxygen deprecations. + -- Farsight Security, Inc. Wed, 16 Aug 2023 18:43:40 +0000 nmsg (1.0.1-1) debian-fsi; urgency=medium From 072af8215ca037fa80647a27282e74251c443e8b Mon Sep 17 00:00:00 2001 From: Allan LeSage Date: Thu, 31 Aug 2023 20:35:19 +0000 Subject: [PATCH 13/15] Depend on libwdns >= 0.12.0. --- configure.ac | 2 +- debian/control | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index eeb0fcb7..52304b61 100644 --- a/configure.ac +++ b/configure.ac @@ -132,7 +132,7 @@ AC_PATH_PROG([PROTOC_C], [protoc-c]) AS_IF([test -z "$PROTOC_C"], [AC_MSG_ERROR([The protoc-c program was not found. Please install the protobuf-c compiler!])]) -PKG_CHECK_MODULES([libwdns], [libwdns >= 0.8.0]) +PKG_CHECK_MODULES([libwdns], [libwdns >= 0.12.0]) AC_ARG_WITH([zmq], AS_HELP_STRING([--without-libzmq], [Disable zmq support])) if test "x$with_libzmq" != "xno"; then diff --git a/debian/control b/debian/control index 6abc06fb..00f2123a 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,7 @@ Build-Depends: dpkg-dev (>= 1.16.1~), libpcap0.8-dev, libprotobuf-c-dev (>= 1.0.1~), - libwdns-dev (>= 0.8.0~), + libwdns-dev (>= 0.12.0~), libzmq3-dev (>= 4.2.0~), libjson-c-dev (>= 0.13.0~), pkg-config, From 480ac7b95118e5791d8d645c85a139cd5a932a73 Mon Sep 17 00:00:00 2001 From: "Jeremy C. Reed" Date: Thu, 10 Aug 2023 17:11:03 +0000 Subject: [PATCH 14/15] don't use intermediate test script, just run the tests via Makefile --- Makefile.am | 6 +++++- tests/nmsg.test | 13 ------------- 2 files changed, 5 insertions(+), 14 deletions(-) delete mode 100755 tests/nmsg.test diff --git a/Makefile.am b/Makefile.am index 9941bc77..a2a64275 100644 --- a/Makefile.am +++ b/Makefile.am @@ -382,7 +382,11 @@ noinst_PROGRAMS += \ examples/nmsg-packet2pcap \ examples/print_version -TESTS += tests/nmsg.test +TESTS += tests/json-utf8-tests/test.sh +TESTS += tests/nmsg-dnstap-tests/test.sh +TESTS += tests/payload-crc32c-tests/test.sh +TESTS += tests/string-tests/test.sh +TESTS += tests/udp-checksum-tests/test.sh TESTS += tests/test-layout-fltmod_plugin check_PROGRAMS += tests/test-layout-fltmod_plugin diff --git a/tests/nmsg.test b/tests/nmsg.test deleted file mode 100755 index be01fb40..00000000 --- a/tests/nmsg.test +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -TESTS="udp-checksum-tests \ - payload-crc32c-tests \ - nmsg-dnstap-tests \ - json-utf8-tests \ - string-tests" - -for x in $TESTS; do - testdir="tests/$x" - echo "executing tests in directory $testdir" - sh -c "cd $testdir && ./test.sh" -done From 9ab492556ee1f28c2ba135728e23e82e2be42059 Mon Sep 17 00:00:00 2001 From: "Jeremy C. Reed" Date: Thu, 10 Aug 2023 18:08:35 +0000 Subject: [PATCH 15/15] string-tests: use abs_top_srcdir --- tests/string-tests/test.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/string-tests/test.sh.in b/tests/string-tests/test.sh.in index b627acd7..f07d506b 100755 --- a/tests/string-tests/test.sh.in +++ b/tests/string-tests/test.sh.in @@ -1,6 +1,6 @@ #!/bin/sh -cd @top_srcdir@/tests/string-tests +cd @abs_top_srcdir@/tests/string-tests NMSG_MSGMOD_DIR="@abs_top_builddir@/nmsg/base/.libs" export NMSG_MSGMOD_DIR