Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Jul 2001 09:40:02 -0700 (PDT)
From:      Brian Somers <brian@Awfulhak.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/28974: PPPoE software fails when SOCK_RAW employed 
Message-ID:  <200107151640.f6FGe2D89816@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/28974; it has been noted by GNATS.

From: Brian Somers <brian@Awfulhak.org>
To: Roman Shterenzon <roman@xpert.com>
Cc: Brian Somers <brian@Awfulhak.org>, Brad Laue <brad@brad-x.com>,
	FreeBSD-gnats-submit@FreeBSD.ORG, brian@Awfulhak.org
Subject: Re: kern/28974: PPPoE software fails when SOCK_RAW employed 
Date: Sun, 15 Jul 2001 17:33:19 +0100

 > On Sun, 15 Jul 2001, Brian Somers wrote:
 > 
 > > Hi,
 > >
 > > I've marked hping as BROKEN for the time being as email addressed to
 > > the maintainer bounces.
 > 
 > How come it bounces? I got _this_ mail, perhaps the other one was sent to
 > the wrong address?
 > 
 > So, what seems to be the problem?
 
 Hi,
 
 I got this back from your mailer.  I'm happy to reverse my (maybe a 
 bit hasty) BROKEN addition if you've got a compelling argument :)
 
 : This message was created automatically by mail delivery software (Exim).
 : 
 : A message that you sent could not be delivered to one or more of its
 : recipients. This is a permanent error. The following address(es) failed:
 ; 
 :   roman@jamus.xpert.com
 :     (generated from roman@xpert.com)
 :     SMTP error from remote mailer after RCPT TO:<roman@jamus.xpert.com>:
 :     host jamus.xpert.com [199.203.132.17]: 550-MAIL BLOCKED; See http://www.e-scrub.com/orbs/
 :     550 mail from 199.203.132.1 rejected: administrative prohibition
 : 
 : ------ This is a copy of the message, including all the headers. ------
 : 
 : Return-path: <brian@Awfulhak.org>
 : Received: from gw.awfulhak.org
 : 	([217.204.245.18] helo=Awfulhak.org ident=root)
 : 	by void.xpert.com with esmtp (Exim 3.20 #1)
 : 	id 15LbAZ-0006wV-00
 : 	for roman@xpert.com; Sun, 15 Jul 2001 04:58:04 +0300
 : Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [172.16.0.12])
 : 	by Awfulhak.org (8.11.4/8.11.4) with ESMTP id f6F2xtY28153;
 : 	Sun, 15 Jul 2001 03:59:57 +0100 (BST)
 : 	(envelope-from brian@lan.Awfulhak.org)
 : Received: from hak.lan.Awfulhak.org (brian@localhost [127.0.0.1])
 : 	by hak.lan.Awfulhak.org (8.11.4/8.11.4) with ESMTP id f6F31vm91086;
 : 	Sun, 15 Jul 2001 04:01:57 +0100 (BST)
 : 	(envelope-from brian@hak.lan.Awfulhak.org)
 : Message-Id: <200107150301.f6F31vm91086@hak.lan.Awfulhak.org>
 : X-Mailer: exmh version 2.3.1 01/18/2001 with nmh-1.0.4
 : To: brad@brad-x.com
 : cc: FreeBSD-gnats-submit@FreeBSD.ORG, brian@Awfulhak.org, roman@xpert.com
 : Subject: Re: kern/28974: PPPoE software fails when SOCK_RAW employed 
 : In-Reply-To: Message from brad@brad-x.com 
 :    of "Sat, 14 Jul 2001 16:52:50 EDT." <20010714205250.30F567B1D4@TMA-1.brad-x.com> 
 : Mime-Version: 1.0
 : Content-Type: text/plain; charset=us-ascii
 : Date: Sun, 15 Jul 2001 04:01:56 +0100
 : From: Brian Somers <brian@Awfulhak.org>
 : 
 : > >Number:         28974
 : > >Category:       kern
 : > >Synopsis:       PPPoE software fails when SOCK_RAW employed
 : 
 : Heh, I tried the hping port and found that it didn't work at all for 
 : me.  After looking at the sources, it seems that it's misparsing the 
 : results of the SIOCGIFCONF (patch attached), but after looking at the 
 : sources for a bit longer, I really think this port should be marked 
 : BROKEN -- see the rest of my rantings below.  I've cc'd the maintainer.
 : 
 : I've only looked at two functions.  The first is get_if_name() in 
 : getifname.c:
 : 
 :   o It mis parses the ifreq array returned from SIOCGIFCONF (see 
 :     patch below)
 : 
 :   o It's got a rather pessimistic idea that a machine will only 
 :     have up to 16 interface addresses -- unlikely in my experience.
 : 
 :   o It doesn't find the most appropriate interface, it just picks the 
 :     first one it finds that's UP.  This program doesn't look like it 
 :     works on machines with more than one interface.
 : 
 :   o It doesn't handle non-AF_INET addresses.
 : 
 :   o It hard-codes the MTU at 1500
 : 
 : 
 : The second function I looked at -- which prevents hping working for 
 : PPPoE is get_linkhdr_size() in getlhs.c.
 : 
 : This function is ridiculous.  Not only does it hard-code lots of 
 : interface names (leaving out tun*), but it even gets that wrong by 
 : using strstr().
 : 
 : roman, is there any chance of fixing this port -- or should I just 
 : mark it BROKEN ?
 : 
 : brad, it seems that when the above two functions are made to work 
 : (with a little hard-coding in my case), hpinging an address that's 
 : reached through the tun interface over a PPPoE link works.  I think 
 : you should raise several bug reports, one for each of the programs 
 : that you find doesn't work.  Let's leave this one as applying to 
 : hping.  Is that ok ?
 : 
 : Cheers.
 : 
 : -- 
 : Brian <brian@freebsd-services.com>                <brian@Awfulhak.org>
 :       http://www.freebsd-services.com/        <brian@[uk.]FreeBSD.org>
 : Don't _EVER_ lose your sense of humour !      <brian@[uk.]OpenBSD.org>
 : 
 : 
 : --- getifname.c.orig	Thu Jul  6 18:06:10 2000
 : +++ getifname.c	Sun Jul 15 02:52:01 2001
 : @@ -52,7 +52,7 @@
 :  	ifrp = ibuf;
 :  	ifend = (struct ifreq*) ((char*)ibuf + ifc.ifc_len);
 :  
 : -	for (; ifrp < ifend; ifrp++) {
 : +	for (; ifrp < ifend; ifrp = (char *)&ifrp->ifr_addr + ifrp->ifr_addr.sa_len) {
 :  		strncpy(ifr.ifr_name, ifrp->ifr_name, sizeof(ifr.ifr_name));
 :  
 :  		if ( ioctl(fd, SIOCGIFFLAGS, (char*)&ifr) == -1) {
 : 
 : 
 
 > --Roman Shterenzon, UNIX System Administrator and Consultant
 > [ Xpert UNIX Systems Ltd., Herzlia, Israel. Tel: +972-9-9522361 ]
 
 -- 
 Brian <brian@freebsd-services.com>                <brian@Awfulhak.org>
       http://www.freebsd-services.com/        <brian@[uk.]FreeBSD.org>
 Don't _EVER_ lose your sense of humour !      <brian@[uk.]OpenBSD.org>
 
 

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?200107151640.f6FGe2D89816>