forked from Mirror/frr
bgpd, lib, zebra: Cleanup formatting issues found
Cleanup the formating issues found. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
a2023fab27
commit
3518f35264
|
@ -4422,8 +4422,9 @@ int bgp_evpn_local_vni_del(struct bgp *bgp, vni_t vni)
|
||||||
vpn = bgp_evpn_lookup_vni(bgp, vni);
|
vpn = bgp_evpn_lookup_vni(bgp, vni);
|
||||||
if (!vpn) {
|
if (!vpn) {
|
||||||
if (bgp_debug_zebra(NULL))
|
if (bgp_debug_zebra(NULL))
|
||||||
zlog_warn("%u: VNI hash entry for VNI %u not "
|
zlog_warn(
|
||||||
"found at DEL", bgp->vrf_id, vni);
|
"%u: VNI hash entry for VNI %u not found at DEL",
|
||||||
|
bgp->vrf_id, vni);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2369,15 +2369,13 @@ static void bgp_process_main_one(struct bgp *bgp, struct bgp_node *rn,
|
||||||
if (bgp->adv_cmd_rmap[afi][safi].map) {
|
if (bgp->adv_cmd_rmap[afi][safi].map) {
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
ret =
|
ret = route_map_apply(
|
||||||
route_map_apply(
|
bgp->adv_cmd_rmap[afi][safi].map,
|
||||||
bgp->adv_cmd_rmap[afi][safi].map,
|
&rn->p, RMAP_BGP, new_select);
|
||||||
&rn->p, RMAP_BGP, new_select);
|
|
||||||
if (ret == RMAP_MATCH)
|
if (ret == RMAP_MATCH)
|
||||||
bgp_evpn_advertise_type5_route(bgp,
|
bgp_evpn_advertise_type5_route(
|
||||||
&rn->p,
|
bgp, &rn->p, new_select->attr,
|
||||||
new_select->attr,
|
afi, safi);
|
||||||
afi, safi);
|
|
||||||
} else {
|
} else {
|
||||||
bgp_evpn_advertise_type5_route(bgp,
|
bgp_evpn_advertise_type5_route(bgp,
|
||||||
&rn->p,
|
&rn->p,
|
||||||
|
|
14
bgpd/bgpd.c
14
bgpd/bgpd.c
|
@ -4085,15 +4085,18 @@ static int peer_af_flag_modify(struct peer *peer, afi_t afi, safi_t safi,
|
||||||
if (afi == AFI_L2VPN && safi == SAFI_EVPN) {
|
if (afi == AFI_L2VPN && safi == SAFI_EVPN) {
|
||||||
if (set) {
|
if (set) {
|
||||||
|
|
||||||
/* if we are setting NEXTHOP_SELF, we need to unset the
|
/*
|
||||||
* NEXTHOP_UNCHANGED flag */
|
* if we are setting NEXTHOP_SELF, we need to unset the
|
||||||
|
* NEXTHOP_UNCHANGED flag
|
||||||
|
*/
|
||||||
if (CHECK_FLAG(flag, PEER_FLAG_NEXTHOP_SELF) ||
|
if (CHECK_FLAG(flag, PEER_FLAG_NEXTHOP_SELF) ||
|
||||||
CHECK_FLAG(flag, PEER_FLAG_FORCE_NEXTHOP_SELF))
|
CHECK_FLAG(flag, PEER_FLAG_FORCE_NEXTHOP_SELF))
|
||||||
UNSET_FLAG(peer->af_flags[afi][safi],
|
UNSET_FLAG(peer->af_flags[afi][safi],
|
||||||
PEER_FLAG_NEXTHOP_UNCHANGED);
|
PEER_FLAG_NEXTHOP_UNCHANGED);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
/* if we are unsetting NEXTHOP_SELF, we need to set the
|
/*
|
||||||
|
* if we are unsetting NEXTHOP_SELF, we need to set the
|
||||||
* NEXTHOP_UNCHANGED flag to reset the defaults for EVPN
|
* NEXTHOP_UNCHANGED flag to reset the defaults for EVPN
|
||||||
*/
|
*/
|
||||||
if (CHECK_FLAG(flag, PEER_FLAG_NEXTHOP_SELF) ||
|
if (CHECK_FLAG(flag, PEER_FLAG_NEXTHOP_SELF) ||
|
||||||
|
@ -7140,8 +7143,9 @@ static void bgp_config_write_peer_af(struct vty *vty, struct bgp *bgp,
|
||||||
|
|
||||||
/* atribute-unchanged. */
|
/* atribute-unchanged. */
|
||||||
if (peer_af_flag_check(peer, afi, safi, PEER_FLAG_AS_PATH_UNCHANGED)
|
if (peer_af_flag_check(peer, afi, safi, PEER_FLAG_AS_PATH_UNCHANGED)
|
||||||
|| (safi != SAFI_EVPN &&
|
|| (safi != SAFI_EVPN
|
||||||
peer_af_flag_check(peer, afi, safi, PEER_FLAG_NEXTHOP_UNCHANGED))
|
&& peer_af_flag_check(peer, afi, safi,
|
||||||
|
PEER_FLAG_NEXTHOP_UNCHANGED))
|
||||||
|| peer_af_flag_check(peer, afi, safi, PEER_FLAG_MED_UNCHANGED)) {
|
|| peer_af_flag_check(peer, afi, safi, PEER_FLAG_MED_UNCHANGED)) {
|
||||||
|
|
||||||
if (!peer_group_active(peer)
|
if (!peer_group_active(peer)
|
||||||
|
|
|
@ -530,15 +530,16 @@ static int config_write_host(struct vty *vty)
|
||||||
vty_out(vty, "domainname %s\n", cmd_domainname_get());
|
vty_out(vty, "domainname %s\n", cmd_domainname_get());
|
||||||
|
|
||||||
/* The following are all configuration commands that are not sent to
|
/* The following are all configuration commands that are not sent to
|
||||||
* watchfrr. For instance watchfrr is hardcoded to log to syslog so
|
* watchfrr. For instance watchfrr is hardcoded to log to syslog so
|
||||||
* we would always display 'log syslog informational' in the config
|
* we would always display 'log syslog informational' in the config
|
||||||
* which would cause other daemons to then switch to syslog when they
|
* which would cause other daemons to then switch to syslog when they
|
||||||
* parse frr.conf.
|
* parse frr.conf.
|
||||||
*/
|
*/
|
||||||
if (strcmp(zlog_default->protoname, "WATCHFRR")) {
|
if (strcmp(zlog_default->protoname, "WATCHFRR")) {
|
||||||
if (host.encrypt) {
|
if (host.encrypt) {
|
||||||
if (host.password_encrypt)
|
if (host.password_encrypt)
|
||||||
vty_out(vty, "password 8 %s\n", host.password_encrypt);
|
vty_out(vty, "password 8 %s\n",
|
||||||
|
host.password_encrypt);
|
||||||
if (host.enable_encrypt)
|
if (host.enable_encrypt)
|
||||||
vty_out(vty, "enable password 8 %s\n",
|
vty_out(vty, "enable password 8 %s\n",
|
||||||
host.enable_encrypt);
|
host.enable_encrypt);
|
||||||
|
@ -546,23 +547,27 @@ static int config_write_host(struct vty *vty)
|
||||||
if (host.password)
|
if (host.password)
|
||||||
vty_out(vty, "password %s\n", host.password);
|
vty_out(vty, "password %s\n", host.password);
|
||||||
if (host.enable)
|
if (host.enable)
|
||||||
vty_out(vty, "enable password %s\n", host.enable);
|
vty_out(vty, "enable password %s\n",
|
||||||
|
host.enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (zlog_default->default_lvl != LOG_DEBUG) {
|
if (zlog_default->default_lvl != LOG_DEBUG) {
|
||||||
vty_out(vty, "! N.B. The 'log trap' command is deprecated.\n");
|
vty_out(vty,
|
||||||
|
"! N.B. The 'log trap' command is deprecated.\n");
|
||||||
vty_out(vty, "log trap %s\n",
|
vty_out(vty, "log trap %s\n",
|
||||||
zlog_priority[zlog_default->default_lvl]);
|
zlog_priority[zlog_default->default_lvl]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (host.logfile
|
if (host.logfile
|
||||||
&& (zlog_default->maxlvl[ZLOG_DEST_FILE] != ZLOG_DISABLED)) {
|
&& (zlog_default->maxlvl[ZLOG_DEST_FILE]
|
||||||
|
!= ZLOG_DISABLED)) {
|
||||||
vty_out(vty, "log file %s", host.logfile);
|
vty_out(vty, "log file %s", host.logfile);
|
||||||
if (zlog_default->maxlvl[ZLOG_DEST_FILE]
|
if (zlog_default->maxlvl[ZLOG_DEST_FILE]
|
||||||
!= zlog_default->default_lvl)
|
!= zlog_default->default_lvl)
|
||||||
vty_out(vty, " %s",
|
vty_out(vty, " %s",
|
||||||
zlog_priority
|
zlog_priority
|
||||||
[zlog_default->maxlvl[ZLOG_DEST_FILE]]);
|
[zlog_default->maxlvl
|
||||||
|
[ZLOG_DEST_FILE]]);
|
||||||
vty_out(vty, "\n");
|
vty_out(vty, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -571,8 +576,9 @@ static int config_write_host(struct vty *vty)
|
||||||
if (zlog_default->maxlvl[ZLOG_DEST_STDOUT]
|
if (zlog_default->maxlvl[ZLOG_DEST_STDOUT]
|
||||||
!= zlog_default->default_lvl)
|
!= zlog_default->default_lvl)
|
||||||
vty_out(vty, " %s",
|
vty_out(vty, " %s",
|
||||||
zlog_priority[zlog_default->maxlvl
|
zlog_priority
|
||||||
[ZLOG_DEST_STDOUT]]);
|
[zlog_default->maxlvl
|
||||||
|
[ZLOG_DEST_STDOUT]]);
|
||||||
vty_out(vty, "\n");
|
vty_out(vty, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -581,7 +587,8 @@ static int config_write_host(struct vty *vty)
|
||||||
else if (zlog_default->maxlvl[ZLOG_DEST_MONITOR]
|
else if (zlog_default->maxlvl[ZLOG_DEST_MONITOR]
|
||||||
!= zlog_default->default_lvl)
|
!= zlog_default->default_lvl)
|
||||||
vty_out(vty, "log monitor %s\n",
|
vty_out(vty, "log monitor %s\n",
|
||||||
zlog_priority[zlog_default->maxlvl[ZLOG_DEST_MONITOR]]);
|
zlog_priority[zlog_default->maxlvl
|
||||||
|
[ZLOG_DEST_MONITOR]]);
|
||||||
|
|
||||||
if (zlog_default->maxlvl[ZLOG_DEST_SYSLOG] != ZLOG_DISABLED) {
|
if (zlog_default->maxlvl[ZLOG_DEST_SYSLOG] != ZLOG_DISABLED) {
|
||||||
vty_out(vty, "log syslog");
|
vty_out(vty, "log syslog");
|
||||||
|
@ -611,7 +618,8 @@ static int config_write_host(struct vty *vty)
|
||||||
vty_out(vty, "service password-encryption\n");
|
vty_out(vty, "service password-encryption\n");
|
||||||
|
|
||||||
if (host.lines >= 0)
|
if (host.lines >= 0)
|
||||||
vty_out(vty, "service terminal-length %d\n", host.lines);
|
vty_out(vty, "service terminal-length %d\n",
|
||||||
|
host.lines);
|
||||||
|
|
||||||
if (host.motdfile)
|
if (host.motdfile)
|
||||||
vty_out(vty, "banner motd file %s\n", host.motdfile);
|
vty_out(vty, "banner motd file %s\n", host.motdfile);
|
||||||
|
|
|
@ -3949,11 +3949,11 @@ void zebra_vxlan_evpn_vrf_route_add(vrf_id_t vrf_id, struct ethaddr *rmac,
|
||||||
if (!zl3vni || !is_l3vni_oper_up(zl3vni))
|
if (!zl3vni || !is_l3vni_oper_up(zl3vni))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* add the next hop neighbor -
|
* add the next hop neighbor -
|
||||||
* neigh to be installed is the ipv6 nexthop neigh
|
* neigh to be installed is the ipv6 nexthop neigh
|
||||||
*/
|
*/
|
||||||
zl3vni_remote_nh_add(zl3vni, vtep_ip, rmac, host_prefix);
|
zl3vni_remote_nh_add(zl3vni, vtep_ip, rmac, host_prefix);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* if the remote vtep is a ipv4 mapped ipv6 address convert it to ipv4
|
* if the remote vtep is a ipv4 mapped ipv6 address convert it to ipv4
|
||||||
|
@ -3969,10 +3969,11 @@ void zebra_vxlan_evpn_vrf_route_add(vrf_id_t vrf_id, struct ethaddr *rmac,
|
||||||
memcpy(&(ipv4_vtep.ipaddr_v4), &vtep_ip->ipaddr_v4,
|
memcpy(&(ipv4_vtep.ipaddr_v4), &vtep_ip->ipaddr_v4,
|
||||||
sizeof(struct in_addr));
|
sizeof(struct in_addr));
|
||||||
|
|
||||||
/* add the rmac - remote rmac to be installed is against the ipv4
|
/*
|
||||||
|
* add the rmac - remote rmac to be installed is against the ipv4
|
||||||
* nexthop address
|
* nexthop address
|
||||||
*/
|
*/
|
||||||
zl3vni_remote_rmac_add(zl3vni, rmac, &ipv4_vtep, host_prefix);
|
zl3vni_remote_rmac_add(zl3vni, rmac, &ipv4_vtep, host_prefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* handle evpn vrf route delete */
|
/* handle evpn vrf route delete */
|
||||||
|
|
Loading…
Reference in a new issue