From jos@islay.demon.nl Wed Oct  6 12:53:49 1999
Return-Path: <jos@islay.demon.nl>
Received: from mailrelay.somewhere.net (islay.demon.nl [212.238.39.75])
	by hub.freebsd.org (Postfix) with ESMTP id 55C9215760
	for <FreeBSD-gnats-submit@freebsd.org>; 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 <FreeBSD-gnats-submit@freebsd.org>; Wed, 6 Oct 1999 18:27:21 +0200 (CEST)
Received: from intranet by mailhub  with ESMTP id SAA47094
	for <FreeBSD-gnats-submit@freebsd.org>; 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 <jos@islay.demon.nl>
Reply-To: jos@islay.demon.nl
To: FreeBSD-gnats-submit@freebsd.org
Subject: natd only handles limited number of interfaces in ifreq list
X-Send-Pr-Version: 3.2

>Number:         14169
>Category:       bin
>Synopsis:       natd only handles limited number of interfaces in ifreq list
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ru
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct  6 13:00:01 PDT 1999
>Closed-Date:    Thu Oct 28 12:03:23 PDT 1999
>Last-Modified:  Thu Oct 28 12:06:05 PDT 1999
>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:
Responsible-Changed-From-To: freebsd-bugs->ru 
Responsible-Changed-By: ru 
Responsible-Changed-When: Wed Oct 6 13:09:21 PDT 1999 
Responsible-Changed-Why:  
Over to the maintainer :-) 
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Thu Oct 28 12:03:23 PDT 1999 
State-Changed-Why:  
Fixed in both -current and -stable. 
>Unformatted:
