Thanks, applied as 7bf62be31f4c941acda983631b5d1e1385c0f132.

Michael

[sent from post-receive hook]

On Mon, 09 May 2022 08:28:56 +0200, Alexander Dahl <a...@thorsis.com> wrote:
> - packet drop reason support (kernel 5.17 or later)
> - dependency updates (libnl3, readline)
> - patches fixing build issues (alignment, gcc 11, gcc 12, ...)
>   all gone upstream
> 
> Signed-off-by: Alexander Dahl <a...@thorsis.com>
> Message-Id: <20220426144213.15778-1-...@thorsis.com>
> Signed-off-by: Michael Olbrich <m.olbr...@pengutronix.de>
> 
> diff --git 
> a/patches/dropwatch-1.5.3/0001-Fix-build-issue-when-compiling-with-Wcast-align.patch
>  
> b/patches/dropwatch-1.5.3/0001-Fix-build-issue-when-compiling-with-Wcast-align.patch
> deleted file mode 100644
> index d63d0b18a531..000000000000
> --- 
> a/patches/dropwatch-1.5.3/0001-Fix-build-issue-when-compiling-with-Wcast-align.patch
> +++ /dev/null
> @@ -1,47 +0,0 @@
> -From: Neil Horman <nhor...@tuxdriver.com>
> -Date: Sat, 21 Mar 2020 07:22:29 -0400
> -Subject: [PATCH] Fix build issue when compiling with -Wcast-align
> -
> -Passing a char buffer cast to struct nlmsghdr * violates the rules of
> --Wcast-align on some arches, as described in :
> -https://github.com/nhorman/dropwatch/issues/26
> -
> -Fix it by declaring the buffer as a struct nlmsghdr, and casting to a
> -less alligned type
> -
> -Signed-off-by: Neil Horman <nhor...@tuxdriver.com>
> ----
> - src/main.c | 6 +++---
> - 1 file changed, 3 insertions(+), 3 deletions(-)
> -
> -diff --git a/src/main.c b/src/main.c
> -index bd87085d7dc8..2253fc4eb8c1 100644
> ---- a/src/main.c
> -+++ b/src/main.c
> -@@ -267,7 +267,7 @@ int send_netlink_message(struct netlink_message *msg)
> - 
> - struct netlink_message *recv_netlink_message(int *err)
> - {
> --    static unsigned char *buf;
> -+    static struct nlmsghdr *buf;
> -     struct netlink_message *msg;
> -     struct genlmsghdr *glm;
> -     struct sockaddr_nl nla;
> -@@ -277,7 +277,7 @@ struct netlink_message *recv_netlink_message(int *err)
> -     *err = 0;
> - 
> -     do {
> --            rc = nl_recv(nsd, &nla, &buf, NULL);
> -+            rc = nl_recv(nsd, &nla, (unsigned char **)&buf, NULL);
> -             if (rc < 0) {
> -                     switch (errno) {
> -                     case EINTR:
> -@@ -294,7 +294,7 @@ struct netlink_message *recv_netlink_message(int *err)
> -             }
> -     } while (rc == 0);
> - 
> --    msg = wrap_netlink_msg((struct nlmsghdr *)buf);
> -+    msg = wrap_netlink_msg(buf);
> - 
> -     type = ((struct nlmsghdr *)msg->msg)->nlmsg_type;
> - 
> diff --git a/patches/dropwatch-1.5.3/0002-Fix-configure-for-libnl3-genl.patch 
> b/patches/dropwatch-1.5.3/0002-Fix-configure-for-libnl3-genl.patch
> deleted file mode 100644
> index 5c39d820134d..000000000000
> --- a/patches/dropwatch-1.5.3/0002-Fix-configure-for-libnl3-genl.patch
> +++ /dev/null
> @@ -1,43 +0,0 @@
> -From: Neil Horman <nhor...@tuxdriver.com>
> -Date: Wed, 20 May 2020 07:08:47 -0400
> -Subject: [PATCH] Fix configure for libnl3-genl
> -
> -Apparently, way back when we wrote the configure script, we included a
> -package check for libnl, but not libnl3-genl (ostensibly because it
> -didn't exist I think), and so we hardcoded linking to -lnl3-genl.  The
> -pkg-config file for that library exists now, so lets actually test for
> -it during the running of configure, and use its output during make
> -
> -Signed-off-by: Neil Horman <nhor...@tuxdriver.com>
> ----
> - configure.ac    | 1 +
> - src/Makefile.am | 4 ++--
> - 2 files changed, 3 insertions(+), 2 deletions(-)
> -
> -diff --git a/configure.ac b/configure.ac
> -index ad917022eb82..278da5479152 100644
> ---- a/configure.ac
> -+++ b/configure.ac
> -@@ -14,6 +14,7 @@ AC_PROG_AWK
> - AC_CHECK_FUNCS(getopt_long)
> - 
> - PKG_CHECK_MODULES([LIBNL3], [libnl-3.0], [], [AC_MSG_ERROR([libnl-3.0 is 
> required])])
> -+PKG_CHECK_MODULES([LIBNLG3], [libnl-genl-3.0], [], 
> [AC_MSG_ERROR([libnl-genl-3.0 is required])])
> - # Fallback on using -lreadline as readline.pc is only available since 
> version 8.0
> - PKG_CHECK_MODULES([READLINE], [readline], [], [READLINE_LIBS=-lreadline])
> - PKG_CHECK_MODULES([LIBPCAP], [libpcap], [], [
> -diff --git a/src/Makefile.am b/src/Makefile.am
> -index a324fd36eb9e..f56a39dcf274 100644
> ---- a/src/Makefile.am
> -+++ b/src/Makefile.am
> -@@ -1,8 +1,8 @@
> - 
> - bin_PROGRAMS = dropwatch dwdump
> - 
> --AM_CFLAGS = -g -Wall -Werror $(LIBNL3_CFLAGS) $(READLINE_CFLAGS)
> --AM_LDFLAGS = $(LIBNL3_LIBS) -lnl-genl-3 $(READLINE_LIBS) -lpcap
> -+AM_CFLAGS = -g -Wall -Werror $(LIBNL3_CFLAGS) $(LIBNLG3_CFLAGS) 
> $(READLINE_CFLAGS)
> -+AM_LDFLAGS = $(LIBNL3_LIBS) $(LIBNLG3_LIBS) $(READLINE_LIBS) -lpcap
> - AM_CPPFLAGS = -D_GNU_SOURCE
> - 
> - dropwatch_SOURCES = main.c lookup.c lookup_kas.c
> diff --git 
> a/patches/dropwatch-1.5.3/0003-Fix-compilation-error-with-gcc-11.patch 
> b/patches/dropwatch-1.5.3/0003-Fix-compilation-error-with-gcc-11.patch
> deleted file mode 100644
> index febc9e19b6f2..000000000000
> --- a/patches/dropwatch-1.5.3/0003-Fix-compilation-error-with-gcc-11.patch
> +++ /dev/null
> @@ -1,35 +0,0 @@
> -From: Ido Schimmel <ido...@nvidia.com>
> -Date: Wed, 26 May 2021 21:00:04 +0300
> -Subject: [PATCH] Fix compilation error with gcc 11
> -MIME-Version: 1.0
> -Content-Type: text/plain; charset=UTF-8
> -Content-Transfer-Encoding: 8bit
> -
> -Fix following compilation error:
> -
> -lookup_bfd.c: In function ‘lookup_bfd_init’:
> -lookup_bfd.c:39:54: error: ‘sprintf’ may write a terminating nul past the 
> end of the destination [-Werror=format-overflow=]
> -   39 |         sprintf(dbibuf,"/usr/lib/debug/lib/modules/%s", uts.release);
> -      |                                                      ^
> -lookup_bfd.c:39:9: note: ‘sprintf’ output between 28 and 287 bytes into a 
> destination of size 286
> -   39 |         sprintf(dbibuf,"/usr/lib/debug/lib/modules/%s", uts.release);
> -      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> -
> -Signed-off-by: Ido Schimmel <ido...@nvidia.com>
> ----
> - src/lookup_bfd.c | 2 +-
> - 1 file changed, 1 insertion(+), 1 deletion(-)
> -
> -diff --git a/src/lookup_bfd.c b/src/lookup_bfd.c
> -index 8fa4833d8070..e09dc3f2ddc0 100644
> ---- a/src/lookup_bfd.c
> -+++ b/src/lookup_bfd.c
> -@@ -35,7 +35,7 @@ static int lookup_bfd_init(void)
> -     if(uname(&uts)<0)
> -             return-1;
> - 
> --    dbibuf = malloc(strlen("/usr/lib/debug/lib/modules") + 
> strlen(uts.release) + 1);
> -+    dbibuf = malloc(strlen("/usr/lib/debug/lib/modules/") + 
> strlen(uts.release) + 1);
> -     sprintf(dbibuf,"/usr/lib/debug/lib/modules/%s", uts.release);
> -     if (stat(dbibuf,&sb) < 0) {
> -             free(dbibuf);
> diff --git 
> a/patches/dropwatch-1.5.3/0004-Fix-compilation-error-with-gcc-12.patch 
> b/patches/dropwatch-1.5.3/0004-Fix-compilation-error-with-gcc-12.patch
> deleted file mode 100644
> index 4b61fe1808cf..000000000000
> --- a/patches/dropwatch-1.5.3/0004-Fix-compilation-error-with-gcc-12.patch
> +++ /dev/null
> @@ -1,44 +0,0 @@
> -From: Hangbin Liu <liuhang...@gmail.com>
> -Date: Wed, 26 Jan 2022 11:06:56 +0800
> -Subject: [PATCH] Fix compilation error with gcc 12
> -
> -With gcc 12, there is a warning:
> -
> -lookup_bfd.c: In function 'lookup_bfd_init':
> -lookup_bfd.c:39:52: error: '%s' directive writing up to 389 bytes into a 
> region of size 260 [-Werror=format-overflow=]
> -   39 |         sprintf(dbibuf,"/usr/lib/debug/lib/modules/%s", uts.release);
> -      |                                                    ^~   ~~~~~~~~~~~
> -In file included from /usr/include/stdio.h:894,
> -                 from lookup_bfd.c:14:
> -In function 'sprintf',
> -    inlined from 'lookup_bfd_init' at lookup_bfd.c:39:2:
> -/usr/include/bits/stdio2.h:38:10: note: '__sprintf_chk' output between 28 
> and 417 bytes into a destination of size 287
> -   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
> -      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> -   39 |                                   __glibc_objsize (__s), __fmt,
> -      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> -   40 |                                   __va_arg_pack ());
> -      |                                   ~~~~~~~~~~~~~~~~~
> -
> -Fix it by using sizeof() instead of strlen() to get the total size of
> -uts.release. Remove the last +1 since sizeof() will include the last NULL
> -character.
> -
> -Signed-off-by: Hangbin Liu <liuhang...@gmail.com>
> ----
> - src/lookup_bfd.c | 2 +-
> - 1 file changed, 1 insertion(+), 1 deletion(-)
> -
> -diff --git a/src/lookup_bfd.c b/src/lookup_bfd.c
> -index e09dc3f2ddc0..fdd32c28fc95 100644
> ---- a/src/lookup_bfd.c
> -+++ b/src/lookup_bfd.c
> -@@ -35,7 +35,7 @@ static int lookup_bfd_init(void)
> -     if(uname(&uts)<0)
> -             return-1;
> - 
> --    dbibuf = malloc(strlen("/usr/lib/debug/lib/modules/") + 
> strlen(uts.release) + 1);
> -+    dbibuf = malloc(strlen("/usr/lib/debug/lib/modules/") + 
> sizeof(uts.release));
> -     sprintf(dbibuf,"/usr/lib/debug/lib/modules/%s", uts.release);
> -     if (stat(dbibuf,&sb) < 0) {
> -             free(dbibuf);
> diff --git a/patches/dropwatch-1.5.3/series b/patches/dropwatch-1.5.3/series
> deleted file mode 100644
> index 133d2e102f67..000000000000
> --- a/patches/dropwatch-1.5.3/series
> +++ /dev/null
> @@ -1,7 +0,0 @@
> -# generated by git-ptx-patches
> -#tag:base --start-number 1
> -0001-Fix-build-issue-when-compiling-with-Wcast-align.patch
> -0002-Fix-configure-for-libnl3-genl.patch
> -0003-Fix-compilation-error-with-gcc-11.patch
> -0004-Fix-compilation-error-with-gcc-12.patch
> -# 0bdb18723e433fa329543ad35fcad562  - git-ptx-patches magic
> diff --git a/patches/dropwatch-1.5.3/autogen.sh 
> b/patches/dropwatch-1.5.4/autogen.sh
> similarity index 100%
> rename from patches/dropwatch-1.5.3/autogen.sh
> rename to patches/dropwatch-1.5.4/autogen.sh
> diff --git a/rules/dropwatch.make b/rules/dropwatch.make
> index 479437f77808..3bf7190b7140 100644
> --- a/rules/dropwatch.make
> +++ b/rules/dropwatch.make
> @@ -14,8 +14,8 @@ PACKAGES-$(PTXCONF_DROPWATCH) += dropwatch
>  #
>  # Paths and names
>  #
> -DROPWATCH_VERSION    := 1.5.3
> -DROPWATCH_MD5                := 64527bb669393e45b9b21f0b91c574c0
> +DROPWATCH_VERSION    := 1.5.4
> +DROPWATCH_MD5                := 94d03b47f424924cf24f21dad941a473
>  DROPWATCH            := dropwatch-$(DROPWATCH_VERSION)
>  DROPWATCH_SUFFIX     := tar.gz
>  DROPWATCH_URL                := 
> https://github.com/nhorman/dropwatch/archive/v$(DROPWATCH_VERSION).${DROPWATCH_SUFFIX}

Reply via email to