Re: [update] net/scapy 2.5.0

2023-04-21 Thread Alexander Bluhm
On Fri, Apr 21, 2023 at 08:05:29AM +, Laurent Cheylus wrote:
> Hi,
> 
> a simple update for net/scapy version 2.5.0 : update Makefile and 
> pkg/PLIST for this version.

The previous time when an update to scapy 2.4.5 was tried, it broke
a bunch of OpenBSD regress tests.

https://marc.info/?l=openbsd-ports&m=164581830726000&w=2

Could you test if /usr/src/regress/sbin/slaacd/ still works with
2.5.0?  Then I could help with the more complicated regress tests.

bluhm

> Changelog https://github.com/secdev/scapy/releases/tag/v2.5.0
> 
> Build and tests OK on current/amd64.
> 
> Comments welcome and please commit if OK.
> 
> Laurent
> 
> 

> Index: Makefile
> ===
> RCS file: /cvs/ports/net/scapy/Makefile,v
> retrieving revision 1.46
> diff -u -p -r1.46 Makefile
> --- Makefile  13 Nov 2022 19:37:45 -  1.46
> +++ Makefile  21 Apr 2023 07:54:12 -
> @@ -1,7 +1,6 @@
>  COMMENT =powerful interactive packet manipulation in python
>  
> -MODPY_EGG_VERSION =  2.4.4
> -REVISION =   4
> +MODPY_EGG_VERSION =  2.5.0
>  
>  DISTNAME =   scapy-${MODPY_EGG_VERSION}
>  
> Index: distinfo
> ===
> RCS file: /cvs/ports/net/scapy/distinfo,v
> retrieving revision 1.12
> diff -u -p -r1.12 distinfo
> --- distinfo  5 Nov 2020 14:49:02 -   1.12
> +++ distinfo  21 Apr 2023 07:54:12 -
> @@ -1,4 +1,4 @@
>  SHA256 (ethertypes-20120703) = 7Tj51kS+/IfrQahknDEAcyQNmozXWy+cEVtdnX5dAzw=
> -SHA256 (scapy-2.4.4.tar.gz) = 7P16FM2cPvDrCNKNW7cdlyGe3/FFTMvf8in2drJ5AO4=
> +SHA256 (scapy-2.5.0.tar.gz) = WyYMK3VP2NQJuoPueu4pTs27LCNfn3j+kLwRy25d68I=
>  SIZE (ethertypes-20120703) = 1362
> -SIZE (scapy-2.4.4.tar.gz) = 1039342
> +SIZE (scapy-2.5.0.tar.gz) = 1279162
> Index: pkg/PLIST
> ===
> RCS file: /cvs/ports/net/scapy/pkg/PLIST,v
> retrieving revision 1.15
> diff -u -p -r1.15 PLIST
> --- pkg/PLIST 13 Nov 2022 19:37:46 -  1.15
> +++ pkg/PLIST 21 Apr 2023 07:54:13 -
> @@ -2,7 +2,6 @@
>  @conflict scapy6-*
>  @pkgpath net/scapy,python3
>  @pkgpath net/scapy6
> -bin/UTscapy
>  bin/scapy
>  lib/python${MODPY_VERSION}/site-packages/scapy/
>  
> lib/python${MODPY_VERSION}/site-packages/scapy-${MODPY_EGG_VERSION}.dist-info/
> @@ -48,10 +47,10 @@ lib/python${MODPY_VERSION}/site-packages
>  
> lib/python${MODPY_VERSION}/site-packages/scapy/${MODPY_PYCACHE}data.${MODPY_PYC_MAGIC_TAG}pyc
>  
> lib/python${MODPY_VERSION}/site-packages/scapy/${MODPY_PYCACHE}error.${MODPY_PYC_MAGIC_TAG}${MODPY_PYOEXTENSION}
>  
> lib/python${MODPY_VERSION}/site-packages/scapy/${MODPY_PYCACHE}error.${MODPY_PYC_MAGIC_TAG}pyc
> -lib/python${MODPY_VERSION}/site-packages/scapy/${MODPY_PYCACHE}extlib.${MODPY_PYC_MAGIC_TAG}${MODPY_PYOEXTENSION}
> -lib/python${MODPY_VERSION}/site-packages/scapy/${MODPY_PYCACHE}extlib.${MODPY_PYC_MAGIC_TAG}pyc
>  
> lib/python${MODPY_VERSION}/site-packages/scapy/${MODPY_PYCACHE}fields.${MODPY_PYC_MAGIC_TAG}${MODPY_PYOEXTENSION}
>  
> lib/python${MODPY_VERSION}/site-packages/scapy/${MODPY_PYCACHE}fields.${MODPY_PYC_MAGIC_TAG}pyc
> +lib/python${MODPY_VERSION}/site-packages/scapy/${MODPY_PYCACHE}interfaces.${MODPY_PYC_MAGIC_TAG}${MODPY_PYOEXTENSION}
> +lib/python${MODPY_VERSION}/site-packages/scapy/${MODPY_PYCACHE}interfaces.${MODPY_PYC_MAGIC_TAG}pyc
>  
> lib/python${MODPY_VERSION}/site-packages/scapy/${MODPY_PYCACHE}main.${MODPY_PYC_MAGIC_TAG}${MODPY_PYOEXTENSION}
>  
> lib/python${MODPY_VERSION}/site-packages/scapy/${MODPY_PYCACHE}main.${MODPY_PYC_MAGIC_TAG}pyc
>  
> lib/python${MODPY_VERSION}/site-packages/scapy/${MODPY_PYCACHE}packet.${MODPY_PYC_MAGIC_TAG}${MODPY_PYOEXTENSION}
> @@ -91,10 +90,10 @@ lib/python${MODPY_VERSION}/site-packages
>  
> lib/python${MODPY_VERSION}/site-packages/scapy/arch/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc
>  
> lib/python${MODPY_VERSION}/site-packages/scapy/arch/${MODPY_PYCACHE}common.${MODPY_PYC_MAGIC_TAG}${MODPY_PYOEXTENSION}
>  
> lib/python${MODPY_VERSION}/site-packages/scapy/arch/${MODPY_PYCACHE}common.${MODPY_PYC_MAGIC_TAG}pyc
> +lib/python${MODPY_VERSION}/site-packages/scapy/arch/${MODPY_PYCACHE}libpcap.${MODPY_PYC_MAGIC_TAG}${MODPY_PYOEXTENSION}
> +lib/python${MODPY_VERSION}/site-packages/scapy/arch/${MODPY_PYCACHE}libpcap.${MODPY_PYC_MAGIC_TAG}pyc
>  
> lib/python${MODPY_VERSION}/site-packages/scapy/arch/${MODPY_PYCACHE}linux.${MODPY_PYC_MAGIC_TAG}${MODPY_PYOEXTENSION}
>  
> lib/python${MODPY_VERSION}/site-packages/scapy/arch/${MODPY_PYCACHE}linux.${MODPY_PYC_MAGIC_TAG}pyc
> -lib/python${MODPY_VERSION}/site-packages/scapy/arch/${MODPY_PYCACHE}pcapdnet.${MODPY_PYC_MAGIC_TAG}${MODPY_PYOEXTENSION}
> -lib/python${MODPY_VERSION}/site-packages/scapy/arch/${MODPY_PYCACHE}pcapdnet.${MODPY_PYC_MAGIC_TAG}pyc
>  
> lib/python${MODPY_VERSION}/site-packages/scapy/arch/${MODPY_PYCACHE}solaris.${MODPY_PYC_MAGIC_TAG}${MODPY_PYOEXTENSION}
>  
> lib/python${MODPY_VERSION}/site-packages/scapy/arc

Re: UPDATE: net/scapy

2022-02-25 Thread Alexander Bluhm
On Fri, Feb 25, 2022 at 09:41:45AM +, Ricardo wrote:
> Attached is an update to net/scapy (changes: 
> https://github.com/secdev/scapy/releases/tag/v2.4.5).

I have the same diff in my home for a while.  But I never commited
it as it breaks regress tests.  I did not find time to look into it.

sys/net/pf_forward
sys/net/pf_fragment
sys/kern/sosplice/scapy
sys/net/pf_state
sys/netinet/arp 
sys/netinet/frag
sys/netinet/pmtu
sys/netinet6/frag6
sys/netinet6/nd6
sys/netinet6/rh0
sys/netinet6/rip6cksum
sbin/slaacd

I think the easiest one to run on a single machine is
/usr/src/regress/sbin/slaacd.  Please figure out what is wrong, the
we can integrate the update.

The tabs in the Makefile are according to
/usr/ports/infrastructure/templates/Makefile.template .  I order
and align all my ports that way to keep them consistent.

bluhm



Re: UPDATE: net/scapy

2022-02-25 Thread Stuart Henderson
On 2022/02/25 12:18, Ricardo wrote:
> Do you mean indentation? I like to keep everything aligned. It's also easier 
> to read. I use tabs though.

And other people don't like to have loads of horizontal space ;)



Re: UPDATE: net/scapy

2022-02-25 Thread Stuart Henderson
On 2022/02/25 09:41, Ricardo wrote:
> Hey ports@,
> 
> Attached is an update to net/scapy (changes: 
> https://github.com/secdev/scapy/releases/tag/v2.4.5).
> 
> Tested on amd64.
> 
> Obrigado.
> ~Ricardo


Oh, the ".if ${PROPERTIES:Mcxx11}" should change to ".if ${PROPERTIES:Mrust}"

btw you can use "cvs add" and "cvs rm" to add/remove files even against
anoncvs, then a diff with "cvs diff -uNp" will include those changes.

Otherwise I will leave this to bluhm@, however it is not usually helpful to
fiddle with whitespace in a simple update to a port.



Re: update net/scapy

2016-01-31 Thread Daniel Jakots
On Sun, 24 Jan 2016 16:10:03 +0100, Daniel Jakots
 wrote:

ping ?

> On Fri, 22 Jan 2016 14:44:48 +, Stuart Henderson
>  wrote:
> 
> > There's this code in lib/scapy/arch/unix.py:in6_getifaddr which
> > calls "ifconfig -l" which is expecting to see a list of interfaces:
> > 
> > # List all network interfaces
> > try:
> > f = os.popen("%s -l" % conf.prog.ifconfig)
> > except OSError,msg:
> > log_interactive.warning("Failed to execute ifconfig.")
> > return []  
> 
> Indeed, thanks for spotting that.
> I fixed the problem (and it's merged upstream).
> 
> > and it looks like it's also not parsing the "netstat -rn -f inet6"
> > output correctly in the function below that one. Could you take
> > a look please Daniel?  
> 
> I looked at it and did some print debugging but AFAIU the code but it
> seems ok, so I don't know?
> 
> 
> With this updated diff, I removed what was in the patch
> patches/patch-scapy_arch_unix_py because what it does is looking for
> "L" in the Prio column in `netstat -rn -finet` but a L shouldn't be
> there.
> 
> I also backported a diff from upstream to fix make test. Now make test
> doesn't need to be killed. Without root it's PASSED=760 FAILED=7 and
> with root it's even PASSED=767 FAILED=0 \o/
> 
> Cheers,
> Daniel



Re: update net/scapy

2016-01-24 Thread Daniel Jakots
On Fri, 22 Jan 2016 14:44:48 +, Stuart Henderson
 wrote:

> There's this code in lib/scapy/arch/unix.py:in6_getifaddr which
> calls "ifconfig -l" which is expecting to see a list of interfaces:
> 
> # List all network interfaces
> try:
> f = os.popen("%s -l" % conf.prog.ifconfig)
> except OSError,msg:
> log_interactive.warning("Failed to execute ifconfig.")
> return []

Indeed, thanks for spotting that.
I fixed the problem (and it's merged upstream).

> and it looks like it's also not parsing the "netstat -rn -f inet6"
> output correctly in the function below that one. Could you take
> a look please Daniel?

I looked at it and did some print debugging but AFAIU the code but it
seems ok, so I don't know?


With this updated diff, I removed what was in the patch
patches/patch-scapy_arch_unix_py because what it does is looking for
"L" in the Prio column in `netstat -rn -finet` but a L shouldn't be
there.

I also backported a diff from upstream to fix make test. Now make test
doesn't need to be killed. Without root it's PASSED=760 FAILED=7 and
with root it's even PASSED=767 FAILED=0 \o/

Cheers,
Daniel

Index: Makefile
===
RCS file: /cvs/ports/net/scapy/Makefile,v
retrieving revision 1.20
diff -u -p -r1.20 Makefile
--- Makefile16 Feb 2015 22:57:11 -  1.20
+++ Makefile24 Jan 2016 15:02:18 -
@@ -2,9 +2,12 @@
 
 COMMENT=   powerful interactive packet manipulation in python
 
-MODPY_EGG_VERSION= 2.1.0
+MODPY_EGG_VERSION= 2.3.2
 DISTNAME=  scapy-${MODPY_EGG_VERSION}
-REVISION=  2
+
+GH_ACCOUNT=secdev
+GH_PROJECT=scapy
+GH_TAGNAME=v${MODPY_EGG_VERSION}
 
 CATEGORIES=net
 
@@ -15,8 +18,8 @@ MAINTAINER=   Jonathan Armani https://spacehopper.org/mirrors/
+DISTFILES= ${DISTNAME}.tar.gz ethertypes-20120703:0
 EXTRACT_ONLY=  ${DISTNAME}${EXTRACT_SUFX}
 
 MODULES=   lang/python
@@ -32,12 +35,12 @@ post-extract:
gunzip ${WRKSRC}/doc/scapy.1.gz
 
 pre-configure:
-   perl -p -i -e "s,/etc/ethertypes,${SYSCONFDIR}/ethertypes,g" \
+   sed -i "s,/etc/ethertypes,${SYSCONFDIR}/ethertypes,g" \
${WRKSRC}/scapy/data.py
 
 post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/scapy
-   ${INSTALL_DATA} ${DISTDIR}/ethertypes ${PREFIX}/share/examples/scapy
+   ${INSTALL_DATA} ${DISTDIR}/ethertypes-20120703 
${PREFIX}/share/examples/scapy/ethertypes
 
 # some tests require root.
 do-test:
Index: distinfo
===
RCS file: /cvs/ports/net/scapy/distinfo,v
retrieving revision 1.6
diff -u -p -r1.6 distinfo
--- distinfo18 Jan 2015 03:14:52 -  1.6
+++ distinfo24 Jan 2016 15:02:18 -
@@ -1,4 +1,4 @@
-SHA256 (ethertypes) = 4UAHHkYt+Kq597Y6OWW/IGeX7Lz/M0o+xJQlbe/jXcs=
-SHA256 (scapy-2.1.0.tar.gz) = Q8ojOwz8lQQBGT4nAuoy7h3YPUurZxNx4yKntsUidbo=
-SIZE (ethertypes) = 1317
-SIZE (scapy-2.1.0.tar.gz) = 956785
+SHA256 (ethertypes-20120703) = 7Tj51kS+/IfrQahknDEAcyQNmozXWy+cEVtdnX5dAzw=
+SHA256 (scapy-2.3.2.tar.gz) = G4qG1of+uO0BEUwMAWtChnTL/sBOPrb1JJoBjEJ8T2o=
+SIZE (ethertypes-20120703) = 1362
+SIZE (scapy-2.3.2.tar.gz) = 1166056
Index: patches/patch-scapy_arch_pcapdnet_py
===
RCS file: patches/patch-scapy_arch_pcapdnet_py
diff -N patches/patch-scapy_arch_pcapdnet_py
--- patches/patch-scapy_arch_pcapdnet_py5 Oct 2010 09:18:05 -   
1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,12 +0,0 @@
-$OpenBSD: patch-scapy_arch_pcapdnet_py,v 1.1 2010/10/05 09:18:05 armani Exp $
 scapy/arch/pcapdnet.py.origTue Oct  5 10:14:39 2010
-+++ scapy/arch/pcapdnet.py Tue Oct  5 10:16:27 2010
-@@ -63,6 +63,8 @@ if conf.use_pcap:
- return ts,pkt
- def __getattr__(self, attr):
- return getattr(self.pcap, attr)
-+def __del__(self):
-+os.close(self.pcap.fileno())
- open_pcap = lambda *args,**kargs: 
_PcapWrapper_libpcap(*args,**kargs)
- elif hasattr(pcap,"open_live"): # python-pcapy
- class _PcapWrapper_pcapy:
Index: patches/patch-scapy_arch_unix_py
===
RCS file: /cvs/ports/net/scapy/patches/patch-scapy_arch_unix_py,v
retrieving revision 1.1
diff -u -p -r1.1 patch-scapy_arch_unix_py
--- patches/patch-scapy_arch_unix_py1 Oct 2009 16:28:49 -   1.1
+++ patches/patch-scapy_arch_unix_py24 Jan 2016 15:02:18 -
@@ -1,15 +1,45 @@
 $OpenBSD: patch-scapy_arch_unix_py,v 1.1 2009/10/01 16:28:49 sthen Exp $
 scapy/arch/unix.py.origTue Sep 29 20:25:02 2009
-+++ scapy/arch/unix.py Tue Sep 29 20:26:50 2009
-@@ -61,7 +61,10 @@ def read_routes():
- else:
- rt = l.split()
- dest,gw,flg = rt[:3]
--neti

Re: update net/scapy

2016-01-22 Thread Stuart Henderson
Oh, testing it sends packets OK for me, but it shows this at startup
(the PyX INFO line is expected/normal).

$ scapy
INFO: Can't import PyX. Won't be able to use psdump() or pdfdump().
usage: ifconfig [-AaC] [interface] [address_family] [address [dest_address]]
[parameters]
INFO: No IPv6 support in kernel
WARNING: No route found for IPv6 destination :: (no default route?)
Welcome to Scapy (2.3.2)

...

There's this code in lib/scapy/arch/unix.py:in6_getifaddr which
calls "ifconfig -l" which is expecting to see a list of interfaces:

# List all network interfaces
try:
f = os.popen("%s -l" % conf.prog.ifconfig)
except OSError,msg:
log_interactive.warning("Failed to execute ifconfig.")
return []

and it looks like it's also not parsing the "netstat -rn -f inet6"
output correctly in the function below that one. Could you take
a look please Daniel?



On 2016/01/22 15:21, Jonathan Armani wrote:
> Looks good to me too.
> 
> OK
> 
> 2016-01-22 14:00 GMT+01:00 Stuart Henderson :
> 
> > Looks good to me, OK with you Jonathan?
> >
> >
> > On 2016/01/22 13:37, Daniel Jakots wrote:
> > > On Thu, 21 Jan 2016 23:44:08 +, Stuart Henderson
> > >  wrote:
> > >
> > > > On 2016/01/21 21:52, Daniel Jakots wrote:
> > > > > -MASTER_SITES=${HOMEPAGE}/files/
> > > > > -DISTFILES=   ${DISTNAME}${EXTRACT_SUFX} ethertypes
> > > > > +MASTER_SITES0=   http://git.netfilter.org/ebtables/plain/
> > > > > +DISTFILES=   ${DISTNAME}.tar.gz ethertypes:0
> > > >
> > > > please give that ethertypes file a versioned name and don't
> > > > fetch it directly from the tip of a git repo. maybe mirror it?
> > >
> > > Sure. Thanks for mirroring it.
> > >
> > > Index: Makefile
> > > ===
> > > RCS file: /cvs/ports/net/scapy/Makefile,v
> > > retrieving revision 1.20
> > > diff -u -p -r1.20 Makefile
> > > --- Makefile  16 Feb 2015 22:57:11 -  1.20
> > > +++ Makefile  22 Jan 2016 12:19:55 -
> > > @@ -2,9 +2,12 @@
> > >
> > >  COMMENT= powerful interactive packet manipulation in python
> > >
> > > -MODPY_EGG_VERSION=   2.1.0
> > > +MODPY_EGG_VERSION=   2.3.2
> > >  DISTNAME=scapy-${MODPY_EGG_VERSION}
> > > -REVISION=2
> > > +
> > > +GH_ACCOUNT=  secdev
> > > +GH_PROJECT=  scapy
> > > +GH_TAGNAME=  v${MODPY_EGG_VERSION}
> > >
> > >  CATEGORIES=  net
> > >
> > > @@ -15,8 +18,8 @@ MAINTAINER= Jonathan Armani  > >  # GPLv2
> > >  PERMIT_PACKAGE_CDROM=Yes
> > >
> > > -MASTER_SITES=${HOMEPAGE}/files/
> > > -DISTFILES=   ${DISTNAME}${EXTRACT_SUFX} ethertypes
> > > +MASTER_SITES0=   https://spacehopper.org/mirrors/
> > > +DISTFILES=   ${DISTNAME}.tar.gz ethertypes-20120703:0
> > >  EXTRACT_ONLY=${DISTNAME}${EXTRACT_SUFX}
> > >
> > >  MODULES= lang/python
> > > @@ -32,12 +35,12 @@ post-extract:
> > >   gunzip ${WRKSRC}/doc/scapy.1.gz
> > >
> > >  pre-configure:
> > > - perl -p -i -e "s,/etc/ethertypes,${SYSCONFDIR}/ethertypes,g" \
> > > + sed -i "s,/etc/ethertypes,${SYSCONFDIR}/ethertypes,g" \
> > >   ${WRKSRC}/scapy/data.py
> > >
> > >  post-install:
> > >   ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/scapy
> > > - ${INSTALL_DATA} ${DISTDIR}/ethertypes
> > ${PREFIX}/share/examples/scapy
> > > + ${INSTALL_DATA} ${DISTDIR}/ethertypes-20120703
> > ${PREFIX}/share/examples/scapy/ethertypes
> > >
> > >  # some tests require root.
> > >  do-test:
> > > Index: distinfo
> > > ===
> > > RCS file: /cvs/ports/net/scapy/distinfo,v
> > > retrieving revision 1.6
> > > diff -u -p -r1.6 distinfo
> > > --- distinfo  18 Jan 2015 03:14:52 -  1.6
> > > +++ distinfo  22 Jan 2016 12:19:55 -
> > > @@ -1,4 +1,4 @@
> > > -SHA256 (ethertypes) = 4UAHHkYt+Kq597Y6OWW/IGeX7Lz/M0o+xJQlbe/jXcs=
> > > -SHA256 (scapy-2.1.0.tar.gz) =
> > Q8ojOwz8lQQBGT4nAuoy7h3YPUurZxNx4yKntsUidbo=
> > > -SIZE (ethertypes) = 1317
> > > -SIZE (scapy-2.1.0.tar.gz) = 956785
> > > +SHA256 (ethertypes-20120703) =
> > 7Tj51kS+/IfrQahknDEAcyQNmozXWy+cEVtdnX5dAzw=
> > > +SHA256 (scapy-2.3.2.tar.gz) =
> > G4qG1of+uO0BEUwMAWtChnTL/sBOPrb1JJoBjEJ8T2o=
> > > +SIZE (ethertypes-20120703) = 1362
> > > +SIZE (scapy-2.3.2.tar.gz) = 1166056
> > > Index: patches/patch-scapy_arch_pcapdnet_py
> > > ===
> > > RCS file: patches/patch-scapy_arch_pcapdnet_py
> > > diff -N patches/patch-scapy_arch_pcapdnet_py
> > > --- patches/patch-scapy_arch_pcapdnet_py  5 Oct 2010 09:18:05 -
> >  1.1
> > > +++ /dev/null 1 Jan 1970 00:00:00 -
> > > @@ -1,12 +0,0 @@
> > > -$OpenBSD: patch-scapy_arch_pcapdnet_py,v 1.1 2010/10/05 09:18:05 armani
> > Exp $
> > >  scapy/arch/pcapdnet.py.orig  Tue Oct  5 10:14:39 2010
> > > -+++ scapy/arch/pcapdnet.py   Tue Oct  5 10:16:27 2010
> > > -@@ -63,6 +63,8 @@ if conf.use_pcap:
> > > -

Re: update net/scapy

2016-01-22 Thread Jonathan Armani
Looks good to me too.

OK

2016-01-22 14:00 GMT+01:00 Stuart Henderson :

> Looks good to me, OK with you Jonathan?
>
>
> On 2016/01/22 13:37, Daniel Jakots wrote:
> > On Thu, 21 Jan 2016 23:44:08 +, Stuart Henderson
> >  wrote:
> >
> > > On 2016/01/21 21:52, Daniel Jakots wrote:
> > > > -MASTER_SITES=${HOMEPAGE}/files/
> > > > -DISTFILES=   ${DISTNAME}${EXTRACT_SUFX} ethertypes
> > > > +MASTER_SITES0=   http://git.netfilter.org/ebtables/plain/
> > > > +DISTFILES=   ${DISTNAME}.tar.gz ethertypes:0
> > >
> > > please give that ethertypes file a versioned name and don't
> > > fetch it directly from the tip of a git repo. maybe mirror it?
> >
> > Sure. Thanks for mirroring it.
> >
> > Index: Makefile
> > ===
> > RCS file: /cvs/ports/net/scapy/Makefile,v
> > retrieving revision 1.20
> > diff -u -p -r1.20 Makefile
> > --- Makefile  16 Feb 2015 22:57:11 -  1.20
> > +++ Makefile  22 Jan 2016 12:19:55 -
> > @@ -2,9 +2,12 @@
> >
> >  COMMENT= powerful interactive packet manipulation in python
> >
> > -MODPY_EGG_VERSION=   2.1.0
> > +MODPY_EGG_VERSION=   2.3.2
> >  DISTNAME=scapy-${MODPY_EGG_VERSION}
> > -REVISION=2
> > +
> > +GH_ACCOUNT=  secdev
> > +GH_PROJECT=  scapy
> > +GH_TAGNAME=  v${MODPY_EGG_VERSION}
> >
> >  CATEGORIES=  net
> >
> > @@ -15,8 +18,8 @@ MAINTAINER= Jonathan Armani  >  # GPLv2
> >  PERMIT_PACKAGE_CDROM=Yes
> >
> > -MASTER_SITES=${HOMEPAGE}/files/
> > -DISTFILES=   ${DISTNAME}${EXTRACT_SUFX} ethertypes
> > +MASTER_SITES0=   https://spacehopper.org/mirrors/
> > +DISTFILES=   ${DISTNAME}.tar.gz ethertypes-20120703:0
> >  EXTRACT_ONLY=${DISTNAME}${EXTRACT_SUFX}
> >
> >  MODULES= lang/python
> > @@ -32,12 +35,12 @@ post-extract:
> >   gunzip ${WRKSRC}/doc/scapy.1.gz
> >
> >  pre-configure:
> > - perl -p -i -e "s,/etc/ethertypes,${SYSCONFDIR}/ethertypes,g" \
> > + sed -i "s,/etc/ethertypes,${SYSCONFDIR}/ethertypes,g" \
> >   ${WRKSRC}/scapy/data.py
> >
> >  post-install:
> >   ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/scapy
> > - ${INSTALL_DATA} ${DISTDIR}/ethertypes
> ${PREFIX}/share/examples/scapy
> > + ${INSTALL_DATA} ${DISTDIR}/ethertypes-20120703
> ${PREFIX}/share/examples/scapy/ethertypes
> >
> >  # some tests require root.
> >  do-test:
> > Index: distinfo
> > ===
> > RCS file: /cvs/ports/net/scapy/distinfo,v
> > retrieving revision 1.6
> > diff -u -p -r1.6 distinfo
> > --- distinfo  18 Jan 2015 03:14:52 -  1.6
> > +++ distinfo  22 Jan 2016 12:19:55 -
> > @@ -1,4 +1,4 @@
> > -SHA256 (ethertypes) = 4UAHHkYt+Kq597Y6OWW/IGeX7Lz/M0o+xJQlbe/jXcs=
> > -SHA256 (scapy-2.1.0.tar.gz) =
> Q8ojOwz8lQQBGT4nAuoy7h3YPUurZxNx4yKntsUidbo=
> > -SIZE (ethertypes) = 1317
> > -SIZE (scapy-2.1.0.tar.gz) = 956785
> > +SHA256 (ethertypes-20120703) =
> 7Tj51kS+/IfrQahknDEAcyQNmozXWy+cEVtdnX5dAzw=
> > +SHA256 (scapy-2.3.2.tar.gz) =
> G4qG1of+uO0BEUwMAWtChnTL/sBOPrb1JJoBjEJ8T2o=
> > +SIZE (ethertypes-20120703) = 1362
> > +SIZE (scapy-2.3.2.tar.gz) = 1166056
> > Index: patches/patch-scapy_arch_pcapdnet_py
> > ===
> > RCS file: patches/patch-scapy_arch_pcapdnet_py
> > diff -N patches/patch-scapy_arch_pcapdnet_py
> > --- patches/patch-scapy_arch_pcapdnet_py  5 Oct 2010 09:18:05 -
>  1.1
> > +++ /dev/null 1 Jan 1970 00:00:00 -
> > @@ -1,12 +0,0 @@
> > -$OpenBSD: patch-scapy_arch_pcapdnet_py,v 1.1 2010/10/05 09:18:05 armani
> Exp $
> >  scapy/arch/pcapdnet.py.orig  Tue Oct  5 10:14:39 2010
> > -+++ scapy/arch/pcapdnet.py   Tue Oct  5 10:16:27 2010
> > -@@ -63,6 +63,8 @@ if conf.use_pcap:
> > - return ts,pkt
> > - def __getattr__(self, attr):
> > - return getattr(self.pcap, attr)
> > -+def __del__(self):
> > -+os.close(self.pcap.fileno())
> > - open_pcap = lambda *args,**kargs:
> _PcapWrapper_libpcap(*args,**kargs)
> > - elif hasattr(pcap,"open_live"): # python-pcapy
> > - class _PcapWrapper_pcapy:
> > Index: patches/patch-scapy_arch_unix_py
> > ===
> > RCS file: /cvs/ports/net/scapy/patches/patch-scapy_arch_unix_py,v
> > retrieving revision 1.1
> > diff -u -p -r1.1 patch-scapy_arch_unix_py
> > --- patches/patch-scapy_arch_unix_py  1 Oct 2009 16:28:49 -   1.1
> > +++ patches/patch-scapy_arch_unix_py  22 Jan 2016 12:19:55 -
> > @@ -1,15 +1,15 @@
> >  $OpenBSD: patch-scapy_arch_unix_py,v 1.1 2009/10/01 16:28:49 sthen Exp $
> >  scapy/arch/unix.py.orig  Tue Sep 29 20:25:02 2009
> > -+++ scapy/arch/unix.py   Tue Sep 29 20:26:50 2009
> > -@@ -61,7 +61,10 @@ def read_routes():
> > +--- scapy/arch/unix.py.orig  Fri Jan 15 14:10:59 2016
> >  sca

Re: update net/scapy

2016-01-22 Thread Stuart Henderson
Looks good to me, OK with you Jonathan?


On 2016/01/22 13:37, Daniel Jakots wrote:
> On Thu, 21 Jan 2016 23:44:08 +, Stuart Henderson
>  wrote:
> 
> > On 2016/01/21 21:52, Daniel Jakots wrote:
> > > -MASTER_SITES=${HOMEPAGE}/files/
> > > -DISTFILES=   ${DISTNAME}${EXTRACT_SUFX} ethertypes
> > > +MASTER_SITES0=   http://git.netfilter.org/ebtables/plain/
> > > +DISTFILES=   ${DISTNAME}.tar.gz ethertypes:0  
> > 
> > please give that ethertypes file a versioned name and don't
> > fetch it directly from the tip of a git repo. maybe mirror it?
> 
> Sure. Thanks for mirroring it.
> 
> Index: Makefile
> ===
> RCS file: /cvs/ports/net/scapy/Makefile,v
> retrieving revision 1.20
> diff -u -p -r1.20 Makefile
> --- Makefile  16 Feb 2015 22:57:11 -  1.20
> +++ Makefile  22 Jan 2016 12:19:55 -
> @@ -2,9 +2,12 @@
>  
>  COMMENT= powerful interactive packet manipulation in python
>  
> -MODPY_EGG_VERSION=   2.1.0
> +MODPY_EGG_VERSION=   2.3.2
>  DISTNAME=scapy-${MODPY_EGG_VERSION}
> -REVISION=2
> +
> +GH_ACCOUNT=  secdev
> +GH_PROJECT=  scapy
> +GH_TAGNAME=  v${MODPY_EGG_VERSION}
>  
>  CATEGORIES=  net
>  
> @@ -15,8 +18,8 @@ MAINTAINER= Jonathan Armani   # GPLv2
>  PERMIT_PACKAGE_CDROM=Yes
>  
> -MASTER_SITES=${HOMEPAGE}/files/
> -DISTFILES=   ${DISTNAME}${EXTRACT_SUFX} ethertypes
> +MASTER_SITES0=   https://spacehopper.org/mirrors/
> +DISTFILES=   ${DISTNAME}.tar.gz ethertypes-20120703:0
>  EXTRACT_ONLY=${DISTNAME}${EXTRACT_SUFX}
>  
>  MODULES= lang/python
> @@ -32,12 +35,12 @@ post-extract:
>   gunzip ${WRKSRC}/doc/scapy.1.gz
>  
>  pre-configure:
> - perl -p -i -e "s,/etc/ethertypes,${SYSCONFDIR}/ethertypes,g" \
> + sed -i "s,/etc/ethertypes,${SYSCONFDIR}/ethertypes,g" \
>   ${WRKSRC}/scapy/data.py
>  
>  post-install:
>   ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/scapy
> - ${INSTALL_DATA} ${DISTDIR}/ethertypes ${PREFIX}/share/examples/scapy
> + ${INSTALL_DATA} ${DISTDIR}/ethertypes-20120703 
> ${PREFIX}/share/examples/scapy/ethertypes
>  
>  # some tests require root.
>  do-test:
> Index: distinfo
> ===
> RCS file: /cvs/ports/net/scapy/distinfo,v
> retrieving revision 1.6
> diff -u -p -r1.6 distinfo
> --- distinfo  18 Jan 2015 03:14:52 -  1.6
> +++ distinfo  22 Jan 2016 12:19:55 -
> @@ -1,4 +1,4 @@
> -SHA256 (ethertypes) = 4UAHHkYt+Kq597Y6OWW/IGeX7Lz/M0o+xJQlbe/jXcs=
> -SHA256 (scapy-2.1.0.tar.gz) = Q8ojOwz8lQQBGT4nAuoy7h3YPUurZxNx4yKntsUidbo=
> -SIZE (ethertypes) = 1317
> -SIZE (scapy-2.1.0.tar.gz) = 956785
> +SHA256 (ethertypes-20120703) = 7Tj51kS+/IfrQahknDEAcyQNmozXWy+cEVtdnX5dAzw=
> +SHA256 (scapy-2.3.2.tar.gz) = G4qG1of+uO0BEUwMAWtChnTL/sBOPrb1JJoBjEJ8T2o=
> +SIZE (ethertypes-20120703) = 1362
> +SIZE (scapy-2.3.2.tar.gz) = 1166056
> Index: patches/patch-scapy_arch_pcapdnet_py
> ===
> RCS file: patches/patch-scapy_arch_pcapdnet_py
> diff -N patches/patch-scapy_arch_pcapdnet_py
> --- patches/patch-scapy_arch_pcapdnet_py  5 Oct 2010 09:18:05 -   
> 1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -
> @@ -1,12 +0,0 @@
> -$OpenBSD: patch-scapy_arch_pcapdnet_py,v 1.1 2010/10/05 09:18:05 armani Exp $
>  scapy/arch/pcapdnet.py.orig  Tue Oct  5 10:14:39 2010
> -+++ scapy/arch/pcapdnet.py   Tue Oct  5 10:16:27 2010
> -@@ -63,6 +63,8 @@ if conf.use_pcap:
> - return ts,pkt
> - def __getattr__(self, attr):
> - return getattr(self.pcap, attr)
> -+def __del__(self):
> -+os.close(self.pcap.fileno())
> - open_pcap = lambda *args,**kargs: 
> _PcapWrapper_libpcap(*args,**kargs)
> - elif hasattr(pcap,"open_live"): # python-pcapy
> - class _PcapWrapper_pcapy:
> Index: patches/patch-scapy_arch_unix_py
> ===
> RCS file: /cvs/ports/net/scapy/patches/patch-scapy_arch_unix_py,v
> retrieving revision 1.1
> diff -u -p -r1.1 patch-scapy_arch_unix_py
> --- patches/patch-scapy_arch_unix_py  1 Oct 2009 16:28:49 -   1.1
> +++ patches/patch-scapy_arch_unix_py  22 Jan 2016 12:19:55 -
> @@ -1,15 +1,15 @@
>  $OpenBSD: patch-scapy_arch_unix_py,v 1.1 2009/10/01 16:28:49 sthen Exp $
>  scapy/arch/unix.py.orig  Tue Sep 29 20:25:02 2009
> -+++ scapy/arch/unix.py   Tue Sep 29 20:26:50 2009
> -@@ -61,7 +61,10 @@ def read_routes():
> +--- scapy/arch/unix.py.orig  Fri Jan 15 14:10:59 2016
>  scapy/arch/unix.py   Thu Jan 21 20:36:10 2016
> +@@ -62,7 +62,10 @@ def read_routes():
>   else:
>   rt = l.split()
>   dest,gw,flg = rt[:3]
> --netif = rt[5+mtu_present+prio_present]
> -+if 'L' in rt[4+mtu_present+prio_pre

Re: update net/scapy

2016-01-22 Thread Daniel Jakots
On Thu, 21 Jan 2016 23:44:08 +, Stuart Henderson
 wrote:

> On 2016/01/21 21:52, Daniel Jakots wrote:
> > -MASTER_SITES=  ${HOMEPAGE}/files/
> > -DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ethertypes
> > +MASTER_SITES0= http://git.netfilter.org/ebtables/plain/
> > +DISTFILES= ${DISTNAME}.tar.gz ethertypes:0  
> 
> please give that ethertypes file a versioned name and don't
> fetch it directly from the tip of a git repo. maybe mirror it?

Sure. Thanks for mirroring it.

Index: Makefile
===
RCS file: /cvs/ports/net/scapy/Makefile,v
retrieving revision 1.20
diff -u -p -r1.20 Makefile
--- Makefile16 Feb 2015 22:57:11 -  1.20
+++ Makefile22 Jan 2016 12:19:55 -
@@ -2,9 +2,12 @@
 
 COMMENT=   powerful interactive packet manipulation in python
 
-MODPY_EGG_VERSION= 2.1.0
+MODPY_EGG_VERSION= 2.3.2
 DISTNAME=  scapy-${MODPY_EGG_VERSION}
-REVISION=  2
+
+GH_ACCOUNT=secdev
+GH_PROJECT=scapy
+GH_TAGNAME=v${MODPY_EGG_VERSION}
 
 CATEGORIES=net
 
@@ -15,8 +18,8 @@ MAINTAINER=   Jonathan Armani https://spacehopper.org/mirrors/
+DISTFILES= ${DISTNAME}.tar.gz ethertypes-20120703:0
 EXTRACT_ONLY=  ${DISTNAME}${EXTRACT_SUFX}
 
 MODULES=   lang/python
@@ -32,12 +35,12 @@ post-extract:
gunzip ${WRKSRC}/doc/scapy.1.gz
 
 pre-configure:
-   perl -p -i -e "s,/etc/ethertypes,${SYSCONFDIR}/ethertypes,g" \
+   sed -i "s,/etc/ethertypes,${SYSCONFDIR}/ethertypes,g" \
${WRKSRC}/scapy/data.py
 
 post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/scapy
-   ${INSTALL_DATA} ${DISTDIR}/ethertypes ${PREFIX}/share/examples/scapy
+   ${INSTALL_DATA} ${DISTDIR}/ethertypes-20120703 
${PREFIX}/share/examples/scapy/ethertypes
 
 # some tests require root.
 do-test:
Index: distinfo
===
RCS file: /cvs/ports/net/scapy/distinfo,v
retrieving revision 1.6
diff -u -p -r1.6 distinfo
--- distinfo18 Jan 2015 03:14:52 -  1.6
+++ distinfo22 Jan 2016 12:19:55 -
@@ -1,4 +1,4 @@
-SHA256 (ethertypes) = 4UAHHkYt+Kq597Y6OWW/IGeX7Lz/M0o+xJQlbe/jXcs=
-SHA256 (scapy-2.1.0.tar.gz) = Q8ojOwz8lQQBGT4nAuoy7h3YPUurZxNx4yKntsUidbo=
-SIZE (ethertypes) = 1317
-SIZE (scapy-2.1.0.tar.gz) = 956785
+SHA256 (ethertypes-20120703) = 7Tj51kS+/IfrQahknDEAcyQNmozXWy+cEVtdnX5dAzw=
+SHA256 (scapy-2.3.2.tar.gz) = G4qG1of+uO0BEUwMAWtChnTL/sBOPrb1JJoBjEJ8T2o=
+SIZE (ethertypes-20120703) = 1362
+SIZE (scapy-2.3.2.tar.gz) = 1166056
Index: patches/patch-scapy_arch_pcapdnet_py
===
RCS file: patches/patch-scapy_arch_pcapdnet_py
diff -N patches/patch-scapy_arch_pcapdnet_py
--- patches/patch-scapy_arch_pcapdnet_py5 Oct 2010 09:18:05 -   
1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,12 +0,0 @@
-$OpenBSD: patch-scapy_arch_pcapdnet_py,v 1.1 2010/10/05 09:18:05 armani Exp $
 scapy/arch/pcapdnet.py.origTue Oct  5 10:14:39 2010
-+++ scapy/arch/pcapdnet.py Tue Oct  5 10:16:27 2010
-@@ -63,6 +63,8 @@ if conf.use_pcap:
- return ts,pkt
- def __getattr__(self, attr):
- return getattr(self.pcap, attr)
-+def __del__(self):
-+os.close(self.pcap.fileno())
- open_pcap = lambda *args,**kargs: 
_PcapWrapper_libpcap(*args,**kargs)
- elif hasattr(pcap,"open_live"): # python-pcapy
- class _PcapWrapper_pcapy:
Index: patches/patch-scapy_arch_unix_py
===
RCS file: /cvs/ports/net/scapy/patches/patch-scapy_arch_unix_py,v
retrieving revision 1.1
diff -u -p -r1.1 patch-scapy_arch_unix_py
--- patches/patch-scapy_arch_unix_py1 Oct 2009 16:28:49 -   1.1
+++ patches/patch-scapy_arch_unix_py22 Jan 2016 12:19:55 -
@@ -1,15 +1,15 @@
 $OpenBSD: patch-scapy_arch_unix_py,v 1.1 2009/10/01 16:28:49 sthen Exp $
 scapy/arch/unix.py.origTue Sep 29 20:25:02 2009
-+++ scapy/arch/unix.py Tue Sep 29 20:26:50 2009
-@@ -61,7 +61,10 @@ def read_routes():
+--- scapy/arch/unix.py.origFri Jan 15 14:10:59 2016
 scapy/arch/unix.py Thu Jan 21 20:36:10 2016
+@@ -62,7 +62,10 @@ def read_routes():
  else:
  rt = l.split()
  dest,gw,flg = rt[:3]
--netif = rt[5+mtu_present+prio_present]
-+if 'L' in rt[4+mtu_present+prio_present]:
-+  netif = rt[6+mtu_present+prio_present]
-+  else:
-+  netif = rt[5+mtu_present+prio_present]
+-netif = rt[4 + mtu_present + prio_present + refs_present]
++if 'L' in rt[3+mtu_present+prio_present + refs_present]:
++netif = rt[5+mtu_present+prio_present + refs_present]
++else:
++netif = rt[4+mtu_present+prio_present + refs_present]
 

Re: update net/scapy

2016-01-21 Thread Stuart Henderson
On 2016/01/21 21:52, Daniel Jakots wrote:
> -MASTER_SITES=${HOMEPAGE}/files/
> -DISTFILES=   ${DISTNAME}${EXTRACT_SUFX} ethertypes
> +MASTER_SITES0=   http://git.netfilter.org/ebtables/plain/
> +DISTFILES=   ${DISTNAME}.tar.gz ethertypes:0

please give that ethertypes file a versioned name and don't
fetch it directly from the tip of a git repo. maybe mirror it?



Re: update net/scapy

2016-01-21 Thread Daniel Jakots
On Thu, 21 Jan 2016 15:57:19 -0500, Michael McConville
 wrote:

> Daniel Jakots wrote:
> > Our scapy is old. Here's a diff to update it to latest stable.
> > Upstream moved to github. 
> > 
> > While talking with them, they advised me to get ethertypes somewhere
> > else than the website [1]. As it's the same name but with different
> > checksum, you'll have to use REFETCH=true. The difference with the
> > previous file are "+RARP 8035 # Reverse ARP [RFC903]", a couple of
> > space/tabs fixes and another link in the comment.
> > 
> > If you do make test, it will hang and if you ^C it will simply
> > stop. If you go in scapy-2.3.2 and do  `python2.7
> > scapy/tools/UTscapy.py -t test/regression.uts -f html -l
> > -o /tmp/scapy_regression_test.html` it will hang but just ^C a
> > couple of times and then it finishes. I've the same behaviour with
> > the current scapy we have in port (2.1.0).
> > 
> > On 2.1.0/amd64:
> > PASSED=698 FAILED=58
> > on 2.3.2/amd64:
> > PASSED=739 FAILED=28
> > on 2.3.2/i386:
> > PASSED=739 FAILED=28
> > on 2.3.2/i386 with root:
> > PASSED=748 FAILED=19
> > 
> > [1]: https://twitter.com/pi3rre/status/689716600056987648   
> 
> Does it hang in RARP-reading code? I came across a potential bug in
> our RARP yesterday. Currently working on it with a few other people.
> 

It seems not but I can give you the result:
https://chown.me/iota/scapy/scapy_regression_test.html



Re: update net/scapy

2016-01-21 Thread Michael McConville
Daniel Jakots wrote:
> Our scapy is old. Here's a diff to update it to latest stable.
> Upstream moved to github. 
> 
> While talking with them, they advised me to get ethertypes somewhere
> else than the website [1]. As it's the same name but with different
> checksum, you'll have to use REFETCH=true. The difference with the
> previous file are "+RARP 8035 # Reverse ARP [RFC903]", a couple of
> space/tabs fixes and another link in the comment.
> 
> If you do make test, it will hang and if you ^C it will simply stop. If
> you go in scapy-2.3.2 and do  `python2.7 scapy/tools/UTscapy.py -t
> test/regression.uts -f html -l -o /tmp/scapy_regression_test.html` it
> will hang but just ^C a couple of times and then it finishes. I've the
> same behaviour with the current scapy we have in port (2.1.0).
> 
> On 2.1.0/amd64:
> PASSED=698 FAILED=58
> on 2.3.2/amd64:
> PASSED=739 FAILED=28
> on 2.3.2/i386:
> PASSED=739 FAILED=28
> on 2.3.2/i386 with root:
> PASSED=748 FAILED=19
> 
> [1]: https://twitter.com/pi3rre/status/689716600056987648 

Does it hang in RARP-reading code? I came across a potential bug in our
RARP yesterday. Currently working on it with a few other people.



Re: UPDATE: net/scapy to version 1.1.1

2007-04-27 Thread Claudio Jeker
On Thu, Apr 26, 2007 at 06:16:35PM +0200, Claudio Jeker wrote:
> This diff brings the scapy port to the newest version.
> This is needed to make scapy6 work -- I'll create a port for that too.
> 
> I had to fix a few issues -- grrr grumble. Lesson to learn: never try to
> parse netstat output assuming that you can simply split it to seven
> fields! Locked MTU entries add a 8 field and interfaces with the name 'L'
> will not work on OpenBSD. Took me about 1-2 hours of head scratching to
> understand why scapy suddenly crashed on startup.
> 
> Before aplying the diff you need to "mkdir patches"

This is an updated version that fixes a obvious programming error in the
PcapWriter module.

-- 
:wq Claudio

Index: Makefile
===
RCS file: /cvs/ports/net/scapy/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- Makefile3 Jun 2006 09:43:03 -   1.2
+++ Makefile25 Apr 2007 22:16:34 -
@@ -2,8 +2,7 @@
 
 COMMENT=   "powerful interactive packet manipulation in python"
 
-DISTNAME=  scapy-1.0.4
-PKGNAME=   ${DISTNAME}p0
+DISTNAME=  scapy-1.1.1
 CATEGORIES=net
 
 HOMEPAGE=  http://secdev.org/projects/scapy/
@@ -30,7 +29,6 @@ PKG_ARCH= *
 NO_REGRESS=Yes
 
 do-build:
-   gunzip < ${WRKSRC}/scapy.1.gz > ${WRKBUILD}/scapy.1
perl -p -i -e "s,^(\#\S+ \S+ )python\$$,#!${MODPY_BIN}," \
${WRKSRC}/*.py
perl -p -i -e "s,/etc/ethertypes,${SYSCONFDIR}/ethertypes,g" \
Index: distinfo
===
RCS file: /cvs/ports/net/scapy/distinfo,v
retrieving revision 1.2
diff -u -p -r1.2 distinfo
--- distinfo5 Apr 2007 16:20:15 -   1.2
+++ distinfo25 Apr 2007 22:15:40 -
@@ -1,10 +1,10 @@
 MD5 (ethertypes) = lL/96PdaG4+JH7eAv+Fcog==
-MD5 (scapy-1.0.4.tar.gz) = wVZmjPq0wf3idvgeC4W12Q==
+MD5 (scapy-1.1.1.tar.gz) = iscgob6kMEeXxxPvHtBj8Q==
 RMD160 (ethertypes) = KWuI/tkRslOYtfZXzWu1yR5y4og=
-RMD160 (scapy-1.0.4.tar.gz) = JhhUgEL2Ww0CRhYj/s6T1MJYiVk=
+RMD160 (scapy-1.1.1.tar.gz) = IL2x6lmgX0UqUV5DjiMOHYW4EBY=
 SHA1 (ethertypes) = btD+JEZmaHbXe4lx/Y7fSVqcC+M=
-SHA1 (scapy-1.0.4.tar.gz) = q+fMJCr08g7wFlV4AOLlIcLhShs=
+SHA1 (scapy-1.1.1.tar.gz) = hw2o5uKoeGsDoAVfwswdExfzCOQ=
 SHA256 (ethertypes) = 4UAHHkYt+Kq597Y6OWW/IGeX7Lz/M0o+xJQlbe/jXcs=
-SHA256 (scapy-1.0.4.tar.gz) = NAvrsmu/jLN728+3uN+SJa04Sgs/CzO1XKC4umyaOwI=
+SHA256 (scapy-1.1.1.tar.gz) = KhG6BfNLKXivOt1iOmQeA0DTkyK0yivSa6rnQ8eN6VY=
 SIZE (ethertypes) = 1317
-SIZE (scapy-1.0.4.tar.gz) = 132677
+SIZE (scapy-1.1.1.tar.gz) = 147401
--- /dev/null   Fri Apr 27 11:24:24 2007
+++ patches/patch-scapy_py  Thu Apr 26 23:15:05 2007
@@ -0,0 +1,38 @@
+$OpenBSD$
+--- scapy.py.orig  Mon Apr  9 15:17:35 2007
 scapy.py   Thu Apr 26 23:14:39 2007
+@@ -1152,7 +1152,7 @@ if not LINUX:
+ dest,mask,gw,netif,mxfrg,rtt,ref,flg = l.split()[:8]
+ else:
+ if mtu_present:
+-dest,gw,flg,ref,use,mtu,netif = l.split()[:7]
++dest,gw,flg,ref,use,mtu,netif = l.split(None, 6)[:7]
+ else:
+ dest,gw,flg,ref,use,netif = l.split()[:6]
+ if flg.find("Lc") >= 0:
+@@ -1172,6 +1172,8 @@ if not LINUX:
+ dest, = struct.unpack("I",inet_aton(dest))
+ if not "G" in flg:
+ gw = '0.0.0.0'
++if netif.find("L") >= 0:
++  dummy,netif = netif.split()
+ ifaddr = get_if_addr(netif)
+ routes.append((dest,netmask,gw,netif,ifaddr))
+ f.close()
+@@ -9847,7 +9849,8 @@ class PcapWriter:
+ """
+ 
+ if self.header_done == 0:
+-if self.linktype == None:
++linktype = self.linktype
++if linktype == None:
+ if isinstance(pkt,Packet):
+ linktype = LLNumTypes.get(pkt.__class__,1)
+ else:
+@@ -12190,4 +12193,5 @@ def read_config_file(configfile):
+ if __name__ == "__main__":
+ interact()
+ else:
+-read_config_file(DEFAULT_CONFIG_FILE)
++if DEFAULT_CONFIG_FILE:
++read_config_file(DEFAULT_CONFIG_FILE)