click linux patch for 2.4.20

Eddie Kohler kohler at icir.org
Thu Jan 23 14:43:46 EST 2003


Interesting that you mention that! I just tried to produce a 2.4.20 patch
yesterday. The most interesting thing about 2.4.20 is that they have
produced a function much like our "ptype_dispatch" for their own reasons.
Their function was subtly different from our "ptype_dispatch" in several
worrying ways. In particular, it handled "slave devices" differently. I've
adapted Click's ToHost/ToHostSniffers and the Click patch to use this new
function (netif_receive_skb) instead of ptype_dispatch. I'll check in the
code and the new patch later today, and would looooove testing,
particularly of ToHost and ToHostSniffers....

Eddie


Return-Path: <click at orteliusmaps.com>
Received: from orteliusmaps.com (213-84-252-212.adsl.xs4all.nl [213.84.252.212])
	by amsterdam.lcs.mit.edu (8.11.6/8.11.6) with ESMTP id h0O6FWJ07187
	for <click-nospam at amsterdam.lcs.mit.edu>; Fri, 24 Jan 2003 01:15:32 -0500 (EST)
	(envelope-from click at orteliusmaps.com)
Received: from orteliusmaps.com (213-84-252-212.adsl.xs4all.nl [213.84.252.212])
	by orteliusmaps.com (8.12.5/8.12.5) with ESMTP id h0O6Icl0023392
	for <click-nospam at amsterdam.lcs.mit.edu>; Fri, 24 Jan 2003 07:18:38 +0100
Received: (from click at localhost)
	by orteliusmaps.com (8.12.5/8.12.5/Submit) id h0O6IcBV023390
	for click-nospam at amsterdam.lcs.mit.edu; Fri, 24 Jan 2003 07:18:38 +0100
Received: from amsterdam.lcs.mit.edu (amsterdam.lcs.mit.edu [18.26.4.9])
	by orteliusmaps.com (8.12.5/8.12.5) with ESMTP id h0O6Ial0023379
	for <click at thomer.com>; Fri, 24 Jan 2003 07:18:36 +0100
Received: from coyote.icir.org (coyote.icir.org [192.150.187.37])
	by amsterdam.lcs.mit.edu (8.11.6/8.11.6) with ESMTP id h0O6FJJ07183
	for <click at amsterdam.lcs.mit.edu>; Fri, 24 Jan 2003 01:15:19 -0500 (EST)
	(envelope-from kohler at coyote.icir.org)
Received: from coyote.icir.org (localhost [127.0.0.1])
	by coyote.icir.org (8.12.3/8.12.3) with ESMTP id h0O6FIRk053332
	for <click at pdos.lcs.mit.edu>; Thu, 23 Jan 2003 22:15:18 -0800 (PST)
	(envelope-from kohler at coyote.icir.org)
Message-Id: <200301240615.h0O6FIRk053332 at coyote.icir.org>
To: click at amsterdam.lcs.mit.edu
Subject: Click, packets, dev_hold()
Date: Thu, 23 Jan 2003 22:15:18 -0800
From: Eddie Kohler <kohler at icir.org>
X-MailScanner: Found to be clean, Found to be clean

Linux 2.4 devices have reference counts. Each packet has a pointer to the
device on which it arrived. Linux 2.4 increments the device reference count
by one for each packet that arrived on that device, and decrements the
device reference count by one after processing the packet. We currently
don't bother doing this. We probably should.

The easiest possibility is to increment the reference count only just
before passing a packet to Linux (and decrement it once Linux is done). The
risk is that a device goes away while a packet is squirreled away on some
Click queue. Alternatively we could increment the reference count on
PollDevice or FromDevice, and decrement it whenever we free a packet. But
that would probably get expensive, and I'm not sure we've seen a bug in
practice that could be blamed on this problem. What are people's opinions
here?

Eddie



Return-Path: <click at orteliusmaps.com>
Received: from orteliusmaps.com (213-84-252-212.adsl.xs4all.nl [213.84.252.212])
	by amsterdam.lcs.mit.edu (8.11.6/8.11.6) with ESMTP id h0O6IgJ07297
	for <click-nospam at amsterdam.lcs.mit.edu>; Fri, 24 Jan 2003 01:18:42 -0500 (EST)
	(envelope-from click at orteliusmaps.com)
Received: from orteliusmaps.com (213-84-252-212.adsl.xs4all.nl [213.84.252.212])
	by orteliusmaps.com (8.12.5/8.12.5) with ESMTP id h0O6Lml0024247
	for <click-nospam at amsterdam.lcs.mit.edu>; Fri, 24 Jan 2003 07:21:48 +0100
Received: (from click at localhost)
	by orteliusmaps.com (8.12.5/8.12.5/Submit) id h0O6Lm0u024245
	for click-nospam at amsterdam.lcs.mit.edu; Fri, 24 Jan 2003 07:21:48 +0100
Received: from amsterdam.lcs.mit.edu (amsterdam.lcs.mit.edu [18.26.4.9])
	by orteliusmaps.com (8.12.5/8.12.5) with ESMTP id h0O6Lkl0024234
	for <click at thomer.com>; Fri, 24 Jan 2003 07:21:46 +0100
Received: from coyote.icir.org (coyote.icir.org [192.150.187.37])
	by amsterdam.lcs.mit.edu (8.11.6/8.11.6) with ESMTP id h0O6ITJ07293;
	Fri, 24 Jan 2003 01:18:29 -0500 (EST)
	(envelope-from kohler at coyote.icir.org)
Received: from coyote.icir.org (localhost [127.0.0.1])
	by coyote.icir.org (8.12.3/8.12.3) with ESMTP id h0O6ITRj053362;
	Thu, 23 Jan 2003 22:18:29 -0800 (PST)
	(envelope-from kohler at coyote.icir.org)
Message-Id: <200301240618.h0O6ITRj053362 at coyote.icir.org>
To: decouto at amsterdam.lcs.mit.edu
cc: click at amsterdam.lcs.mit.edu
Subject: [click] 2.4.20
Date: Thu, 23 Jan 2003 22:18:29 -0800
From: Eddie Kohler <kohler at icir.org>
X-MailScanner: Found to be clean, Found to be clean

etc/linux-2.4.20-patch and the necessary changes to tohost[sniffers].cc
have been checked in. Wanna give 'em a whirl??

Kiss,
Eddie



Return-Path: <click at orteliusmaps.com>
Received: from orteliusmaps.com (213-84-252-212.adsl.xs4all.nl [213.84.252.212])
	by amsterdam.lcs.mit.edu (8.11.6/8.11.6) with ESMTP id h0P1XbJ62450
	for <click-nospam at amsterdam.lcs.mit.edu>; Fri, 24 Jan 2003 20:33:37 -0500 (EST)
	(envelope-from click at orteliusmaps.com)
Received: from orteliusmaps.com (213-84-252-212.adsl.xs4all.nl [213.84.252.212])
	by orteliusmaps.com (8.12.5/8.12.5) with ESMTP id h0P1arl0010302
	for <click-nospam at amsterdam.lcs.mit.edu>; Sat, 25 Jan 2003 02:36:53 +0100
Received: (from click at localhost)
	by orteliusmaps.com (8.12.5/8.12.5/Submit) id h0P1arDl010300
	for click-nospam at amsterdam.lcs.mit.edu; Sat, 25 Jan 2003 02:36:53 +0100
Received: from amsterdam.lcs.mit.edu (amsterdam.lcs.mit.edu [18.26.4.9])
	by orteliusmaps.com (8.12.5/8.12.5) with ESMTP id h0P1aol0010289
	for <click at thomer.com>; Sat, 25 Jan 2003 02:36:51 +0100
Received: from out003.verizon.net (out003pub.verizon.net [206.46.170.103])
	by amsterdam.lcs.mit.edu (8.11.6/8.11.6) with ESMTP id h0P1XOJ62447
	for <click at pdos.lcs.mit.edu>; Fri, 24 Jan 2003 20:33:24 -0500 (EST)
	(envelope-from jvasco at verizon.net)
Received: from guru ([138.89.51.63]) by out003.verizon.net
          (InterMail vM.5.01.05.20 201-253-122-126-120-20021101) with ESMTP
          id <20030125013319.VQDQ3094.out003.verizon.net at guru>
          for <click at pdos.lcs.mit.edu>; Fri, 24 Jan 2003 19:33:19 -0600
Message-ID: <00c501c2c411$e2f413d0$651ca8c0 at guru>
From: "Jose Vasconcellos" <jvasco at verizon.net>
To: <click at amsterdam.lcs.mit.edu>
Subject: ICMPPingRewriter bug
Date: Fri, 24 Jan 2003 20:34:20 -0500
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
X-Authentication-Info: Submitted using SMTP AUTH at out003.verizon.net from [138.89.51.63] at Fri, 24 Jan 2003 19:33:19 -0600
X-MailScanner: Found to be clean, Found to be clean
X-MailScanner-SpamScore: ss, ss

It seems that ICMPPingRewriter is not processing the arguments
correctly. If the second argument is an address it always prints
an error. The patch below hopefully fixes this.

Jose

*** icmppingrewriter.cc Fri Jan 24 20:25:50 2003
--- icmppingrewriter.cc~        Mon Sep 16 01:30:50 2002
***************
*** 65,71 ****

    if (conf[1] == "-")
      _new_dst = IPAddress();
!   else if (!cp_ip_address(conf[1], &_new_dst, this))
      ok = errh->error("argument 2 should be new destination address (IP
address)");

    return ok;
--- 65,71 ----

    if (conf[1] == "-")
      _new_dst = IPAddress();
!   else if (!cp_ip_address(conf[0], &_new_dst, this))
      ok = errh->error("argument 2 should be new destination address (IP
address)");

    return ok;



Return-Path: <click at orteliusmaps.com>
Received: from orteliusmaps.com (213-84-252-212.adsl.xs4all.nl [213.84.252.212])
	by amsterdam.lcs.mit.edu (8.11.6/8.11.6) with ESMTP id h0PMwwJ11871
	for <click-nospam at amsterdam.lcs.mit.edu>; Sat, 25 Jan 2003 17:58:58 -0500 (EST)
	(envelope-from click at orteliusmaps.com)
Received: from orteliusmaps.com (213-84-252-212.adsl.xs4all.nl [213.84.252.212])
	by orteliusmaps.com (8.12.5/8.12.5) with ESMTP id h0PN2Nl0004648
	for <click-nospam at amsterdam.lcs.mit.edu>; Sun, 26 Jan 2003 00:02:23 +0100
Received: (from click at localhost)
	by orteliusmaps.com (8.12.5/8.12.5/Submit) id h0PN2Nsu004646
	for click-nospam at amsterdam.lcs.mit.edu; Sun, 26 Jan 2003 00:02:23 +0100
Received: from amsterdam.lcs.mit.edu (amsterdam.lcs.mit.edu [18.26.4.9])
	by orteliusmaps.com (8.12.5/8.12.5) with ESMTP id h0PN2Jl0004635
	for <click at thomer.com>; Sun, 26 Jan 2003 00:02:19 +0100
Received: from out005.verizon.net (out005pub.verizon.net [206.46.170.143])
	by amsterdam.lcs.mit.edu (8.11.6/8.11.6) with ESMTP id h0PMwgJ11868
	for <click at pdos.lcs.mit.edu>; Sat, 25 Jan 2003 17:58:42 -0500 (EST)
	(envelope-from jvasco at verizon.net)
Received: from guru ([138.89.51.63]) by out005.verizon.net
          (InterMail vM.5.01.05.20 201-253-122-126-120-20021101) with ESMTP
          id <20030125225837.KVVW16306.out005.verizon.net at guru>
          for <click at pdos.lcs.mit.edu>; Sat, 25 Jan 2003 16:58:37 -0600
Message-ID: <005001c2c4c5$70ad6b50$651ca8c0 at guru>
From: "Jose Vasconcellos" <jvasco at verizon.net>
To: <click at amsterdam.lcs.mit.edu>
Subject: IPGWOptions question
Date: Sat, 25 Jan 2003 17:59:38 -0500
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
X-Authentication-Info: Submitted using SMTP AUTH at out005.verizon.net from [138.89.51.63] at Sat, 25 Jan 2003 16:58:36 -0600
X-MailScanner: Found to be clean, Found to be clean
X-MailScanner-SpamScore: ss, ss

Looking at IPGWOptions::handle_options, there is a loop to
process all the options. There is also the following length check:

    if(oi + xlen > olen)
      break;

This will exit the loop. My question is why isn't this an error. It
means that there is an option with the wrong length. Why not go
the send_error processing?

Jose



Return-Path: <click at orteliusmaps.com>
Received: from orteliusmaps.com (213-84-252-212.adsl.xs4all.nl [213.84.252.212])
	by amsterdam.lcs.mit.edu (8.11.6/8.11.6) with ESMTP id h0R2MT381778
	for <click-nospam at amsterdam.lcs.mit.edu>; Sun, 26 Jan 2003 21:22:30 -0500 (EST)
	(envelope-from click at orteliusmaps.com)
Received: from orteliusmaps.com (213-84-252-212.adsl.xs4all.nl [213.84.252.212])
	by orteliusmaps.com (8.12.5/8.12.5) with ESMTP id h0R2QCl0017452
	for <click-nospam at amsterdam.lcs.mit.edu>; Mon, 27 Jan 2003 03:26:12 +0100
Received: (from click at localhost)
	by orteliusmaps.com (8.12.5/8.12.5/Submit) id h0R2QCAN017450
	for click-nospam at amsterdam.lcs.mit.edu; Mon, 27 Jan 2003 03:26:12 +0100
Received: from amsterdam.lcs.mit.edu (amsterdam.lcs.mit.edu [18.26.4.9])
	by orteliusmaps.com (8.12.5/8.12.5) with ESMTP id h0R2Q4l0017436
	for <click at thomer.com>; Mon, 27 Jan 2003 03:26:05 +0100
Received: from coyote.icir.org (coyote.icir.org [192.150.187.37])
	by amsterdam.lcs.mit.edu (8.11.6/8.11.6) with ESMTP id h0R2ME381772
	for <click at amsterdam.lcs.mit.edu>; Sun, 26 Jan 2003 21:22:15 -0500 (EST)
	(envelope-from kohler at coyote.icir.org)
Received: from coyote.icir.org (localhost [127.0.0.1])
	by coyote.icir.org (8.12.3/8.12.3) with ESMTP id h0R2MDRj077266;
	Sun, 26 Jan 2003 18:22:13 -0800 (PST)
	(envelope-from kohler at coyote.icir.org)
Message-Id: <200301270222.h0R2MDRj077266 at coyote.icir.org>
To: "Jose Vasconcellos" <jvasco at verizon.net>
cc: click at amsterdam.lcs.mit.edu
Subject: Re: ICMPPingRewriter bug 
In-Reply-To: Message from "Jose Vasconcellos" <jvasco at verizon.net> 
   of "Fri, 24 Jan 2003 20:34:20 EST." <00c501c2c411$e2f413d0$651ca8c0 at guru> 
Date: Sun, 26 Jan 2003 18:22:13 -0800
From: Eddie Kohler <kohler at icir.org>
X-MailScanner: Found to be clean, Found to be clean

Jose,

Thanks for the patch!

Eddie





More information about the click mailing list