Date: Wed, 10 Aug 2011 08:48:25 +0000 From: "Li, Qing" <qing.li@bluecoat.com> To: Kevin Lo <kevlo@kevlo.org>, Svatopluk Kraus <onwahe@gmail.com> Cc: Jeremiah Lott <jlott@averesystems.com>, "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>, Andrew Boyer <aboyer@averesystems.com> Subject: RE: [patch] Problem with two NIC on same NET (in_scrubprefix: err=17, new prefix add failed) Message-ID: <B143A8975061C446AD5E29742C5317230E16CD@PWSVL-EXCMBX-01.internal.cacheflow.com> In-Reply-To: <1312960023.2614.12.camel@srgsec> References: <CAFHCsPUpkr-vne%2B9cLnovUXDGeVrOzHrKp1YAub=TjJW_3aVtg@mail.gmail.com> <92B5D566-9816-4134-9358-2306D0F7DAFC@averesystems.com> <1312781293.2521.1.camel@srgsec> <CAFHCsPVM1iGehjt8AAiwhQvW81GqLjjf7SO_-OnWzYBadQ0jmw@mail.gmail.com>, <1312960023.2614.12.camel@srgsec>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi,=0A= =0A= >=0A= > I've continued with work on two NIC on same NET. Now, with=0A= > point-to-point interfaces too and I have more small fixes which I=0A= > submitted today:=0A= >=0A= > http://www.freebsd.org/cgi/query-pr.cgi?pr=3D159600=0A= >=0A= =0A= The fix is not entirely correct. The "rtinitflags()" could set RTF_HOS= T flag when the interface=0A= type is IFF_LOOPBACK, not necessarily a PPP llink. =0A= =0A= >=0A= > http://www.freebsd.org/cgi/query-pr.cgi?pr=3D159601=0A= > http://www.freebsd.org/cgi/query-pr.cgi?pr=3D159602=0A= > http://www.freebsd.org/cgi/query-pr.cgi?pr=3D159603=0A= >=0A= =0A= I need to run some tests on your patch, but keep in mind the LLE_STATI= C is sort overloaded=0A= to take care of the case where static routes are maintained in the rou= ting table while dynamic =0A= routes are removed when the interface is taken down.=0A= =0A= >=0A= > I have one more related problem, but I'm not sure how complex the fix sho= uld be.=0A= >=0A= > When an interface is marked down a network route is deleted (or=0A= > replaced) and a loopback route persists in routing table. It is OK.=0A= > However, when an interface is marked up again, then a network route is=0A= > installed unconditionally (but error is ignored) and a loopbak route=0A= > is deleted and added immediately and unconditionally too. IMHO, it is=0A= > not correct behaviour. I think that a second half of in_ifinit()=0A= > should be here starting by in_addprefix() call with some small or=0A= > bigger changes.=0A= >=0A= =0A= Unless you have a really good reason, other than code inspection, and= have=0A= a set of test cases, please leave this code alone for now. See below = ...=0A= =0A= >=0A= > Maybe, adding network route and ignoring error could be OK, but=0A= > deleting loopback route should be done under IFA_RTSELF flag is set=0A= > condition (with existing route refcount check). V_useloopback should=0A= > be check before re-adding the route and existing route must be check=0A= > to evaluate refcount correctly. The proposed patch is attached.=0A= >=0A= =0A= Did you read my code comment in "in.c", at line 1115 ?=0A= =0A= >=0A= > However, I prefer to call in_addprefix() (which is static now) instead=0A= > of rtinit() and add some more checks from in_ifinit(). Can you (or=0A= > anyone) review the patch?=0A= >=0A= =0A= There are quite a few cases to cover, including bootp, which takes a d= ifferent code path=0A= than DHCP through the routing code. I would appreciate that you test t= hese cases before =0A= making any code commits. It's taken some time to get the overall routi= ng code stabilized. =0A= There is still a bug in the Radix code that needs fixing.=0A= =0A= -- Qing=0A= =0A= =0A= =0A=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B143A8975061C446AD5E29742C5317230E16CD>