here's an update to the latest version. seems to work on amd64, though i had to disable mpls in the filter to fix a pcap compile error. the interfaces.c patch is shuffled compared to the previous.
ok? Index: Makefile =================================================================== RCS file: /cvs/ports/net/yersinia/Makefile,v retrieving revision 1.8 diff -u -p -u -r1.8 Makefile --- Makefile 1 Jun 2013 14:18:40 -0000 1.8 +++ Makefile 19 Jul 2015 19:08:48 -0000 @@ -2,9 +2,8 @@ COMMENT = framework for analysis of layer 2 network protocols -DISTNAME = yersinia-0.7.1 +DISTNAME = yersinia-0.7.3 CATEGORIES = net security -REVISION = 3 HOMEPAGE = http://www.yersinia.net/ @@ -25,6 +24,7 @@ CONFIGURE_ARGS = --disable-gtk \ CONFIGURE_ENV = LDFLAGS="-L${LOCALBASE}/lib" \ LIBNET_CONFIG=${LOCALBASE}/bin/libnet-config-1.1 \ CPPFLAGS="${CPPFLAGS} -DLBL_ALIGN" +WRKDIST = ${WRKDIR} post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/yersinia Index: distinfo =================================================================== RCS file: /cvs/ports/net/yersinia/distinfo,v retrieving revision 1.2 diff -u -p -u -r1.2 distinfo --- distinfo 18 Jan 2015 03:14:55 -0000 1.2 +++ distinfo 19 Jul 2015 19:08:48 -0000 @@ -1,2 +1,2 @@ -SHA256 (yersinia-0.7.1.tar.gz) = nEc8SbuptSccocxvtdZDFL/2dXcvWXg3NB9Y3JM1Ghc= -SIZE (yersinia-0.7.1.tar.gz) = 318396 +SHA256 (yersinia-0.7.3.tar.gz) = BCq8RmxbRwuXB54ASbQCmoy7ddWDz7+3VvynbkYNQLQ= +SIZE (yersinia-0.7.3.tar.gz) = 378124 Index: patches/patch-configure =================================================================== RCS file: /cvs/ports/net/yersinia/patches/patch-configure,v retrieving revision 1.2 diff -u -p -u -r1.2 patch-configure --- patches/patch-configure 1 Jun 2013 14:18:40 -0000 1.2 +++ patches/patch-configure 19 Jul 2015 19:08:48 -0000 @@ -1,16 +1,16 @@ -$OpenBSD: patch-configure,v 1.2 2013/06/01 14:18:40 ajacoutot Exp $ ---- configure.orig Fri Jan 26 20:22:30 2007 -+++ configure Tue Sep 23 14:13:54 2008 -@@ -3470,7 +3470,7 @@ fi +$OpenBSD: patch-configure,v 1.1.1.1 2010/10/25 23:12:02 steven Exp $ +--- configure.orig Mon Sep 9 14:33:01 2013 ++++ configure Sun Jul 19 16:52:17 2015 +@@ -3809,7 +3809,7 @@ fi if test -n "$GCC"; then - CFLAGS="-O3 -Wall -g" + CFLAGS="$CFLAGS -Wall -g" else - { echo "$as_me:$LINENO: WARNING: Ouch!! Only gcc is supported..." >&5 - echo "$as_me: WARNING: Ouch!! Only gcc is supported..." >&2;} -@@ -4687,7 +4687,7 @@ else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ouch!! Only gcc is supported..." >&5 + $as_echo "$as_me: WARNING: Ouch!! Only gcc is supported..." >&2;} +@@ -4747,7 +4747,7 @@ else LIBNET_INCLUDE="-I$libnet_dir" LIBNET_LINK="-L`dirname $libnet_dir`/lib" Index: patches/patch-src_interfaces_c =================================================================== RCS file: /cvs/ports/net/yersinia/patches/patch-src_interfaces_c,v retrieving revision 1.1.1.1 diff -u -p -u -r1.1.1.1 patch-src_interfaces_c --- patches/patch-src_interfaces_c 25 Oct 2010 23:12:02 -0000 1.1.1.1 +++ patches/patch-src_interfaces_c 19 Jul 2015 19:08:48 -0000 @@ -1,38 +1,29 @@ -$OpenBSD: patch-src_interfaces_c,v 1.1.1.1 2010/10/25 23:12:02 steven Exp $ ---- src/interfaces.c.orig Sun Jul 16 14:37:31 2006 -+++ src/interfaces.c Mon Oct 25 23:26:02 2010 -@@ -142,6 +142,7 @@ interfaces_init(THREAD *pcap_th) - while (index) +$OpenBSD$ +--- src/interfaces.c.orig Mon Sep 9 14:33:01 2013 ++++ src/interfaces.c Sun Jul 19 19:27:50 2015 +@@ -221,13 +221,12 @@ interfaces_init_data_libnet( struct interface_data *in + if ( ( libnet_hnd = libnet_init( LIBNET_LINK, interface->ifname, errbuflibnet ) ) ) { - if ( (strncmp(index->name,"any",strlen(index->name))) && -+ (strstr(index->name,"pflog") == NULL) && - (index->flags != PCAP_IF_LOOPBACK) ) + etheraddr = libnet_get_hwaddr( libnet_hnd ); ++ libnet_destroy( libnet_hnd ); + + if ( etheraddr && memcmp( (void *)etheraddr, "\x0\x0\x0\x0\x0\x0", 6 ) ) { - if ((iface_data = (struct interface_data *) calloc(1, sizeof(struct interface_data))) == NULL) { -@@ -321,6 +322,7 @@ interfaces_init_data(struct interface_data *interface) + memcpy( (void *)interface->etheraddr, (void *)etheraddr, ETHER_ADDR_LEN ); + } +- +- libnet_destroy( libnet_hnd ); + write_log( 0," %s MAC = %02x%02x.%02x%02x.%02x%02x\n", interface->ifname, + etheraddr->ether_addr_octet[0], etheraddr->ether_addr_octet[1], +@@ -286,7 +285,9 @@ interfaces_init( THREAD *pcap_th ) - etheraddr = libnet_get_hwaddr(libnet_handler); -+ libnet_destroy(libnet_handler); - - if (etheraddr && memcmp((void *)etheraddr,"\x0\x0\x0\x0\x0\x0",6) ) + while( index ) { -@@ -329,14 +331,13 @@ interfaces_init_data(struct interface_data *interface) - etheraddr->ether_addr_octet[0], etheraddr->ether_addr_octet[1], - etheraddr->ether_addr_octet[2], etheraddr->ether_addr_octet[3], - etheraddr->ether_addr_octet[4], etheraddr->ether_addr_octet[5]); */ -- } -- -- libnet_destroy(libnet_handler); -- -- write_log(0," %s MAC = %02x%02x.%02x%02x.%02x%02x\n", interface->ifname, -+ write_log(0," %s MAC = %02x%02x.%02x%02x.%02x%02x\n", interface->ifname, - etheraddr->ether_addr_octet[0], etheraddr->ether_addr_octet[1], - etheraddr->ether_addr_octet[2], etheraddr->ether_addr_octet[3], - etheraddr->ether_addr_octet[4], etheraddr->ether_addr_octet[5]); -+ } -+ else -+ write_log(0," %s MAC not found!\n", interface->ifname); - - return 0; - } +- if ( ( strncmp( index->name, "any", strlen( index->name ) ) ) && ( index->flags != PCAP_IF_LOOPBACK ) ) ++ if ( ( strncmp( index->name, "any", strlen( index->name ) ) ) && ++ (strstr(index->name,"pflog") == NULL) && ++ ( index->flags != PCAP_IF_LOOPBACK ) ) + { + if ( ( iface_data = (struct interface_data *)calloc( 1, sizeof( struct interface_data ) ) ) ) + { Index: patches/patch-src_interfaces_h =================================================================== RCS file: patches/patch-src_interfaces_h diff -N patches/patch-src_interfaces_h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_interfaces_h 19 Jul 2015 19:08:48 -0000 @@ -0,0 +1,12 @@ +$OpenBSD$ +--- src/interfaces.h.orig Sun Jul 19 20:31:52 2015 ++++ src/interfaces.h Sun Jul 19 20:32:51 2015 +@@ -51,7 +51,7 @@ + + #define PROMISC 1 + #define TIMEOUT 500 +-#define FILTER "stp || (udp and (port 1985 or port 68 or port 67)) || (ether host 01:00:0c:cc:cc:cc and ether[20:2] = 0x2000) || (ether host 01:00:0c:cc:cc:cc and ether[20:2] = 0x2004) || (ether host 01:00:0c:cc:cc:cc and ether[20:2] = 0x2003) || arp || vlan || (ether[14]=0xaa and ether[15]=0xaa and ether[0]=0x01 and ether[1]=0x00 and ether[2]=0x0c and ether[3]=0x00 and ether[4]=0x00) || (ether[0]=0x01 and ether[1]=0x80 and ether[2]=0xc2 and ether[12:2] = 0x888e) || mpls" ++#define FILTER "stp || (udp and (port 1985 or port 68 or port 67)) || (ether host 01:00:0c:cc:cc:cc and ether[20:2] = 0x2000) || (ether host 01:00:0c:cc:cc:cc and ether[20:2] = 0x2004) || (ether host 01:00:0c:cc:cc:cc and ether[20:2] = 0x2003) || arp || vlan || (ether[14]=0xaa and ether[15]=0xaa and ether[0]=0x01 and ether[1]=0x00 and ether[2]=0x0c and ether[3]=0x00 and ether[4]=0x00) || (ether[0]=0x01 and ether[1]=0x80 and ether[2]=0xc2 and ether[12:2] = 0x888e)" + + /* Fields for recognizing packets */ + #define F_ETHERTYPE 1