Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Jul 2007 14:10:05 GMT
From:      Vernon Schryver <vjs@calcite.rhyolite.com>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/111493: routed doesn't use multicasts for RIPv2 via P2P interfaces
Message-ID:  <200707211410.l6LEA5WS075120@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/111493; it has been noted by GNATS.

From: Vernon Schryver <vjs@calcite.rhyolite.com>
To: dan@obluda.cz, freebsd-gnats-submit@FreeBSD.org
Cc: bms@incunabulum.net, carlson@workingcode.com
Subject: Re: bin/111493: routed doesn't use multicasts for RIPv2 via P2P interfaces
Date: Sat, 21 Jul 2007 13:45:45 GMT

 I'm sending a copy of this to James Carlson, who knows a lot about the
 `routed` code.
 
 
 The description in 
 http://www.freebsd.org/cgi/query-pr.cgi?pr=111493
 says:
 
     RIPv2 should use multicasts when possible. Current code test
     IFF_MULTICAST on IFF_BROADCAST interfaces only. It doesn't use
     multicast on non-broadcast interfaces even they are multicast
     capable.
 
 If an interface is point-to-point (it sets the IFF_POINTOPOINT bit),
 is it right to send to the RIPv2 multicast address?
 Even on a GRE tunnel, why isn't it better to unicast to the router at
 the other end of the tunnel instead of multicasting?
 I have the impression that GRE tunnels are utterly wierd--is the
 remote IP address of the GRE interface not that of the remote router?
 
 
 I also wonder if the proposed patch does what it is intended to do.
 Consider the error of the missing () in the first change:
 
 @@ -140,7 +140,7 @@
                  flags = MSG_DONTROUTE;
                  break;
          case OUT_MULTICAST:
 -                if (ifp->int_if_flags & IFF_POINTOPOINT) {
 +                if (ifp->int_if_flags & IFF_POINTOPOINT && ! ifp->int_if_flags & IFF_MULTICAST) {
                          msg = "Send pt-to-pt";
 
 C precedence rules require that expression be parsed as
              (!ifp->int_if_flags) & IFF_MULTICAST
 ifp->int_if_flags never 0,
 and so (!ifp->int_if_flags) is always 0
 and so ((!ifp->int_if_flags) & IFF_MULTICAST) is always 0
 and so the first alternative will never be taken even for ordinary, non-GRE
 point-to-point interfaces.
 
 
 I would be happier about the proposed change (with the () error
 fixed) if there were a test case or at least a description of the
 failure with the current code.
 
 
 Vernon Schryver    vjs@rhyolite.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707211410.l6LEA5WS075120>