From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Apr 16 08:40:02 2009 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4069A1065674 for ; Thu, 16 Apr 2009 08:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 1BD688FC27 for ; Thu, 16 Apr 2009 08:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n3G8e1nP024157 for ; Thu, 16 Apr 2009 08:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n3G8e1ap024156; Thu, 16 Apr 2009 08:40:01 GMT (envelope-from gnats) Resent-Date: Thu, 16 Apr 2009 08:40:01 GMT Resent-Message-Id: <200904160840.n3G8e1ap024156@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Andrey Zaikin Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D486F106564A for ; Thu, 16 Apr 2009 08:35:43 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id C3DA98FC0C for ; Thu, 16 Apr 2009 08:35:43 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n3G8ZhHB008399 for ; Thu, 16 Apr 2009 08:35:43 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n3G8ZhF2008398; Thu, 16 Apr 2009 08:35:43 GMT (envelope-from nobody) Message-Id: <200904160835.n3G8ZhF2008398@www.freebsd.org> Date: Thu, 16 Apr 2009 08:35:43 GMT From: Andrey Zaikin To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/133772: libdnet can only use /dev/bpfX, where X > 32 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Apr 2009 08:40:03 -0000 >Number: 133772 >Category: ports >Synopsis: libdnet can only use /dev/bpfX, where X > 32 >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Apr 16 08:40:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Andrey Zaikin >Release: 7.1-RELEASE >Organization: >Environment: FreeBSD orbitel.ru 7.1-RELEASE FreeBSD 7.1-RELEASE #4: Mon Feb 2 15:17:07 YEKT 2009 root@orbitel.ru:/usr/obj/usr/src/sys/CORE amd64 >Description: I need to run a number of arpd's on different interfaces. When I tried to run more than 16 arpd's - I got an "arpd: bad interface configuration: not IP or Ethernet" error. Looking into the sources and debugging in got me into the max 32 bpf's restriction in libdnet. (I think another 16 ones was used by other processes on my system) >How-To-Repeat: Try to run 33 arpd's. They can be on the same interface or on different interfaces - that does not matter. Ypu should get an "arpd: bad interface configuration: not IP or Ethernet" error. >Fix: --- src/eth-bsd.c.orig 2009-04-16 14:22:44.000000000 +0600 +++ src/eth-bsd.c 2009-04-16 14:23:31.000000000 +0600 @@ -45,7 +45,7 @@ int i; if ((e = calloc(1, sizeof(*e))) != NULL) { - for (i = 0; i < 32; i++) { + for (i = 0; i < 256; i++) { snprintf(file, sizeof(file), "/dev/bpf%d", i); e->fd = open(file, O_WRONLY); if (e->fd != -1 || errno != EBUSY) Patch attached with submission follows: --- src/eth-bsd.c.orig 2009-04-16 14:22:44.000000000 +0600 +++ src/eth-bsd.c 2009-04-16 14:23:31.000000000 +0600 @@ -45,7 +45,7 @@ int i; if ((e = calloc(1, sizeof(*e))) != NULL) { - for (i = 0; i < 32; i++) { + for (i = 0; i < 256; i++) { snprintf(file, sizeof(file), "/dev/bpf%d", i); e->fd = open(file, O_WRONLY); if (e->fd != -1 || errno != EBUSY) >Release-Note: >Audit-Trail: >Unformatted: