Date: Wed, 6 Oct 1999 18:27:20 +0200 (CEST) From: Jos Vissers <jos@islay.demon.nl> To: FreeBSD-gnats-submit@freebsd.org Subject: bin/14169: natd only handles limited number of interfaces in ifreq list Message-ID: <199910061627.SAA62653@localhost>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199910061627.SAA62653>