From owner-freebsd-net@FreeBSD.ORG Fri Jul 4 03:27:18 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 370E11065670 for ; Fri, 4 Jul 2008 03:27:18 +0000 (UTC) (envelope-from gcshekhar@sbcglobal.net) Received: from web81002.mail.mud.yahoo.com (web81002.mail.mud.yahoo.com [68.142.199.82]) by mx1.freebsd.org (Postfix) with SMTP id F0C6C8FC1C for ; Fri, 4 Jul 2008 03:27:17 +0000 (UTC) (envelope-from gcshekhar@sbcglobal.net) Received: (qmail 55190 invoked by uid 60001); 4 Jul 2008 03:00:37 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=sbcglobal.net; h=Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=MrlQ4oncn9KHKnjm64Vi8DX+njdIPgq/Xs/hhPfNCp9SCYpxGUEf3+zHQES+3qH3mtzarkqNs+L5mtohxPvvxiTN3+uAyocf4fcy0JzWb9mQhWEi7zWybJACV+1bHH+ow+Cw6T6ue+axqRdrdUHe1NyAiCF333+1tr66g4tUfZQ=; Received: from [65.113.40.1] by web81002.mail.mud.yahoo.com via HTTP; Thu, 03 Jul 2008 20:00:37 PDT X-Mailer: YahooMailRC/975.45 YahooMailWebService/0.7.199 Date: Thu, 3 Jul 2008 20:00:37 -0700 (PDT) From: Shekhar Chandrashekhar To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <370399.55106.qm@web81002.mail.mud.yahoo.com> Subject: Incorrect ipv6 prefix detaching behavior? 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: Fri, 04 Jul 2008 03:27:18 -0000 I'm running into an issue where nd6_rtr.c:pfxlist_onlink_check() is possibly not doing the right thing by marking a prefix as not ONLINK - I've noticed this behavior in both FreeBSD 6 and 7. I have an interface (say fxp0) which has an router-advertised address for access outside the local subnet (fc00:10:1:2::/64 prefix) and a static address (fc00:10:1:1::/64) for connecting to servers on the same subnet. The def router only advertises the fc00:10:1:2:: prefix. However, as you see from the "flags=LD" below, freebsd seems to mark the fc00:10:1:1::/64 prefix as detached and always forwards to the def router even for a dest in the fc00:10:1:1:: subnet. # ndp -p ;# abbreviated for interesting prefixes fc00:10:1:2::/64 if=fxp0 flags=LAO vltime=2592000, pltime-604800, expire=29d23h59m50s, ref=1 advertised by fe80::214:f604:65f0:93f0%fxp0 (reachable) fc00:10:1:1::/64 if=fxp0 flags=LD vltime=0, pltime=0, expired, ref=1 No advertising router The code in question (around line 1396 of n6_rtr.c) seems to mark any non-advertised prefix as detached - the comment in front of this segment (around line 1376) indicates this is done to take care of a move to a different network: if ((pr->ndpr_stateflags & NDPRF_DETACHED) == 0 && find_pfxlist_reachable_router(pr) == NULL) ---> pr->ndpr_stateflags |= NDPRF_DETACHED; If this is still the current thinking, it looks like my usage scenario is incorrect and I would like to understand why that is so. And what is the workaround? If not and this is a bug, then would suggest a addition to the code to allow only "non-static" prefixes to be detached... if ((pr->ndpr_stateflags & NDPRF_DETACHED) == 0 && find_pfxlist_reachable_router(pr) == NULL && pr->ndpr_pltime != ND6_INFINITE_LIFETIME) pr->ndpr_stateflags |= NDPRF_DETACHED; Thanks in advance for your help, --shekhar ------------------------------------------------------------------------------------------------- (gcshekhar AT sbc NOSPACE global DOT net) Confidence is the feeling you have before you understand the situation