From 4bdf55d35248500efd41e5f7b61c428d3a22db85 Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Sat, 15 Jul 2023 19:03:30 +0300 Subject: [PATCH] softflowd: bump to 1.1.0 The tag is now prefixed with v; update PKG_SOURCE_URL and PKG_BUILD_DIR to reflect this. Drop upstreamed patches. Refresh leftover patch. Signed-off-by: Stijn Tintel --- net/softflowd/Makefile | 10 +- net/softflowd/patches/010-bzero.patch | 134 ------------------ net/softflowd/patches/020-uid.patch | 11 -- .../030-Use-lld-for-time_t-always.patch | 4 +- 4 files changed, 7 insertions(+), 152 deletions(-) delete mode 100644 net/softflowd/patches/010-bzero.patch delete mode 100644 net/softflowd/patches/020-uid.patch diff --git a/net/softflowd/Makefile b/net/softflowd/Makefile index a8d1982d58..2a133b604a 100644 --- a/net/softflowd/Makefile +++ b/net/softflowd/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=softflowd -PKG_VERSION:=1.0.0 -PKG_RELEASE:=5 +PKG_VERSION:=1.1.0 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/irino/softflowd/tar.gz/softflowd-$(PKG_VERSION)? -PKG_HASH:=98aa66026d730211b45fe89670cd6ce50959846d536880b82f5afbca6281e108 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-softflowd-$(PKG_VERSION) +PKG_SOURCE_URL:=https://codeload.github.com/irino/softflowd/tar.gz/softflowd-v$(PKG_VERSION)? +PKG_HASH:=68d36a21895d0b155b27c718c4b79cc304a4de92d591d73887ccfd74f90f4ffc +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_NAME)-v$(PKG_VERSION) PKG_MAINTAINER:=Ross Vandegrift PKG_LICENSE:=BSD-3-Clause diff --git a/net/softflowd/patches/010-bzero.patch b/net/softflowd/patches/010-bzero.patch deleted file mode 100644 index a67f6f34e6..0000000000 --- a/net/softflowd/patches/010-bzero.patch +++ /dev/null @@ -1,134 +0,0 @@ ---- a/freelist.c -+++ b/freelist.c -@@ -46,7 +46,7 @@ freelist_init(struct freelist *fl, size_ - { - size_t sizeof_fl = sizeof(fl); - FLOGIT((LOG_DEBUG, "%s: %s(%p, %zu)", __func__, __func__, fl, allocsz)); -- bzero(fl, sizeof_fl); -+ memset(fl, 0, sizeof_fl); - fl->allocsz = roundup(allocsz, FREELIST_ALLOC_ALIGN); - fl->free_entries = NULL; - } ---- a/ipfix.c -+++ b/ipfix.c -@@ -388,7 +388,7 @@ ipfix_init_template_unity (struct FLOWTR - u_int8_t icmp_flag, u_int8_t bi_flag, - u_int16_t version) { - u_int index = 0, bi_index = 0, length = 0; -- bzero (template, sizeof (*template)); -+ memset (template, 0, sizeof (*template)); - template->h.c.set_id = htons (version == 10 ? - IPFIX_TEMPLATE_SET_ID : - NFLOW9_TEMPLATE_SET_ID); -@@ -510,7 +510,7 @@ nflow9_init_option (u_int16_t ifidx, str - NFLOW9_SOFTFLOWD_OPTION_TEMPLATE_NRECORDS * - sizeof (struct IPFIX_FIELD_SPECIFIER); - -- bzero (&option_template, sizeof (option_template)); -+ memset (&option_template, 0, sizeof (option_template)); - option_template.h.c.set_id = htons (NFLOW9_OPTION_TEMPLATE_SET_ID); - option_template.h.c.length = - htons (sizeof (option_template.h) + scope_len + opt_len); -@@ -524,7 +524,7 @@ nflow9_init_option (u_int16_t ifidx, str - ipfix_init_fields (option_template.r, &option_index, - field_nf9option, - NFLOW9_SOFTFLOWD_OPTION_TEMPLATE_NRECORDS); -- bzero (&nf9opt_data, sizeof (nf9opt_data)); -+ memset (&nf9opt_data, 0, sizeof (nf9opt_data)); - nf9opt_data.c.set_id = htons (IPFIX_SOFTFLOWD_OPTION_TEMPLATE_ID); - nf9opt_data.c.length = htons (sizeof (nf9opt_data)); - nf9opt_data.scope_ifidx = htonl (ifidx); -@@ -536,7 +536,7 @@ nflow9_init_option (u_int16_t ifidx, str - static void - ipfix_init_option (struct timeval *system_boot_time, struct OPTION *option) { - u_int scope_index = 0, option_index = 0; -- bzero (&option_template, sizeof (option_template)); -+ memset (&option_template, 0, sizeof (option_template)); - option_template.h.c.set_id = htons (IPFIX_OPTION_TEMPLATE_SET_ID); - option_template.h.c.length = htons (sizeof (option_template)); - option_template.h.u.i.r.template_id = -@@ -553,7 +553,7 @@ ipfix_init_option (struct timeval *syste - ipfix_init_fields (option_template.r, &option_index, field_option, - IPFIX_SOFTFLOWD_OPTION_TEMPLATE_NRECORDS); - -- bzero (&option_data, sizeof (option_data)); -+ memset (&option_data, 0, sizeof (option_data)); - option_data.c.set_id = htons (IPFIX_SOFTFLOWD_OPTION_TEMPLATE_ID); - option_data.c.length = htons (sizeof (option_data)); - option_data.scope_pid = htonl ((u_int32_t) option->meteringProcessId); -@@ -809,7 +809,7 @@ send_ipfix_common (struct FLOW **flows, - - last_valid = num_packets = 0; - for (j = 0; j < num_flows;) { -- bzero (packet, sizeof (packet)); -+ memset (packet, 0, sizeof (packet)); - if (version == 10) { - ipfix = (struct IPFIX_HEADER *) packet; - ipfix->version = htons (version); ---- a/netflow9.c -+++ b/netflow9.c -@@ -145,7 +145,7 @@ static int nf9_pkts_until_template = -1; - - static void - nf9_init_template (void) { -- bzero (&v4_template, sizeof (v4_template)); -+ memset (&v4_template, 0, sizeof (v4_template)); - v4_template.h.c.flowset_id = htons (NFLOW9_TEMPLATE_SET_ID); - v4_template.h.c.length = htons (sizeof (v4_template)); - v4_template.h.template_id = htons (NF9_SOFTFLOWD_V4_TEMPLATE_ID); -@@ -182,7 +182,7 @@ nf9_init_template (void) { - v4_template.r[14].length = htons (2); - v4_template.r[15].type = htons (NF9_SRC_VLAN); - v4_template.r[15].length = htons (2); -- bzero (&v6_template, sizeof (v6_template)); -+ memset (&v6_template, 0, sizeof (v6_template)); - v6_template.h.c.flowset_id = htons (NFLOW9_TEMPLATE_SET_ID); - v6_template.h.c.length = htons (sizeof (v6_template)); - v6_template.h.template_id = htons (NF9_SOFTFLOWD_V6_TEMPLATE_ID); -@@ -223,7 +223,7 @@ nf9_init_template (void) { - - static void - nf9_init_option (u_int16_t ifidx, struct OPTION *option) { -- bzero (&option_template, sizeof (option_template)); -+ memset (&option_template, 0, sizeof (option_template)); - option_template.h.c.flowset_id = htons (NFLOW9_OPTION_TEMPLATE_SET_ID); - option_template.h.c.length = htons (sizeof (option_template)); - option_template.h.template_id = htons (NF9_SOFTFLOWD_OPTION_TEMPLATE_ID); -@@ -238,7 +238,7 @@ nf9_init_option (u_int16_t ifidx, struct - option_template.r[1].length = - htons (sizeof (option_data.sampling_algorithm)); - -- bzero (&option_data, sizeof (option_data)); -+ memset (&option_data, 0, sizeof (option_data)); - option_data.c.flowset_id = htons (NF9_SOFTFLOWD_OPTION_TEMPLATE_ID); - option_data.c.length = htons (sizeof (option_data)); - option_data.scope_ifidx = htonl (ifidx); -@@ -257,7 +257,7 @@ nf_flow_to_flowset (const struct FLOW *f - struct NF9_SOFTFLOWD_DATA_COMMON *dc[2]; - u_int freclen, ret_len, nflows; - -- bzero (d, sizeof (d)); -+ memset (d, 0, sizeof (d)); - *len_used = nflows = ret_len = 0; - switch (flow->af) { - case AF_INET: -@@ -363,7 +363,7 @@ send_netflow_v9 (struct SENDPARAMETER sp - - last_valid = num_packets = 0; - for (j = 0; j < num_flows;) { -- bzero (packet, sizeof (packet)); -+ memset (packet, 0, sizeof (packet)); - nf9 = (struct NFLOW9_HEADER *) packet; - - nf9->version = htons (9); ---- a/psamp.c -+++ b/psamp.c -@@ -51,7 +51,7 @@ static int psamp_pkts_until_template = - - static void - psamp_init_template (struct PSAMP_SOFTFLOWD_TEMPLATE *template_p) { - u_int index = 0; -- bzero (template_p, sizeof (*template_p)); -+ memset (template_p, 0, sizeof (*template_p)); - template_p->h.c.set_id = htons (IPFIX_TEMPLATE_SET_ID); - template_p->h.c.length = htons (sizeof (struct PSAMP_SOFTFLOWD_TEMPLATE)); - template_p->h.r.template_id = htons (PSAMP_SOFTFLOWD_TEMPLATE_ID); diff --git a/net/softflowd/patches/020-uid.patch b/net/softflowd/patches/020-uid.patch deleted file mode 100644 index fe2ea7c1ec..0000000000 --- a/net/softflowd/patches/020-uid.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/common.h -+++ b/common.h -@@ -179,7 +179,7 @@ struct ip6_ext { - - /* following lines are copy from unistd.h in Linux for avoidance warnings in compilation */ - #if defined(HAVE_SETRESGID) && !defined(_GNU_SOURCE) --extern int setresgid (__uid_t __ruid, __uid_t __euid, __uid_t __suid); -+extern int setresgid (uid_t __ruid, uid_t __euid, uid_t __suid); - #endif - #if defined(HAVE_SETRESUID) && !defined(_GNU_SOURCE) - extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid); diff --git a/net/softflowd/patches/030-Use-lld-for-time_t-always.patch b/net/softflowd/patches/030-Use-lld-for-time_t-always.patch index cedccedfe1..33d812e0b3 100644 --- a/net/softflowd/patches/030-Use-lld-for-time_t-always.patch +++ b/net/softflowd/patches/030-Use-lld-for-time_t-always.patch @@ -83,7 +83,7 @@ Signed-off-by: Sebastian Kemper --- a/softflowd.c +++ b/softflowd.c -@@ -306,14 +306,14 @@ format_flow (struct FLOW *flow) { +@@ -316,14 +316,14 @@ format_flow (struct FLOW *flow) { snprintf (buf, sizeof (buf), "seq:%" PRIu64 " [%s]:%hu <> [%s]:%hu proto:%u " "octets>:%u packets>:%u octets<:%u packets<:%u " @@ -101,7 +101,7 @@ Signed-off-by: Sebastian Kemper flow->tcp_flags[1], flow->ip6_flowlabel[0], flow->ip6_flowlabel[1], flow->vlanid[0], flow->vlanid[1], format_ethermac (flow->ethermac[0]), -@@ -1170,8 +1170,8 @@ dump_flows (struct FLOWTRACK *ft, FILE * +@@ -1194,8 +1194,8 @@ dump_flows (struct FLOWTRACK *ft, FILE * expiry->expires_at == 0 ? " (FORCED)" : ""); } else { fprintf (out, -- 2.30.2