NetBSD Problem Report #711

From gnats  Fri Jan  6 23:33:18 1995
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id XAA07347 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Fri, 6 Jan 1995 23:33:17 -0800
Message-Id: <199501070735.BAA00394@aqua.pc.tgi.plexus.com>
Date: Sat, 7 Jan 1995 01:35:57 -0600
From: Scott Reynolds <scottr@Plexus.COM>
Reply-To: scottr@Plexus.COM
To: gnats-bugs@NetBSD.ORG
Subject: pppd(8) 'proxyarp' option fails
X-Send-Pr-Version: 3.2

>Number:         711
>Category:       bin
>Synopsis:       /usr/sbin/pppd doesn't add a proxy ARP entry properly
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 06 23:35:01 +0000 1995
>Closed-Date:    Sat Jan 07 10:54:43 +0000 1995
>Last-Modified:  
>Originator:     
>Release:        NetBSD-current 06-Jan-95
>Organization:
Scott Reynolds
Assistant System Administrator
Technology Group, Inc.
>Environment:
System: NetBSD aqua 1.0A NetBSD 1.0A (TGI) #1: Tue Jan 3 14:23:37 CST 1995 scottr@mach1355.pc.tgi.plexus.com:/usr/src/sys/arch/i386/compile/TGI i386


>Description:
	pppd doesn't properly add ARP entries when using the 'proxyarp'
	option due to a typo in sys-bsd.c.  This fix was originally proposed
	as a part of two patches from eranian@mountain.ufr-info-p7.ibp.fr,
	but apparently got lost somewhere.

>How-To-Repeat:
	My system is on a class C network (192.56.116.0), and I dial in with
	a PC with a packet driver.  The PC works fine with other PPP dialups,
	so that isn't an issue.

	The following options are in my /etc/ppp/options file:

	:192.56.116.xxx  <-- 'xxx' is of course numeric
	proxyarp
	-detach
	modem
	crtscts

	I start pppd from either an account I set up directly, with
	/usr/sbin/pppd as the login shell, or from my regular account
	manually.  Without the patch below, an arp entry never appears
	for 192.56.116.xxx, and the result is some very strange behavior
	by the gateway machine running pppd.

>Fix:
	Apply the following patch.

*** usr.sbin/pppd/sys-bsd.c-dist	Sat Dec 24 05:51:59 1994
--- usr.sbin/pppd/sys-bsd.c	Sat Jan  7 00:53:02 1994
***************
*** 619,625 ****
--- 619,625 ----
  	     */
  	    if (ioctl(s, SIOCGIFNETMASK, &ifreq) < 0)
  		continue;
-  	    mask = ((struct sockaddr_in *) &ifr->ifr_addr)->sin_addr.s_addr;
+ 	    mask = ((struct sockaddr_in *) &ifreq.ifr_addr)->sin_addr.s_addr;
  	    if ((ipaddr & mask) != (ina & mask))
  		continue;

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: pk 
State-Changed-When: Sat Jan 7 02:54:43 PST 1995 
State-Changed-Why:  
Fixed. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.