dummy_prefix.family = AF_EVPN;
dummy_prefix.prefixlen = (sizeof(struct evpn_addr) * 8);
dummy_prefix.prefix.route_type = 1; /* XXX - fixup to type-1 def */
+ dummy_prefix.prefix.ead_addr.ip.ipa_type = nh.ipa_type;
if (hdr->command == ZEBRA_EVPN_REMOTE_NH_ADD) {
stream_get(&rmac, s, sizeof(rmac));
if (IS_ZEBRA_DEBUG_EVPN_MH_ES)
- zlog_debug("evpn remote nh %d %pIA rmac %pEA add",
- vrf_id, &nh, &rmac);
+ zlog_debug(
+ "evpn remote nh %d %pIA rmac %pEA add pfx %pFX",
+ vrf_id, &nh, &rmac, &dummy_prefix);
zebra_rib_queue_evpn_route_add(vrf_id, &rmac, &nh,
(struct prefix *)&dummy_prefix);
} else {
if (IS_ZEBRA_DEBUG_EVPN_MH_ES)
- zlog_debug("evpn remote nh %d %pIA del", vrf_id, &nh);
+ zlog_debug("evpn remote nh %d %pIA del pfx %pFX",
+ vrf_id, &nh, &dummy_prefix);
zebra_rib_queue_evpn_route_del(vrf_id, &nh,
(struct prefix *)&dummy_prefix);
}
return memcmp(&hle1->p.u.prefix6, &hle2->p.u.prefix6,
IPV6_MAX_BYTELEN);
} else if (hle1->p.family == AF_EVPN) {
- /* a single dummy prefix of route_type BGP_EVPN_AD_ROUTE is
- * used for all nexthops associated with a non-zero ESI
+ uint8_t family1;
+ uint8_t family2;
+
+ /* two (v4/v6) dummy prefixes of route_type BGP_EVPN_AD_ROUTE
+ * are used for all nexthops associated with a non-zero ESI
*/
+ family1 = is_evpn_prefix_ipaddr_v4(
+ (const struct prefix_evpn *)&hle1->p)
+ ? AF_INET
+ : AF_INET6;
+ family2 = is_evpn_prefix_ipaddr_v4(
+ (const struct prefix_evpn *)&hle2->p)
+ ? AF_INET
+ : AF_INET6;
+
+
+ if (family1 < family2)
+ return -1;
+
+ if (family1 > family2)
+ return 1;
+
return 0;
} else {
zlog_debug("%s: Unexpected family type: %d", __func__,