summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/user/bgp.rst10
-rw-r--r--pimd/pim_ifchannel.c4
-rw-r--r--vrrpd/vrrp.c5
-rw-r--r--vrrpd/vrrp_arp.c10
-rw-r--r--vrrpd/vrrp_ndisc.c5
-rw-r--r--zebra/rib.h12
6 files changed, 29 insertions, 17 deletions
diff --git a/doc/user/bgp.rst b/doc/user/bgp.rst
index d663b4fc10..768f22c873 100644
--- a/doc/user/bgp.rst
+++ b/doc/user/bgp.rst
@@ -1862,11 +1862,11 @@ address-family:
.. index:: label vpn export (0..1048575)|auto
.. clicmd:: label vpn export (0..1048575)|auto
- Specifies an optional MPLS label to be attached to a route exported from the
- current unicast VRF to VPN. If label is specified as ``auto``, the label
- value is automatically assigned from a pool maintained by the zebra
- daemon. If zebra is not running, automatic label assignment will not
- complete, which will block corresponding route export.
+ Enables an MPLS label to be attached to a route exported from the current
+ unicast VRF to VPN. If the value specified is ``auto``, the label value is
+ automatically assigned from a pool maintained by the Zebra daemon. If Zebra
+ is not running, or if this command is not configured, automatic label
+ assignment will not complete, which will block corresponding route export.
.. index:: no label vpn export [(0..1048575)|auto]
.. clicmd:: no label vpn export [(0..1048575)|auto]
diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c
index 352177db2b..9b242e9be5 100644
--- a/pimd/pim_ifchannel.c
+++ b/pimd/pim_ifchannel.c
@@ -1404,7 +1404,9 @@ void pim_ifchannel_set_star_g_join_state(struct pim_ifchannel *ch, int eom,
PIM_IF_FLAG_UNSET_S_G_RPT(child->flags);
child->ifjoin_state = PIM_IFJOIN_NOINFO;
- if (I_am_RP(pim, child->sg.grp)) {
+ if ((I_am_RP(pim, child->sg.grp)) &&
+ (!pim_upstream_empty_inherited_olist(
+ child->upstream))) {
pim_channel_add_oif(
child->upstream->channel_oil,
ch->interface, PIM_OIF_FLAG_PROTO_STAR);
diff --git a/vrrpd/vrrp.c b/vrrpd/vrrp.c
index ad09caf359..3d535cbfba 100644
--- a/vrrpd/vrrp.c
+++ b/vrrpd/vrrp.c
@@ -763,7 +763,7 @@ static void vrrp_send_advertisement(struct vrrp_router *r)
const char *group = r->family == AF_INET ? VRRP_MCASTV4_GROUP_STR
: VRRP_MCASTV6_GROUP_STR;
- str2sockunion(group, &dest);
+ (void)str2sockunion(group, &dest);
ssize_t sent = sendto(r->sock_tx, pkt, (size_t)pktsz, 0, &dest.sa,
sockunion_sizeof(&dest));
@@ -969,7 +969,7 @@ static int vrrp_read(struct thread *thread)
uint8_t control[64];
struct ipaddr src = {};
- struct msghdr m;
+ struct msghdr m = {};
struct iovec iov;
iov.iov_base = r->ibuf;
@@ -1384,7 +1384,6 @@ static void vrrp_change_state_backup(struct vrrp_router *r)
*/
static void vrrp_change_state_initialize(struct vrrp_router *r)
{
- r->vr->advertisement_interval = r->vr->advertisement_interval;
r->master_adver_interval = 0;
vrrp_recalculate_timers(r);
diff --git a/vrrpd/vrrp_arp.c b/vrrpd/vrrp_arp.c
index 8e903e137f..78e153a082 100644
--- a/vrrpd/vrrp_arp.c
+++ b/vrrpd/vrrp_arp.c
@@ -124,7 +124,7 @@ void vrrp_garp_send(struct vrrp_router *r, struct in_addr *v4)
if (ifp->flags & IFF_NOARP) {
zlog_warn(
VRRP_LOGPFX VRRP_LOGPFX_VRID VRRP_LOGPFX_FAM
- "Unable to send gratuitous ARP on %s; has IFF_NOARP\n",
+ "Unable to send gratuitous ARP on %s; has IFF_NOARP",
r->vr->vrid, family2str(r->family), ifp->name);
return;
}
@@ -132,6 +132,14 @@ void vrrp_garp_send(struct vrrp_router *r, struct in_addr *v4)
/* Build garp */
garpbuf_len = vrrp_build_garp(garpbuf, ifp, v4);
+ if (garpbuf_len < 0) {
+ zlog_warn(
+ VRRP_LOGPFX VRRP_LOGPFX_VRID VRRP_LOGPFX_FAM
+ "Unable to send gratuitous ARP on %s; MAC address unknown",
+ r->vr->vrid, family2str(r->family), ifp->name);
+ return;
+ };
+
/* Send garp */
inet_ntop(AF_INET, v4, astr, sizeof(astr));
diff --git a/vrrpd/vrrp_ndisc.c b/vrrpd/vrrp_ndisc.c
index 8081533ebc..348958509a 100644
--- a/vrrpd/vrrp_ndisc.c
+++ b/vrrpd/vrrp_ndisc.c
@@ -139,7 +139,10 @@ static int vrrp_ndisc_una_build(struct interface *ifp, struct ipaddr *ip,
ph.dst = ip6h->ip6_dst;
ph.ulpl = htonl(len);
ph.next_hdr = IPPROTO_ICMPV6;
- icmp6h->icmp6_cksum = in_cksum_with_ph6(&ph, (void *)icmp6h, len);
+
+ /* Suppress static analysis warnings about accessing icmp6 oob */
+ void *offset = icmp6h;
+ icmp6h->icmp6_cksum = in_cksum_with_ph6(&ph, offset, len);
return 0;
}
diff --git a/zebra/rib.h b/zebra/rib.h
index c39abaffcc..ca0801c209 100644
--- a/zebra/rib.h
+++ b/zebra/rib.h
@@ -99,9 +99,6 @@ struct route_entry {
/* Type fo this route. */
int type;
- /* Source protocol instance */
- unsigned short instance;
-
/* VRF identifier. */
vrf_id_t vrf_id;
@@ -115,9 +112,6 @@ struct route_entry {
uint32_t mtu;
uint32_t nexthop_mtu;
- /* Distance. */
- uint8_t distance;
-
/* Flags of this route.
* This flag's definition is in lib/zebra.h ZEBRA_FLAG_* and is exposed
* to clients via Zserv
@@ -146,6 +140,12 @@ struct route_entry {
/* Sequence value incremented for each dataplane operation */
uint32_t dplane_sequence;
+
+ /* Source protocol instance */
+ uint16_t instance;
+
+ /* Distance. */
+ uint8_t distance;
};
#define RIB_SYSTEM_ROUTE(R) RSYSTEM_ROUTE((R)->type)