libnids 1.23-2.1 NMU

James Cowgill jcowgill at debian.org
Sun Feb 26 17:05:36 UTC 2017


Control: tags -1 patch pending

Hi,

On 25/02/17 18:00, James Cowgill wrote:
> On 23/02/17 22:44, Marcos Fouces wrote:
>> I am agree with you, when i fix these bugs i will create a separate git
>> branch, cherry-pick only freeze-allowed changes and try to get a package
>> ready for stretch.
> 
> Ok. Since I can now get dsniff working, I will happily NMU this unless
> you want to do it.

Well now that I've collected all the fixes together and tested it, I'm
going to do the NMU anyway :)

Uploaded NMU attached.

Thanks,
James
-------------- next part --------------
diff -Nru libnids-1.23/debian/changelog libnids-1.23/debian/changelog
--- libnids-1.23/debian/changelog	2010-07-21 20:23:34.000000000 +0100
+++ libnids-1.23/debian/changelog	2017-02-26 16:25:37.000000000 +0000
@@ -1,3 +1,13 @@
+libnids (1.23-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix assembly of TCP streams on armhf by adding -fno-strict-aliasing.
+    (Closes: #851060)
+  * Fix use of "inline" with GCC >= 5 which causes undefined references in
+    applications linked against libnids. (Closes: #855602)
+
+ -- James Cowgill <jcowgill at debian.org>  Sun, 26 Feb 2017 16:25:37 +0000
+
 libnids (1.23-2) unstable; urgency=high
 
   * Update my email address (closes: #574042).
diff -Nru libnids-1.23/debian/patches/01_before-after.patch libnids-1.23/debian/patches/01_before-after.patch
--- libnids-1.23/debian/patches/01_before-after.patch	1970-01-01 01:00:00.000000000 +0100
+++ libnids-1.23/debian/patches/01_before-after.patch	2017-02-26 16:25:37.000000000 +0000
@@ -0,0 +1,52 @@
+Description: fix before and after declarations
+ Fix declarations of before and after functions so that they just happen in the header file to fix undefined references in libnids.so.
+Origin: upstream, http://downloads.sourceforge.net/project/libnids/libnids/1.24/libnids-1.24.tar.gz
+Bug-Debian: https://bugs.debian.org/855602
+Applied-Upstream: 1.24
+Last-Update: 2015-12-06
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/src/util.c
++++ b/src/util.c
+@@ -29,18 +29,6 @@ test_malloc(int x)
+   return ret;
+ }
+ 
+-inline int
+-before(u_int seq1, u_int seq2)
+-{
+-  return ((int)(seq1 - seq2) < 0);
+-}
+-
+-inline int
+-after(u_int seq1, u_int seq2)
+-{
+-  return ((int)(seq2 - seq1) < 0);
+-}
+-
+ void
+ register_callback(struct proc_node **procs, void (*x))
+ {
+--- a/src/util.h
++++ b/src/util.h
+@@ -23,8 +23,18 @@ struct lurker_node {
+ 
+ void nids_no_mem(char *);
+ char *test_malloc(int);
+-inline int before(u_int seq1, u_int seq2);
+-inline int after(u_int seq1, u_int seq2);
++
++static inline int
++before(u_int seq1, u_int seq2)
++{
++  return ((int)(seq1 - seq2) < 0);
++}
++
++static inline int
++after(u_int seq1, u_int seq2)
++{
++  return ((int)(seq2 - seq1) < 0);
++}
+ void register_callback(struct proc_node **procs, void (*x));
+ void unregister_callback(struct proc_node **procs, void (*x));
+ 
diff -Nru libnids-1.23/debian/patches/02_inline.patch libnids-1.23/debian/patches/02_inline.patch
--- libnids-1.23/debian/patches/02_inline.patch	1970-01-01 01:00:00.000000000 +0100
+++ libnids-1.23/debian/patches/02_inline.patch	2017-02-25 17:50:03.000000000 +0000
@@ -0,0 +1,45 @@
+Description: Fix more undefined references when using GCC-5.
+ Avoids making the functions ip_fast_csum, ip_compute_csum, my_tcp_check and
+ my_udp_check inline. See https://github.com/aol/moloch/issues/440 as well.
+Author: Robert Scheck <robert at fedoraproject.org>
+Origin: vendor, http://pkgs.fedoraproject.org/cgit/rpms/libnids.git/commit/?id=ecafb692f20e0acad555f66c3cc1646997a82dae
+Bug-Debian: https://bugs.debian.org/855602
+---
+This patch header follows DEP-3: https://dep.debian.net/deps/dep3/
+
+--- a/src/checksum.c
++++ b/src/checksum.c
+@@ -120,7 +120,7 @@ csum_partial(const u_char * buff, int le
+   By Jorge Cwik <jorge at laser.satlink.net>, adapted for linux by Arnt
+   Gulbrandsen.
+ */
+-inline u_short ip_fast_csum(u_char * iph, u_int ihl)
++u_short ip_fast_csum(u_char * iph, u_int ihl)
+ {
+   u_int sum;
+   if (dontchksum(((struct ip*)iph)->ip_src.s_addr))
+@@ -191,13 +191,13 @@ csum_tcpudp_magic(u_int saddr, u_int dad
+   this routine is used for miscellaneous IP-like checksums, mainly in
+   icmp.c
+ */
+-inline u_short
++u_short
+ ip_compute_csum(u_char * buff, int len)
+ {
+   return (csum_fold(csum_partial(buff, len, 0)));
+ }
+ 
+-inline u_short
++u_short
+ my_tcp_check(struct tcphdr *th, int len, u_int saddr, u_int daddr)
+ {
+   if (dontchksum(saddr))
+@@ -205,7 +205,7 @@ my_tcp_check(struct tcphdr *th, int len,
+   return csum_tcpudp_magic(saddr, daddr, len, IPPROTO_TCP,
+ 			   csum_partial((char *)th, len, 0));
+ }
+-inline u_short
++u_short
+ my_udp_check(void *u, int len, u_int saddr, u_int daddr)
+ {
+   if (dontchksum(saddr))
diff -Nru libnids-1.23/debian/patches/series libnids-1.23/debian/patches/series
--- libnids-1.23/debian/patches/series	2010-07-21 01:13:10.000000000 +0100
+++ libnids-1.23/debian/patches/series	2017-02-25 17:31:41.000000000 +0000
@@ -1 +1,3 @@
 debian-changes-1.23-2
+01_before-after.patch
+02_inline.patch
diff -Nru libnids-1.23/debian/rules libnids-1.23/debian/rules
--- libnids-1.23/debian/rules	2010-07-19 19:10:46.000000000 +0100
+++ libnids-1.23/debian/rules	2017-02-25 17:01:45.000000000 +0000
@@ -16,7 +16,7 @@
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
 
-CFLAGS = -Wall -g
+CFLAGS = -Wall -g -fno-strict-aliasing
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 	CFLAGS += -O0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-security-team/attachments/20170226/92ff2449/attachment.sig>


More information about the Pkg-security-team mailing list