RE: [patch] Problem with two NIC on same NET (in_scrubprefix: err=17, new prefix add failed)

From: Li, Qing <qing.li_at_bluecoat.com>
Date: Wed, 10 Aug 2011 08:48:25 +0000
  Hi,

>
> I've continued with work on two NIC on same NET. Now, with
> point-to-point interfaces too and I have more small fixes which I
> submitted today:
>
> http://www.freebsd.org/cgi/query-pr.cgi?pr=159600
>

     The fix is not entirely correct. The "rtinitflags()" could set RTF_HOST flag when the interface
      type is IFF_LOOPBACK, not necessarily a PPP llink. 

>
> http://www.freebsd.org/cgi/query-pr.cgi?pr=159601
> http://www.freebsd.org/cgi/query-pr.cgi?pr=159602
> http://www.freebsd.org/cgi/query-pr.cgi?pr=159603
>

     I need to run some tests on your patch, but keep in mind the LLE_STATIC is sort overloaded
     to take care of the case where static routes are maintained in the routing table while dynamic 
     routes are removed when the interface is taken down.

>
> I have one more related problem, but I'm not sure how complex the fix should be.
>
> When an interface is marked down a network route is deleted (or
> replaced) and a loopback route persists in routing table. It is OK.
> However, when an interface is marked up again, then a network route is
> installed unconditionally (but error is ignored) and a loopbak route
> is deleted and added immediately and unconditionally too. IMHO, it is
> not correct behaviour. I think that a second half of in_ifinit()
> should be here starting by in_addprefix() call with some small or
> bigger changes.
>

      Unless you have a really good reason, other than code inspection, and have
      a set of test cases, please leave this code alone for now. See below ...

>
> Maybe, adding network route and ignoring error could be OK, but
> deleting loopback route should be done under IFA_RTSELF flag is set
> condition (with existing route refcount check). V_useloopback should
> be check before re-adding the route and existing route must be check
> to evaluate refcount correctly. The proposed patch is attached.
>

      Did you read my code comment in "in.c", at line 1115 ?

>
> However, I prefer to call in_addprefix() (which is static now) instead
> of rtinit() and add some more checks from in_ifinit(). Can you (or
> anyone) review the patch?
>
 
     There are quite a few cases to cover, including bootp, which takes a different code path
     than DHCP through the routing code. I would appreciate that you test these cases before 
     making any code commits. It's taken some time to get the overall routing code stabilized. 
     There is still a bug in the Radix code that needs fixing.

    -- Qing




Received on Wed Aug 10 2011 - 07:00:44 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:16 UTC