]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: Treat ifaces withouth IPv4 as unnumbered 3908/head
authorTuetuopay <tuetuopay@me.com>
Tue, 5 Mar 2019 18:19:28 +0000 (19:19 +0100)
committerTuetuopay <tuetuopay@me.com>
Thu, 7 Mar 2019 09:42:31 +0000 (10:42 +0100)
The current definition of an unnumberd interface as an interface with a
/32 IPv4 is too restrictive, especially for EVPN symmetric routing since
commit 2b83602b2 "*: Explicitly mark nexthop of EVPN-sourced routes as
onlink".

It removes the bypass check wether the nexthop is an EVPN VTEP, and
relies on the SVI to be unnumberd to bypass the gateway lookup. While
this works great if the SVI has an IP, it might not, and the test falls
flat and EVPN type 5 routes are not installed into the RIB.

Sample interface setup, where vxlan-blue is the L3VNI and br-blue the
SVI:

              +----------+
              |          |
              | vrf-blue |
              |          |
              +---+--+---+
                  |  |
          +-------+  +-----------+
          |                      |
     +----+----+       +---------+---------+
     |         |       |        br1        |
     | br-blue |       |    10.0.0.1/24    |
     |         |       +-+-------+-------+-+
     +----+----+         |       |       |
          |              |       |       |
    +-----+------+ +-----+--+ +--+---+ +-+----+
    |            | |        | |      | |      |
    | vxlan-blue | | vxlan1 | | eth1 | | eth2 |
    |            | |        | |      | |      |
    +------------+ +--------+ +------+ +------+

For inter-VNI routing, the SVI has no reason to have an IP, but it still
needs type-5 routes from remote VTEPs.

This commit expands the definition of an unnumberd interface to an
interface having a /32 IPv4 or no IPv4 at all.

Signed-off-by: Tuetuopay <tuetuopay@me.com>
zebra/connected.c

index c449855f6dfb40901485e334a6b60a2544887ea9..128f397552e506b3075297b9db81bd16f73e86ca 100644 (file)
@@ -594,5 +594,5 @@ int connected_is_unnumbered(struct interface *ifp)
                        return CHECK_FLAG(connected->flags,
                                          ZEBRA_IFA_UNNUMBERED);
        }
-       return 0;
+       return 1;
 }