prevent unaligned access, makes it work on sparc64.
help from naddy@
This commit is contained in:
parent
8dd881a111
commit
a5c465b3d3
@ -1,10 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.3 2010/10/26 07:59:28 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.4 2010/10/26 10:44:53 steven Exp $
|
||||
|
||||
COMMENT = framework for analysis of layer 2 network protocols
|
||||
|
||||
DISTNAME = yersinia-0.7.1
|
||||
CATEGORIES = net security
|
||||
REVISION = 0
|
||||
REVISION = 1
|
||||
|
||||
HOMEPAGE = http://www.yersinia.net/
|
||||
|
||||
@ -26,7 +26,8 @@ CONFIGURE_STYLE = gnu
|
||||
CONFIGURE_ARGS = --disable-gtk \
|
||||
--with-libnet-includes=${LOCALBASE}/include/libnet-1.1
|
||||
CONFIGURE_ENV = LDFLAGS="-L${LOCALBASE}/lib" \
|
||||
LIBNET_CONFIG=${LOCALBASE}/bin/libnet-config-1.1
|
||||
LIBNET_CONFIG=${LOCALBASE}/bin/libnet-config-1.1 \
|
||||
CPPFLAGS="${CPPFLAGS} -DLBL_ALIGN"
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/yersinia
|
||||
|
18
net/yersinia/patches/patch-src_attack_c
Normal file
18
net/yersinia/patches/patch-src_attack_c
Normal file
@ -0,0 +1,18 @@
|
||||
$OpenBSD: patch-src_attack_c,v 1.1 2010/10/26 10:44:53 steven Exp $
|
||||
--- src/attack.c.orig Tue Oct 26 12:04:42 2010
|
||||
+++ src/attack.c Tue Oct 26 12:13:45 2010
|
||||
@@ -248,8 +248,12 @@ attacks->attack_th.id);
|
||||
void
|
||||
attack_gen_mac(u_int8_t *mac)
|
||||
{
|
||||
- *((in_addr_t *)mac) = libnet_get_prand(LIBNET_PRu32);
|
||||
- *((u_int16_t *)(mac + 4)) = libnet_get_prand(LIBNET_PRu16);
|
||||
+ u_int32_t tmp1;
|
||||
+ u_int16_t tmp2;
|
||||
+ tmp1 = libnet_get_prand(LIBNET_PRu32);
|
||||
+ memcpy(mac, &tmp1, sizeof(tmp1));
|
||||
+ tmp2 = libnet_get_prand(LIBNET_PRu16);
|
||||
+ memcpy(mac + 4, &tmp2, sizeof(tmp2));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user