Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Oct 2020 14:42:38 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r550840 - in head/net/ngrep: . files
Message-ID:  <202010011442.091EgcCW061698@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Thu Oct  1 14:42:38 2020
New Revision: 550840
URL: https://svnweb.freebsd.org/changeset/ports/550840

Log:
  Fix ipv6
  
  Incorporate a patch from debian/ubuntu
  
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=615138
  https://bugs.launchpad.net/ubuntu/+source/ngrep/+bug/567286
  
  PR:		250027
  Submitted by:	Laurent Frigault <freebsdbugzilla@agneau.org>

Added:
  head/net/ngrep/files/patch-fix-ipv6   (contents, props changed)
Modified:
  head/net/ngrep/Makefile

Modified: head/net/ngrep/Makefile
==============================================================================
--- head/net/ngrep/Makefile	Thu Oct  1 14:22:50 2020	(r550839)
+++ head/net/ngrep/Makefile	Thu Oct  1 14:42:38 2020	(r550840)
@@ -3,7 +3,7 @@
 
 PORTNAME=	ngrep
 PORTVERSION=	1.45
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	net security
 MASTER_SITES=	SF
 

Added: head/net/ngrep/files/patch-fix-ipv6
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/ngrep/files/patch-fix-ipv6	Thu Oct  1 14:42:38 2020	(r550840)
@@ -0,0 +1,39 @@
+--- ngrep.c	2010-04-21 12:16:52.000000000 +0200
++++ ngrep.c	2010-04-21 12:11:49.581088102 +0200
+@@ -711,10 +711,12 @@ void process(u_char *d, struct pcap_pkth
+             data = (unsigned char *)(tcp_pkt) + tcphdr_offset;
+             len -= link_offset + ip_hl + tcphdr_offset;
+ 
++/* 
+ #if USE_IPv6
+             if (ip_ver == 6)
+                 len -= ntohs(ip6_pkt->ip6_plen);
+-#endif
++#endif 
++*/
+ 
+             if ((int32_t)len < 0)
+                 len = 0;
+@@ -731,11 +733,12 @@ void process(u_char *d, struct pcap_pkth
+             data = (unsigned char *)(udp_pkt) + udphdr_offset;
+             len -= link_offset + ip_hl + udphdr_offset;
+ 
++/*
+ #if USE_IPv6
+             if (ip_ver == 6)
+                 len -= ntohs(ip6_pkt->ip6_plen);
+ #endif
+-
++*/
+             if ((int32_t)len < 0)
+                 len = 0;
+ 
+@@ -769,7 +772,7 @@ void process(u_char *d, struct pcap_pkth
+             uint16_t icmp6hdr_offset    = (frag_offset) ? 0 : 4;
+ 
+             data = (unsigned char *)(icmp6_pkt) + icmp6hdr_offset;
+-            len -= link_offset + ip_hl + ntohs(ip6_pkt->ip6_plen) + icmp6hdr_offset;
++            len -= link_offset + ip_hl + icmp6hdr_offset;
+ 
+             if ((int32_t)len < 0)
+                 len = 0;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202010011442.091EgcCW061698>