From owner-freebsd-net@FreeBSD.ORG Thu Sep 16 19:38:57 2010 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A265106564A for ; Thu, 16 Sep 2010 19:38:57 +0000 (UTC) (envelope-from if@xip.at) Received: from chile.gbit.at (ns1.xip.at [193.239.188.99]) by mx1.freebsd.org (Postfix) with ESMTP id 606D08FC12 for ; Thu, 16 Sep 2010 19:38:55 +0000 (UTC) Received: (qmail 11673 invoked from network); 16 Sep 2010 21:38:53 +0200 Received: from unknown (HELO filebunker.xip.at) (86.59.10.180) by chile.gbit.at with (DHE-RSA-AES256-SHA encrypted) SMTP; 16 Sep 2010 21:38:53 +0200 Date: Thu, 16 Sep 2010 21:38:51 +0200 (CEST) From: Ingo Flaschberger To: Qing Li In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="168430090-1874193526-1284665933=:5369" Cc: "Li, Qing" , net@freebsd.org Subject: Re: funny ECMP X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 19:38:57 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --168430090-1874193526-1284665933=:5369 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Hi Qing, version 4 o patch... fixed deleting interface loopback routes. Kind regards, Ingo Flaschberger --168430090-1874193526-1284665933=:5369 Content-Type: TEXT/plain; name=mpath_patch_if_v4.txt Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=mpath_patch_if_v4.txt ZGlmZiAtdSAtciAvdXNyX2RpZmYvc3JjL3N5cy9jb250cmliL2lwZmlsdGVy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