From pmc@citylink.dinoex.sub.org  Mon Apr  7 08:13:23 2008
Return-Path: <pmc@citylink.dinoex.sub.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F39D6106564A
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  7 Apr 2008 08:13:22 +0000 (UTC)
	(envelope-from pmc@citylink.dinoex.sub.org)
Received: from uucp.dinoex.sub.de (uucp.dinoex.sub.de [194.45.71.2])
	by mx1.freebsd.org (Postfix) with ESMTP id 491548FC1E
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  7 Apr 2008 08:13:21 +0000 (UTC)
	(envelope-from pmc@citylink.dinoex.sub.org)
Received: from uucp.dinoex.sub.de (uucp@uucp.dinoex.sub.de [194.45.71.2] (may be forged))
	by uucp.dinoex.sub.de (8.14.2/8.14.2) with ESMTP id m378DA3A043224
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 7 Apr 2008 10:13:11 +0200 (CEST)
	(envelope-from pmc@citylink.dinoex.sub.org)
Received: from citylink.dinoex.sub.org (uucp@localhost)
	by uucp.dinoex.sub.de (8.14.2/8.14.2/Submit) with UUCP id m378DAKO043223
	for FreeBSD-gnats-submit@freebsd.org; Mon, 7 Apr 2008 10:13:10 +0200 (CEST)
	(envelope-from pmc@citylink.dinoex.sub.org)
Received: from gate.oper.dinoex.org (gate-e [192.168.98.2])
	by citylink.dinoex.sub.de (8.14.2/8.14.2) with ESMTP id m377sJSJ069579
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 7 Apr 2008 09:54:19 +0200 (CEST)
	(envelope-from peter@gate.oper.dinoex.org)
Received: from gate.oper.dinoex.org (gate-e [192.168.98.2])
	by gate.oper.dinoex.org (8.14.2/8.14.2) with ESMTP id m377qhXU069404
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 7 Apr 2008 09:52:43 +0200 (CEST)
	(envelope-from peter@gate.oper.dinoex.org)
Received: (from peter@localhost)
	by gate.oper.dinoex.org (8.14.2/8.14.2/Submit) id m377qh74069403;
	Mon, 7 Apr 2008 09:52:43 +0200 (CEST)
	(envelope-from peter)
Message-Id: <200804070752.m377qh74069403@gate.oper.dinoex.org>
Date: Mon, 7 Apr 2008 09:52:43 +0200 (CEST)
From: Peter Much <pmc@citylink.dinoex.sub.org>
Reply-To: Peter Much <pmc@citylink.dinoex.sub.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: ppp provides deficient DNS info
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         122519
>Category:       bin
>Synopsis:       [patch] ppp(8): ppp provides deficient DNS info
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 07 08:20:00 UTC 2008
>Closed-Date:    
>Last-Modified:  Mon Nov 28 23:50:10 UTC 2011
>Originator:     Peter Much
>Release:        FreeBSD 6.3-RELEASE-p1 i386
>Organization:
n/a
>Environment:
System: FreeBSD edge.oper.dinoex.org 6.3-RELEASE-p1 FreeBSD 6.3-RELEASE-p1 #9: Sat Apr 5 05:37:18 CEST 2008 root@:/usr/src/sys/i386/compile/E1R63V1 i386

nothing special needed

>Description:

ppp, in server-side operation, is supposed to provide 2 DNS
adresses to the calling client. And it should fetch these out of
/etc/resolv.conf.
In fact, it provides only one of these: the second one.

This could even be considered serious because, depending on their
connectivity, it may cost people real money to persistently connect
their second, fall-back nameserver, and they may not notice it too soon.

>How-To-Repeat:

 * configure at least 2 nameservers in your resolv.conf
 * configure your ppp to log IPCP negotiations and to "accept dns" 
   (that means actually that the ppp will accept requests for
   nameserver adresses).
 * bring up a connection and let the connecting peer ask for
   DNS info.
 * read the logfile.

>Fix:

--- usr.sbin/ppp/ipcp.c.orig    2008-04-07 08:44:44.000000000 +0200
+++ usr.sbin/ppp/ipcp.c 2008-04-07 08:47:19.000000000 +0200
@@ -247,7 +247,7 @@
 
           ch = *ncp;
           *ncp = '\0';
-          if (n < 2 && inet_aton(cp, ipcp->ns.dns))
+          if (n < 2 && inet_aton(cp, (ipcp->ns.dns)+n))
             n++;
           *ncp = ch;
 
>Release-Note:
>Audit-Trail:

From: Peter <pmc@citylink.dinoex.sub.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/122519: [patch] ppp(8): ppp provides deficient DNS info
Date: Mon, 28 Nov 2011 23:37:17 +0100

 Hi,
   today it's cleanup day here. Just wanted to have a look if somebody
 bothered to make this whole...
>Unformatted:
