svn commit: r404909 - in head/net: hping hping-devel hping-devel/files hping/files

Kevin Lo kevlo at FreeBSD.org
Thu Dec 31 08:52:31 UTC 2015


On Thu, Dec 31, 2015 at 09:27:35AM +0100, John Marino wrote:
> 
> On 12/31/2015 7:18 AM, Kevin Lo wrote:
> > Author: kevlo
> > Date: Thu Dec 31 06:18:46 2015
> > New Revision: 404909
> > URL: https://svnweb.freebsd.org/changeset/ports/404909
> > 
> > Log:
> >   Mark this unbroken on FreeBSD < 1100030.
> >   
> >   Pointed out by:	mat
> 
> FYI, DragonFly got hit by this too:
> http://gitweb.dragonflybsd.org/dports.git/commitdiff/603761c67e1f37dcb6c34be5b223036b2ce74943
> 
> This commit is incorrect because it uses OSVERSION without checking
> OPSYS first.  Could you please change:
> .if (${OSVERSION} >= 1100030)
> to:
> .if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1100030
> 
> ?  The parentheses are not necessary.

Done, thanks.

> Thanks,
> John
> 
> 
> > 
> > Added:
> >   head/net/hping-devel/files/extra-patch-sendip.c
> >      - copied unchanged from r404908, head/net/hping-devel/files/patch-sendip.c
> >   head/net/hping/files/extra-patch-sendip.c
> >      - copied unchanged from r404908, head/net/hping/files/patch-sendip.c
> > Deleted:
> >   head/net/hping-devel/files/patch-sendip.c
> >   head/net/hping/files/patch-sendip.c
> > Modified:
> >   head/net/hping-devel/Makefile
> >   head/net/hping/Makefile
> > 
> > Modified: head/net/hping-devel/Makefile
> > ==============================================================================
> > --- head/net/hping-devel/Makefile	Thu Dec 31 06:04:45 2015	(r404908)
> > +++ head/net/hping-devel/Makefile	Thu Dec 31 06:18:46 2015	(r404909)
> > @@ -29,6 +29,12 @@ PORTEXAMPLES=	README apd.htcl apd2.htcl 
> >  		passivets.htcl ping.htcl raw.htcl show-tcpseq.htcl \
> >  		showled.htcl
> >  
> > +.include <bsd.port.pre.mk>
> > +
> > +.if (${OSVERSION} >= 1100030)
> > +EXTRA_PATCHES=	${FILESDIR}/extra-patch-sendip.c
> > +.endif
> > +
> >  do-install:
> >  	${INSTALL_PROGRAM} ${WRKSRC}/hping3 ${STAGEDIR}${PREFIX}/sbin/hping
> >  	${INSTALL_MAN} ${WRKSRC}/docs/hping3.8 ${STAGEDIR}${PREFIX}/man/man8/hping.8
> > @@ -43,4 +49,4 @@ do-install:
> >  .endfor
> >  	${INSTALL_DATA} ${PORTEXAMPLES:S|^|${WRKSRC}/lib/|} ${STAGEDIR}${EXAMPLESDIR}
> >  
> > -.include <bsd.port.mk>
> > +.include <bsd.port.post.mk>
> > 
> > Copied: head/net/hping-devel/files/extra-patch-sendip.c (from r404908, head/net/hping-devel/files/patch-sendip.c)
> > ==============================================================================
> > --- /dev/null	00:00:00 1970	(empty, because file is newly added)
> > +++ head/net/hping-devel/files/extra-patch-sendip.c	Thu Dec 31 06:18:46 2015	(r404909, copy of r404908, head/net/hping-devel/files/patch-sendip.c)
> > @@ -0,0 +1,33 @@
> > +--- sendip.c.orig	2003-08-01 21:28:07.000000000 +0800
> > ++++ sendip.c	2015-12-22 23:16:39.296072000 +0800
> > +@@ -48,12 +48,12 @@
> > + 	ip->ihl		= (IPHDR_SIZE + optlen + 3) >> 2;
> > + 	ip->tos		= ip_tos;
> > + 
> > +-#if defined OSTYPE_FREEBSD || defined OSTYPE_NETBSD || defined OSTYPE_BSDI
> > +-/* FreeBSD */
> > ++#if defined OSTYPE_NETBSD || defined OSTYPE_BSDI
> > + /* NetBSD */
> > + 	ip->tot_len	= packetsize;
> > + #else
> > + /* Linux */
> > ++/* FreeBSD */
> > + /* OpenBSD */
> > + 	ip->tot_len	= htons(packetsize);
> > + #endif
> > +@@ -73,13 +73,13 @@
> > + 			htons((unsigned short) src_id);
> > + 	}
> > + 
> > +-#if defined OSTYPE_FREEBSD || defined OSTYPE_NETBSD | defined OSTYPE_BSDI
> > +-/* FreeBSD */
> > ++#if defined OSTYPE_NETBSD | defined OSTYPE_BSDI
> > + /* NetBSD */
> > + 	ip->frag_off	|= more_fragments;
> > + 	ip->frag_off	|= fragoff >> 3;
> > + #else
> > + /* Linux */
> > ++/* FreeBSD */
> > + /* OpenBSD */
> > + 	ip->frag_off	|= htons(more_fragments);
> > + 	ip->frag_off	|= htons(fragoff >> 3); /* shift three flags bit */
> > 
> > Modified: head/net/hping/Makefile
> > ==============================================================================
> > --- head/net/hping/Makefile	Thu Dec 31 06:04:45 2015	(r404908)
> > +++ head/net/hping/Makefile	Thu Dec 31 06:18:46 2015	(r404909)
> > @@ -27,6 +27,12 @@ PORTDOCS=	AS-BACKDOOR HPING2-HOWTO.txt H
> >  
> >  OPTIONS_DEFINE=	DOCS
> >  
> > +.include <bsd.port.pre.mk>
> > +
> > +.if (${OSVERSION} >= 1100030)
> > +EXTRA_PATCHES=	${FILESDIR}/extra-patch-sendip.c
> > +.endif
> > +
> >  do-install:
> >  	${INSTALL_PROGRAM} ${WRKSRC}/hping2 ${STAGEDIR}${PREFIX}/sbin/hping
> >  	${INSTALL_MAN} ${WRKSRC}/docs/hping2.8 \
> > @@ -36,4 +42,4 @@ do-install:
> >  	${INSTALL_DATA} ${WRKSRC}/docs/${i} ${STAGEDIR}${DOCSDIR}
> >  .endfor
> >  
> > -.include <bsd.port.mk>
> > +.include <bsd.port.post.mk>
> > 
> > Copied: head/net/hping/files/extra-patch-sendip.c (from r404908, head/net/hping/files/patch-sendip.c)
> > ==============================================================================
> > --- /dev/null	00:00:00 1970	(empty, because file is newly added)
> > +++ head/net/hping/files/extra-patch-sendip.c	Thu Dec 31 06:18:46 2015	(r404909, copy of r404908, head/net/hping/files/patch-sendip.c)
> > @@ -0,0 +1,33 @@
> > +--- sendip.c.orig	2003-08-01 21:28:07.000000000 +0800
> > ++++ sendip.c	2015-12-22 23:16:39.296072000 +0800
> > +@@ -48,12 +48,12 @@
> > + 	ip->ihl		= (IPHDR_SIZE + optlen + 3) >> 2;
> > + 	ip->tos		= ip_tos;
> > + 
> > +-#if defined OSTYPE_FREEBSD || defined OSTYPE_NETBSD || defined OSTYPE_BSDI
> > +-/* FreeBSD */
> > ++#if defined OSTYPE_NETBSD || defined OSTYPE_BSDI
> > + /* NetBSD */
> > + 	ip->tot_len	= packetsize;
> > + #else
> > + /* Linux */
> > ++/* FreeBSD */
> > + /* OpenBSD */
> > + 	ip->tot_len	= htons(packetsize);
> > + #endif
> > +@@ -73,13 +73,13 @@
> > + 			htons((unsigned short) src_id);
> > + 	}
> > + 
> > +-#if defined OSTYPE_FREEBSD || defined OSTYPE_NETBSD | defined OSTYPE_BSDI
> > +-/* FreeBSD */
> > ++#if defined OSTYPE_NETBSD | defined OSTYPE_BSDI
> > + /* NetBSD */
> > + 	ip->frag_off	|= more_fragments;
> > + 	ip->frag_off	|= fragoff >> 3;
> > + #else
> > + /* Linux */
> > ++/* FreeBSD */
> > + /* OpenBSD */
> > + 	ip->frag_off	|= htons(more_fragments);
> > + 	ip->frag_off	|= htons(fragoff >> 3); /* shift three flags bit */
> > 
> 
> 


More information about the svn-ports-all mailing list