Subject: hop limit API question

From: Richard Draves <[email-masked]>
Date: Thu, 26 Aug 1999 10:35:31 -0700

What are the semantics of setting a zero hop limit with the
IPV6_UNICAST_HOPS and IPV6_MULTICAST_HOPS socket options?

Does it mean that packets can not leave the sending node, but can be
received through loopback? (If the destination address is assigned to the
outgoing interface and for multicast, if IPV6_MULTICAST_LOOP allows
loopback.)

Rich
--------------------------------------------------------------------
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: Francis Dupont <[email-masked]>
Date: Thu, 26 Aug 1999 22:11:42 +0200

In your previous mail you wrote:

   
=> there are two cases :
 - unicast (IPV6_UNICAST_HOPS) : packets have a zero hop limit (then they
   can't be forwarded because 0 is less than or equal to 1, cf RFC 2460
   4.4 about routing header processing). I don't think zero TTL/hop limit
   *unicast* packets are forbiden on the wire.
 - multicast (IPV6_MULTICAST_HOPS) : this case should be the same but
   in general we have kept the IPv4 behavior then they are not sent
   on the wire but if IPV6_MULTICAST_LOOP was set and a receiver was
   declared (with IPV6_JOIN_GROUP aka IPV6_ADD_MEMBERSHIP) then the
   packet is looped and not dropped.

The usual BSD piece of code is :

                }
                /*
                 * Multicasts with a time-to-live of zero may be looped-
                 * back, above, but must not be transmitted on a network.
                 * Also, multicasts addressed to the loopback interface
                 * are not sent -- the above call to ip6_mloopback() will
                 * loop back a copy if this host actually belongs to the
                 * destination group on the loopback interface.
                 */
                if (ip->ip6_hlim == 0 || (ifp->if_flags & IFF_LOOPBACK) != 0) {
                        m_freem(m0);
                        ...

I think this behavior is not bad then should be kept ?

[email-masked]

---

From: Erik Nordmark <[email-masked]>
Date: Thu, 26 Aug 1999 20:53:24 -0700 (PDT)

> IPV6_UNICAST_HOPS and IPV6_MULTICAST_HOPS socket options?

We've implemented the multicast behavior to match the IPv4 behavior
just like Francis (loop back to any local members on the sending interface
if IPV6_MULTICAST_LOOP is set).

For unicast we make no checks thus packets would be transmitted with
a zero hoplimit.

  Erik