Subject: Re: Comments on 2292bis (Adv. API)

From: Francis Dupont <[email-masked]>
Date: Wed, 01 Sep 1999 19:53:24 +0200

In your previous mail you wrote:

   bind() conceptually specifies the local part of the address and not
   where things are sent.
   
   Thus it would make more sense to ask
   	if you bind to link-local X with ifindex 2
   will that reject packets sent to link-local address X which arrive on some
   other interface?
   
=> the answer should be yes (ie. packets are rejected, this is what
I have implemented).

[email-masked]
--------------------------------------------------------------------
IETF IPng Working Group Mailing List
IPng Home Page:                      http://playground.sun.com/ipng
FTP archive:                      ftp://playground.sun.com/pub/ipng
Direct all administrative requests to [email-masked]
--------------------------------------------------------------------

---

From: "Aaron Griggs" <[email-masked]>
Date: Wed, 1 Sep 1999 14:09:25 -0400

> > - if we set a non-zero value to sin6_scope_id and a global unicast
> >   address to sin6_addr, what should the kernel do? Return an error?
> >   Ignore the value? Or send the packet to the interface whose index is
> >   the specified value?
>
> Ignore or error sounds reasonable.

Is there a reason why scope_id is not used for the global unicast addresses?

> >   Which value should the kernel set to sin6_scope_id when receiving
> >   from a global address?
>
> Zero.

Again, why not set the interface value on which the global unicast addresses
was received?

Aaron

---

From: Francis Dupont <[email-masked]>
Date: Wed, 01 Sep 1999 20:26:36 +0200

=> because the scope_id is defined (?) only for local scopes.

   
=> because someone else would like to get the site identifier on which
the global unicast addresses was received: if you need the interface
value in this case you have to use a more specific device.

Regards

[email-masked]

---

From: "Aaron Griggs" <[email-masked]>
Date: Wed, 1 Sep 1999 14:55:13 -0400

> => because the scope_id is defined (?) only for local scopes.

Basic Socket Interface Extensions for IPv6 (rfc 2553) says about
sin6_scope_id:
<start of spec>
   The sin6_scope_id field is a 32-bit integer that identifies a set of
   interfaces as appropriate for the scope of the address carried in the
   sin6_addr field.  For a link scope sin6_addr sin6_scope_id would be
   an interface index.  For a site scope sin6_addr, sin6_scope_id would
   be a site identifier.  The mapping of sin6_scope_id to an interface
   or set of interfaces is left to implementation and future
   specifications on the subject of site identifiers.
<end of spec>

I assumed link scope sin6_addr was both link-local and global.  Maybe,
specifying "link-local" instead of "link" would help clarify.

> value in this case you have to use a more specific device.

So to specify an interface index for global unicast addresses, I should use
IPV6_PKTINFO instead of the scope_id.

Aaron

---

From: Francis Dupont <[email-masked]>
Date: Wed, 01 Sep 1999 21:31:06 +0200

=> you know the English language far more than me but I believe that
"link-local scope" == "link scope" + a redundancy ?

=> until the sin6_scope_id semantic is defined for the global scope
I think you have to do that but it is only useful when you have multiple
routes for the same destination (then the kernel can select one using
the specified interface). Is it something really useful? All the examples
with IPV6_PKTINFO (and now sin6_scope_id) are not with global unicasts.

Regards

[email-masked]

---

From: Erik Nordmark <[email-masked]>
Date: Wed, 1 Sep 1999 20:25:01 -0700 (PDT)

> Is there a reason why scope_id is not used for the global unicast addresses?

There are two different ways to answer.
1. The scope-id isn't an interface index - it is something which identifies
   the "domain" to which the address belongs. For global addresses there
   is only one domain ("global") since they are globally routable.
   For link-local and site-local there are potentially multiple domains.
2. The motivation for adding sin6_scope_id was so that a class of simple
   applications (like the UDP echo server which calls recvfrom and then sendto)
   will work on nodes with multiple interfaces (for link-local addresses)
   and on "multi-sited" nodes (for site-local addresses).
   The advanced API has support for applications which want to control
   the outbound interface (as well as other parameters) independent of
   the scope of the destination address.

    Erik

---

From: JINMEI Tatuya / 神明達哉<[email-masked]>
Date: Fri, 03 Sep 1999 15:33:55 +0900

>>>>> On Tue, 31 Aug 1999 14:22:59 -0700 (PDT), 
>>>>> Erik Nordmark <[email-masked]> said:

>> - suppose that  we set a non-zero value to sin6_scope_id, set a
>> link-local address to sin6_addr, and call bind() with the socket
>> address. When we try to send a packet to the socket, should the
>> kernel send the packet to the interface specified by the
>> sin6_scope_id passed to bind()?

> Good question.

> will that reject packets sent to link-local address X which arrive on some

In KAME, the answer is yes. The KAME kernel always takes interface
indices into accont when looking up PCB for a packet with link-local
source or destination.

					JINMEI, Tatuya
					Communication Platform Lab.
					Corporate R&D Center, Toshiba Corp.
					[email-masked]
--------------------------------------------------------------------
IETF IPng Working Group Mailing List
IPng Home Page:                      http://playground.sun.com/ipng
FTP archive:                      ftp://playground.sun.com/pub/ipng
Direct all administrative requests to [email-masked]
--------------------------------------------------------------------