Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Dec 2014 20:43:58 +0000 (UTC)
From:      Kurt Jaeger <pi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r374722 - in head/net-mgmt/p0f: . files
Message-ID:  <201412142043.sBEKhwuo093755@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pi
Date: Sun Dec 14 20:43:58 2014
New Revision: 374722
URL: https://svnweb.freebsd.org/changeset/ports/374722
QAT: https://qat.redports.org/buildarchive/r374722/

Log:
  net-mgmt/p0f: fix p0f-sendsyn
  
  Submitted by:	Anton Yuzhaninov <citrin@citrin.ru>

Added:
  head/net-mgmt/p0f/files/patch-p0f-sendsyn.c   (contents, props changed)
Modified:
  head/net-mgmt/p0f/Makefile

Modified: head/net-mgmt/p0f/Makefile
==============================================================================
--- head/net-mgmt/p0f/Makefile	Sun Dec 14 20:32:10 2014	(r374721)
+++ head/net-mgmt/p0f/Makefile	Sun Dec 14 20:43:58 2014	(r374722)
@@ -3,6 +3,7 @@
 
 PORTNAME=	p0f
 PORTVERSION=	3.08b
+PORTREVISION=	1
 CATEGORIES=	net-mgmt security
 MASTER_SITES=	http://lcamtuf.coredump.cx/p0f3/releases/ \
 		http://fossies.org/unix/privat/

Added: head/net-mgmt/p0f/files/patch-p0f-sendsyn.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/p0f/files/patch-p0f-sendsyn.c	Sun Dec 14 20:43:58 2014	(r374722)
@@ -0,0 +1,29 @@
+--- tools/p0f-sendsyn.c.orig	2012-01-14 18:01:02.000000000 +0000
++++ tools/p0f-sendsyn.c	2014-12-11 14:16:03.000000000 +0000
+@@ -122,7 +122,7 @@
+ int main(int argc, char** argv) {
+ 
+   static struct sockaddr_in sin;
+-  char one = 1;
++  int one = 1;
+   s32  sock;
+   u32  i;
+ 
+@@ -145,7 +145,7 @@
+ 
+   if (sock < 0) PFATAL("Can't open raw socket (you need to be root).");
+ 
+-  if (setsockopt(sock, IPPROTO_IP, IP_HDRINCL, (char*)&one, sizeof(char)))
++  if (setsockopt(sock, IPPROTO_IP, IP_HDRINCL, &one, sizeof(one)))
+     PFATAL("setsockopt() on raw socket failed.");
+ 
+   sin.sin_family = PF_INET;
+@@ -153,7 +153,7 @@
+   memcpy(&sin.sin_addr.s_addr, ip4->dst, 4);
+ 
+   ip4->ver_hlen  = 0x45;
+-  ip4->tot_len   = htons(MIN_TCP4 + 24);
++  ip4->tot_len   = MIN_TCP4 + 24; /* converted to network order in kernel */
+   ip4->ttl       = 192;
+   ip4->proto     = PROTO_TCP;
+ 



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