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:
Donald Sharp 2018-04-29 14:35:39 -04:00
parent a2023fab27
commit 3518f35264
5 changed files with 45 additions and 33 deletions

View file

@ -4422,8 +4422,9 @@ int bgp_evpn_local_vni_del(struct bgp *bgp, vni_t vni)
vpn = bgp_evpn_lookup_vni(bgp, vni);
if (!vpn) {
if (bgp_debug_zebra(NULL))
zlog_warn("%u: VNI hash entry for VNI %u not "
"found at DEL", bgp->vrf_id, vni);
zlog_warn(
"%u: VNI hash entry for VNI %u not found at DEL",
bgp->vrf_id, vni);
return 0;
}

View file

@ -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) {
int ret = 0;
ret =
route_map_apply(
bgp->adv_cmd_rmap[afi][safi].map,
&rn->p, RMAP_BGP, new_select);
ret = route_map_apply(
bgp->adv_cmd_rmap[afi][safi].map,
&rn->p, RMAP_BGP, new_select);
if (ret == RMAP_MATCH)
bgp_evpn_advertise_type5_route(bgp,
&rn->p,
new_select->attr,
afi, safi);
bgp_evpn_advertise_type5_route(
bgp, &rn->p, new_select->attr,
afi, safi);
} else {
bgp_evpn_advertise_type5_route(bgp,
&rn->p,

View file

@ -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 (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) ||
CHECK_FLAG(flag, PEER_FLAG_FORCE_NEXTHOP_SELF))
UNSET_FLAG(peer->af_flags[afi][safi],
PEER_FLAG_NEXTHOP_UNCHANGED);
} 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
*/
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. */
if (peer_af_flag_check(peer, afi, safi, PEER_FLAG_AS_PATH_UNCHANGED)
|| (safi != SAFI_EVPN &&
peer_af_flag_check(peer, afi, safi, PEER_FLAG_NEXTHOP_UNCHANGED))
|| (safi != SAFI_EVPN
&& peer_af_flag_check(peer, afi, safi,
PEER_FLAG_NEXTHOP_UNCHANGED))
|| peer_af_flag_check(peer, afi, safi, PEER_FLAG_MED_UNCHANGED)) {
if (!peer_group_active(peer)

View file

@ -530,15 +530,16 @@ static int config_write_host(struct vty *vty)
vty_out(vty, "domainname %s\n", cmd_domainname_get());
/* The following are all configuration commands that are not sent to
* watchfrr. For instance watchfrr is hardcoded to log to syslog so
* we would always display 'log syslog informational' in the config
* which would cause other daemons to then switch to syslog when they
* parse frr.conf.
*/
* watchfrr. For instance watchfrr is hardcoded to log to syslog so
* we would always display 'log syslog informational' in the config
* which would cause other daemons to then switch to syslog when they
* parse frr.conf.
*/
if (strcmp(zlog_default->protoname, "WATCHFRR")) {
if (host.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)
vty_out(vty, "enable password 8 %s\n",
host.enable_encrypt);
@ -546,23 +547,27 @@ static int config_write_host(struct vty *vty)
if (host.password)
vty_out(vty, "password %s\n", host.password);
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) {
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",
zlog_priority[zlog_default->default_lvl]);
}
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);
if (zlog_default->maxlvl[ZLOG_DEST_FILE]
!= zlog_default->default_lvl)
vty_out(vty, " %s",
zlog_priority
[zlog_default->maxlvl[ZLOG_DEST_FILE]]);
[zlog_default->maxlvl
[ZLOG_DEST_FILE]]);
vty_out(vty, "\n");
}
@ -571,8 +576,9 @@ static int config_write_host(struct vty *vty)
if (zlog_default->maxlvl[ZLOG_DEST_STDOUT]
!= zlog_default->default_lvl)
vty_out(vty, " %s",
zlog_priority[zlog_default->maxlvl
[ZLOG_DEST_STDOUT]]);
zlog_priority
[zlog_default->maxlvl
[ZLOG_DEST_STDOUT]]);
vty_out(vty, "\n");
}
@ -581,7 +587,8 @@ static int config_write_host(struct vty *vty)
else if (zlog_default->maxlvl[ZLOG_DEST_MONITOR]
!= zlog_default->default_lvl)
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) {
vty_out(vty, "log syslog");
@ -611,7 +618,8 @@ static int config_write_host(struct vty *vty)
vty_out(vty, "service password-encryption\n");
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)
vty_out(vty, "banner motd file %s\n", host.motdfile);

View file

@ -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))
return;
/*
/*
* add the next hop neighbor -
* 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
@ -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,
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
*/
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 */