1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-29 10:18:30 +00:00
freebsd-ports/security/nmap/files/patch-libdnet-stripped__src__eth-bsd.c
Marcus Alves Grando cbedd5479a - Able security/nmap open more than 128 bpfs.
- Bump PORTREVISION

PR:		98080
Submitted by:	marck
Approved by:	maintainer
2006-06-06 01:30:16 +00:00

18 lines
432 B
C

#
# $FreeBSD$
#
# - nmap fails to attach to bpf when more than 128 bpfs are busy.
# PR: 98080
#
--- libdnet-stripped/src/eth-bsd.c.orig
+++ libdnet-stripped/src/eth-bsd.c
@@ -45,7 +45,7 @@
int i;
if ((e = calloc(1, sizeof(*e))) != NULL) {
- for (i = 0; i < 128; i++) {
+ for (i = 0; i < 1024; i++) {
snprintf(file, sizeof(file), "/dev/bpf%d", i);
e->fd = open(file, O_WRONLY);
if (e->fd != -1 || errno != EBUSY)