mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-29 09:44:26 +00:00
commit
16cdf5ddbc
@ -457,7 +457,7 @@ static int _ptm_msg_read(struct stream *msg, int command, vrf_id_t vrf_id,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Sanity check: peer and local address must match IP types. */
|
/* Sanity check: peer and local address must match IP types. */
|
||||||
if (bpc->bpc_local.sa_sin.sin_family != 0
|
if (bpc->bpc_local.sa_sin.sin_family != AF_UNSPEC
|
||||||
&& (bpc->bpc_local.sa_sin.sin_family
|
&& (bpc->bpc_local.sa_sin.sin_family
|
||||||
!= bpc->bpc_peer.sa_sin.sin_family)) {
|
!= bpc->bpc_peer.sa_sin.sin_family)) {
|
||||||
zlog_warn("ptm-read: peer family doesn't match local type");
|
zlog_warn("ptm-read: peer family doesn't match local type");
|
||||||
|
@ -388,7 +388,7 @@ int rfapiGetVncTunnelUnAddr(struct attr *attr, struct prefix *p)
|
|||||||
return 0;
|
return 0;
|
||||||
/* MPLS carries UN address in next hop */
|
/* MPLS carries UN address in next hop */
|
||||||
rfapiNexthop2Prefix(attr, p);
|
rfapiNexthop2Prefix(attr, p);
|
||||||
if (p->family != 0)
|
if (p->family != AF_UNSPEC)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return ENOENT;
|
return ENOENT;
|
||||||
@ -457,7 +457,7 @@ int rfapiGetUnAddrOfVpnBi(struct bgp_path_info *bpi, struct prefix *p)
|
|||||||
return 0;
|
return 0;
|
||||||
default:
|
default:
|
||||||
if (p)
|
if (p)
|
||||||
p->family = 0;
|
p->family = AF_UNSPEC;
|
||||||
#ifdef DEBUG_ENCAP_MONITOR
|
#ifdef DEBUG_ENCAP_MONITOR
|
||||||
vnc_zlog_debug_verbose(
|
vnc_zlog_debug_verbose(
|
||||||
"%s: bpi->extra->vnc.import.un_family is 0, no UN addr",
|
"%s: bpi->extra->vnc.import.un_family is 0, no UN addr",
|
||||||
@ -1155,7 +1155,7 @@ static int rfapiVpnBiSamePtUn(struct bgp_path_info *bpi1,
|
|||||||
bpi1->extra->vnc.import.un.addr6;
|
bpi1->extra->vnc.import.un.addr6;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
pfx_un1.family = 0;
|
pfx_un1.family = AF_UNSPEC;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1174,13 +1174,13 @@ static int rfapiVpnBiSamePtUn(struct bgp_path_info *bpi1,
|
|||||||
bpi2->extra->vnc.import.un.addr6;
|
bpi2->extra->vnc.import.un.addr6;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
pfx_un2.family = 0;
|
pfx_un2.family = AF_UNSPEC;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pfx_un1.family == 0 || pfx_un2.family == 0)
|
if (pfx_un1.family == AF_UNSPEC || pfx_un2.family == AF_UNSPEC)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (pfx_un1.family != pfx_un2.family)
|
if (pfx_un1.family != pfx_un2.family)
|
||||||
@ -1358,7 +1358,7 @@ rfapiRouteInfo2NextHopEntry(struct rfapi_ip_prefix *rprefix,
|
|||||||
struct prefix p;
|
struct prefix p;
|
||||||
/* MPLS carries UN address in next hop */
|
/* MPLS carries UN address in next hop */
|
||||||
rfapiNexthop2Prefix(bpi->attr, &p);
|
rfapiNexthop2Prefix(bpi->attr, &p);
|
||||||
if (p.family != 0) {
|
if (p.family != AF_UNSPEC) {
|
||||||
rfapiQprefix2Raddr(&p, &new->un_address);
|
rfapiQprefix2Raddr(&p, &new->un_address);
|
||||||
have_vnc_tunnel_un = 1;
|
have_vnc_tunnel_un = 1;
|
||||||
}
|
}
|
||||||
@ -2609,7 +2609,7 @@ static void rfapiCopyUnEncap2VPN(struct bgp_path_info *encap_bpi,
|
|||||||
default:
|
default:
|
||||||
zlog_warn("%s: invalid encap nexthop length: %d", __func__,
|
zlog_warn("%s: invalid encap nexthop length: %d", __func__,
|
||||||
encap_bpi->attr->mp_nexthop_len);
|
encap_bpi->attr->mp_nexthop_len);
|
||||||
vpn_bpi->extra->vnc.import.un_family = 0;
|
vpn_bpi->extra->vnc.import.un_family = AF_UNSPEC;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2634,7 +2634,7 @@ rfapiWithdrawEncapUpdateCachedUn(struct rfapi_import_table *import_table,
|
|||||||
__func__);
|
__func__);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
vpn_bpi->extra->vnc.import.un_family = 0;
|
vpn_bpi->extra->vnc.import.un_family = AF_UNSPEC;
|
||||||
memset(&vpn_bpi->extra->vnc.import.un, 0,
|
memset(&vpn_bpi->extra->vnc.import.un, 0,
|
||||||
sizeof(vpn_bpi->extra->vnc.import.un));
|
sizeof(vpn_bpi->extra->vnc.import.un));
|
||||||
if (CHECK_FLAG(vpn_bpi->flags, BGP_PATH_VALID)) {
|
if (CHECK_FLAG(vpn_bpi->flags, BGP_PATH_VALID)) {
|
||||||
@ -3626,7 +3626,7 @@ void rfapiBgpInfoFilteredImportVPN(
|
|||||||
/* Not a big deal, just means VPN route got here first */
|
/* Not a big deal, just means VPN route got here first */
|
||||||
vnc_zlog_debug_verbose("%s: no encap route for vn addr %pFX",
|
vnc_zlog_debug_verbose("%s: no encap route for vn addr %pFX",
|
||||||
__func__, &vn_prefix);
|
__func__, &vn_prefix);
|
||||||
info_new->extra->vnc.import.un_family = 0;
|
info_new->extra->vnc.import.un_family = AF_UNSPEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rn) {
|
if (rn) {
|
||||||
|
@ -1950,7 +1950,7 @@ rfapiRibPreload(struct bgp *bgp, struct rfapi_descriptor *rfd,
|
|||||||
&& RFAPI_HOST_PREFIX(&rk.aux_prefix)) {
|
&& RFAPI_HOST_PREFIX(&rk.aux_prefix)) {
|
||||||
/* mark as "none" if nhp->prefix is 0/32 or
|
/* mark as "none" if nhp->prefix is 0/32 or
|
||||||
* 0/128 */
|
* 0/128 */
|
||||||
rk.aux_prefix.family = 0;
|
rk.aux_prefix.family = AF_UNSPEC;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1135,7 +1135,7 @@ static int lib_access_list_entry_any_destroy(struct nb_cb_destroy_args *args)
|
|||||||
|
|
||||||
f = nb_running_get_entry(args->dnode, NULL, true);
|
f = nb_running_get_entry(args->dnode, NULL, true);
|
||||||
fz = &f->u.zfilter;
|
fz = &f->u.zfilter;
|
||||||
fz->prefix.family = 0;
|
fz->prefix.family = AF_UNSPEC;
|
||||||
|
|
||||||
acl_notify_route_map(f->acl, RMAP_EVENT_FILTER_DELETED);
|
acl_notify_route_map(f->acl, RMAP_EVENT_FILTER_DELETED);
|
||||||
|
|
||||||
|
@ -2983,7 +2983,7 @@ void ospf_lsa_maxage_delete(struct ospf *ospf, struct ospf_lsa *lsa)
|
|||||||
struct prefix lsa_prefix;
|
struct prefix lsa_prefix;
|
||||||
|
|
||||||
memset(&lsa_prefix, 0, sizeof(struct prefix));
|
memset(&lsa_prefix, 0, sizeof(struct prefix));
|
||||||
lsa_prefix.family = 0;
|
lsa_prefix.family = AF_UNSPEC;
|
||||||
lsa_prefix.prefixlen = sizeof(lsa_prefix.u.ptr) * CHAR_BIT;
|
lsa_prefix.prefixlen = sizeof(lsa_prefix.u.ptr) * CHAR_BIT;
|
||||||
lsa_prefix.u.ptr = (uintptr_t)lsa;
|
lsa_prefix.u.ptr = (uintptr_t)lsa;
|
||||||
|
|
||||||
@ -3024,7 +3024,7 @@ void ospf_lsa_maxage(struct ospf *ospf, struct ospf_lsa *lsa)
|
|||||||
}
|
}
|
||||||
|
|
||||||
memset(&lsa_prefix, 0, sizeof(struct prefix));
|
memset(&lsa_prefix, 0, sizeof(struct prefix));
|
||||||
lsa_prefix.family = 0;
|
lsa_prefix.family = AF_UNSPEC;
|
||||||
lsa_prefix.prefixlen = sizeof(lsa_prefix.u.ptr) * CHAR_BIT;
|
lsa_prefix.prefixlen = sizeof(lsa_prefix.u.ptr) * CHAR_BIT;
|
||||||
lsa_prefix.u.ptr = (uintptr_t)lsa;
|
lsa_prefix.u.ptr = (uintptr_t)lsa;
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ void ospf_lsdb_cleanup(struct ospf_lsdb *lsdb)
|
|||||||
void ls_prefix_set(struct prefix_ls *lp, struct ospf_lsa *lsa)
|
void ls_prefix_set(struct prefix_ls *lp, struct ospf_lsa *lsa)
|
||||||
{
|
{
|
||||||
if (lp && lsa && lsa->data) {
|
if (lp && lsa && lsa->data) {
|
||||||
lp->family = 0;
|
lp->family = AF_UNSPEC;
|
||||||
lp->prefixlen = 64;
|
lp->prefixlen = 64;
|
||||||
lp->id = lsa->data->id;
|
lp->id = lsa->data->id;
|
||||||
lp->adv_router = lsa->data->adv_router;
|
lp->adv_router = lsa->data->adv_router;
|
||||||
@ -199,7 +199,7 @@ struct ospf_lsa *ospf_lsdb_lookup_by_id(struct ospf_lsdb *lsdb, uint8_t type,
|
|||||||
table = lsdb->type[type].db;
|
table = lsdb->type[type].db;
|
||||||
|
|
||||||
memset(&lp, 0, sizeof(struct prefix_ls));
|
memset(&lp, 0, sizeof(struct prefix_ls));
|
||||||
lp.family = 0;
|
lp.family = AF_UNSPEC;
|
||||||
lp.prefixlen = 64;
|
lp.prefixlen = 64;
|
||||||
lp.id = id;
|
lp.id = id;
|
||||||
lp.adv_router = adv_router;
|
lp.adv_router = adv_router;
|
||||||
@ -226,7 +226,7 @@ struct ospf_lsa *ospf_lsdb_lookup_by_id_next(struct ospf_lsdb *lsdb,
|
|||||||
table = lsdb->type[type].db;
|
table = lsdb->type[type].db;
|
||||||
|
|
||||||
memset(&lp, 0, sizeof(struct prefix_ls));
|
memset(&lp, 0, sizeof(struct prefix_ls));
|
||||||
lp.family = 0;
|
lp.family = AF_UNSPEC;
|
||||||
lp.prefixlen = 64;
|
lp.prefixlen = 64;
|
||||||
lp.id = id;
|
lp.id = id;
|
||||||
lp.adv_router = adv_router;
|
lp.adv_router = adv_router;
|
||||||
|
@ -1779,7 +1779,7 @@ static int ospf_snmp_vl_add(struct ospf_vl_data *vl_data)
|
|||||||
struct route_node *rn;
|
struct route_node *rn;
|
||||||
|
|
||||||
memset(&lp, 0, sizeof(struct prefix_ls));
|
memset(&lp, 0, sizeof(struct prefix_ls));
|
||||||
lp.family = 0;
|
lp.family = AF_UNSPEC;
|
||||||
lp.prefixlen = 64;
|
lp.prefixlen = 64;
|
||||||
lp.id = vl_data->vl_area_id;
|
lp.id = vl_data->vl_area_id;
|
||||||
lp.adv_router = vl_data->vl_peer;
|
lp.adv_router = vl_data->vl_peer;
|
||||||
@ -1798,7 +1798,7 @@ static int ospf_snmp_vl_delete(struct ospf_vl_data *vl_data)
|
|||||||
struct route_node *rn;
|
struct route_node *rn;
|
||||||
|
|
||||||
memset(&lp, 0, sizeof(struct prefix_ls));
|
memset(&lp, 0, sizeof(struct prefix_ls));
|
||||||
lp.family = 0;
|
lp.family = AF_UNSPEC;
|
||||||
lp.prefixlen = 64;
|
lp.prefixlen = 64;
|
||||||
lp.id = vl_data->vl_area_id;
|
lp.id = vl_data->vl_area_id;
|
||||||
lp.adv_router = vl_data->vl_peer;
|
lp.adv_router = vl_data->vl_peer;
|
||||||
@ -1820,7 +1820,7 @@ static struct ospf_vl_data *ospf_snmp_vl_lookup(struct in_addr *area_id,
|
|||||||
struct ospf_vl_data *vl_data;
|
struct ospf_vl_data *vl_data;
|
||||||
|
|
||||||
memset(&lp, 0, sizeof(struct prefix_ls));
|
memset(&lp, 0, sizeof(struct prefix_ls));
|
||||||
lp.family = 0;
|
lp.family = AF_UNSPEC;
|
||||||
lp.prefixlen = 64;
|
lp.prefixlen = 64;
|
||||||
lp.id = *area_id;
|
lp.id = *area_id;
|
||||||
lp.adv_router = *neighbor;
|
lp.adv_router = *neighbor;
|
||||||
@ -1843,7 +1843,7 @@ static struct ospf_vl_data *ospf_snmp_vl_lookup_next(struct in_addr *area_id,
|
|||||||
struct ospf_vl_data *vl_data;
|
struct ospf_vl_data *vl_data;
|
||||||
|
|
||||||
memset(&lp, 0, sizeof(struct prefix_ls));
|
memset(&lp, 0, sizeof(struct prefix_ls));
|
||||||
lp.family = 0;
|
lp.family = AF_UNSPEC;
|
||||||
lp.prefixlen = 64;
|
lp.prefixlen = 64;
|
||||||
lp.id = *area_id;
|
lp.id = *area_id;
|
||||||
lp.adv_router = *neighbor;
|
lp.adv_router = *neighbor;
|
||||||
|
@ -6578,7 +6578,7 @@ static void show_lsa_prefix_set(struct vty *vty, struct prefix_ls *lp,
|
|||||||
struct in_addr *id, struct in_addr *adv_router)
|
struct in_addr *id, struct in_addr *adv_router)
|
||||||
{
|
{
|
||||||
memset(lp, 0, sizeof(struct prefix_ls));
|
memset(lp, 0, sizeof(struct prefix_ls));
|
||||||
lp->family = 0;
|
lp->family = AF_UNSPEC;
|
||||||
if (id == NULL)
|
if (id == NULL)
|
||||||
lp->prefixlen = 0;
|
lp->prefixlen = 0;
|
||||||
else if (adv_router == NULL) {
|
else if (adv_router == NULL) {
|
||||||
|
@ -2369,7 +2369,7 @@ static unsigned nexthop_active_check(struct route_node *rn,
|
|||||||
else if (rn->p.family == AF_INET6)
|
else if (rn->p.family == AF_INET6)
|
||||||
family = AFI_IP6;
|
family = AFI_IP6;
|
||||||
else
|
else
|
||||||
family = 0;
|
family = AF_UNSPEC;
|
||||||
|
|
||||||
if (IS_ZEBRA_DEBUG_NHG_DETAIL)
|
if (IS_ZEBRA_DEBUG_NHG_DETAIL)
|
||||||
zlog_debug("%s: re %p, nexthop %pNHv", __func__, re, nexthop);
|
zlog_debug("%s: re %p, nexthop %pNHv", __func__, re, nexthop);
|
||||||
|
Loading…
Reference in New Issue
Block a user