From owner-freebsd-bugs Wed Oct 6 13: 0: 4 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id A417B1531C for ; Wed, 6 Oct 1999 13:00:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id NAA47084; Wed, 6 Oct 1999 13:00:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from mailrelay.somewhere.net (islay.demon.nl [212.238.39.75]) by hub.freebsd.org (Postfix) with ESMTP id 55C9215760 for ; Wed, 6 Oct 1999 12:52:47 -0700 (PDT) (envelope-from jos@islay.demon.nl) Received: from mailhub by mailrelay with ESMTP id SAA47098 for ; Wed, 6 Oct 1999 18:27:21 +0200 (CEST) Received: from intranet by mailhub with ESMTP id SAA47094 for ; Wed, 6 Oct 1999 18:27:21 +0200 (CEST) Received: by localhost id SAA62653; Wed, 6 Oct 1999 18:27:20 +0200 (CEST) Message-Id: <199910061627.SAA62653@localhost> Date: Wed, 6 Oct 1999 18:27:20 +0200 (CEST) From: Jos Vissers Reply-To: jos@islay.demon.nl To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/14169: natd only handles limited number of interfaces in ifreq list Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 14169 >Category: bin >Synopsis: natd only handles limited number of interfaces in ifreq list >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Oct 6 13:00:01 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Jos Vissers >Release: FreeBSD 3.3-STABLE i386 >Organization: >Environment: >Description: Natd can not find its interface from the ifreq list when the total number of interfaces/aliases exceeds a maximum and the nat-ed interface is beyond that maximum. It then responds with "Unknown interface name". I have vx0 with 13 addresses, fxp0 with 1, lp0 with 1, and lo0 with 1 address, ppp0 and ppp1 are not assigned an address and isp0 is the nat-ed inerface. Natd can not find isp0 because the size of the ifreq list is fixed at 32. >How-To-Repeat: Add a number of aliases to any interfaces before the nat-ed interface. How many depends on the total number of physical interfaces since ifr_addr.sa_len is larger for the link layer interface. >Fix: Increase the size of the ifreq list to 64, unless there is a reason to keep this at 32. =================================================================== --- natd.c 1999/08/29 15:14:49 1.11.2.6 +++ natd.c 1999/10/06 16:23:13 @@ -704,7 +704,7 @@ static void SetAliasAddressFromIfName (char* ifn) { struct ifconf cf; - struct ifreq buf[32]; + struct ifreq buf[64]; char msg[80]; struct ifreq* ifPtr; int extra; >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message