mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 05:18:47 +00:00
lib,bgpd,babeld,ripngd,nhrpd,bfdd: clean up SA warnings
Clean up several SA warnings. Signed-off-by: Mark Stapp <mjs@voltanet.io>
This commit is contained in:
parent
695a52fd5e
commit
fa3bf3a21b
@ -1115,6 +1115,8 @@ really_send_update(struct interface *ifp,
|
|||||||
if(channels_len >= 0) {
|
if(channels_len >= 0) {
|
||||||
accumulate_byte(ifp, 2);
|
accumulate_byte(ifp, 2);
|
||||||
accumulate_byte(ifp, channels_len);
|
accumulate_byte(ifp, channels_len);
|
||||||
|
|
||||||
|
if (channels && channels_len > 0)
|
||||||
accumulate_bytes(ifp, channels, channels_len);
|
accumulate_bytes(ifp, channels, channels_len);
|
||||||
}
|
}
|
||||||
end_message(ifp, MESSAGE_UPDATE, 10 + (real_plen + 7) / 8 - omit +
|
end_message(ifp, MESSAGE_UPDATE, 10 + (real_plen + 7) / 8 - omit +
|
||||||
|
@ -435,15 +435,17 @@ ssize_t bfd_recv_ipv6(int sd, uint8_t *msgbuf, size_t msgbuflen, uint8_t *ttl,
|
|||||||
#endif /* HAVE_STRUCT_SOCKADDR_SA_LEN */
|
#endif /* HAVE_STRUCT_SOCKADDR_SA_LEN */
|
||||||
|
|
||||||
*ifindex = pi6->ipi6_ifindex;
|
*ifindex = pi6->ipi6_ifindex;
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set scope ID for link local addresses. */
|
/* Set scope ID for link local addresses. */
|
||||||
if (IN6_IS_ADDR_LINKLOCAL(&peer->sa_sin6.sin6_addr))
|
if (IN6_IS_ADDR_LINKLOCAL(
|
||||||
|
&peer->sa_sin6.sin6_addr))
|
||||||
peer->sa_sin6.sin6_scope_id = *ifindex;
|
peer->sa_sin6.sin6_scope_id = *ifindex;
|
||||||
if (IN6_IS_ADDR_LINKLOCAL(&local->sa_sin6.sin6_addr))
|
if (IN6_IS_ADDR_LINKLOCAL(
|
||||||
|
&local->sa_sin6.sin6_addr))
|
||||||
local->sa_sin6.sin6_scope_id = *ifindex;
|
local->sa_sin6.sin6_scope_id = *ifindex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return mlen;
|
return mlen;
|
||||||
}
|
}
|
||||||
|
@ -294,6 +294,10 @@ static struct bgp_path_info_mpath *
|
|||||||
bgp_path_info_mpath_get(struct bgp_path_info *path)
|
bgp_path_info_mpath_get(struct bgp_path_info *path)
|
||||||
{
|
{
|
||||||
struct bgp_path_info_mpath *mpath;
|
struct bgp_path_info_mpath *mpath;
|
||||||
|
|
||||||
|
if (!path)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
if (!path->mpath) {
|
if (!path->mpath) {
|
||||||
mpath = bgp_path_info_mpath_new();
|
mpath = bgp_path_info_mpath_new();
|
||||||
if (!mpath)
|
if (!mpath)
|
||||||
@ -523,6 +527,7 @@ void bgp_path_info_mpath_update(struct bgp_node *rn,
|
|||||||
list_delete_node(mp_list, mp_node);
|
list_delete_node(mp_list, mp_node);
|
||||||
bgp_path_info_mpath_dequeue(cur_mpath);
|
bgp_path_info_mpath_dequeue(cur_mpath);
|
||||||
if ((mpath_count < maxpaths)
|
if ((mpath_count < maxpaths)
|
||||||
|
&& prev_mpath
|
||||||
&& bgp_path_info_nexthop_cmp(prev_mpath,
|
&& bgp_path_info_nexthop_cmp(prev_mpath,
|
||||||
cur_mpath)) {
|
cur_mpath)) {
|
||||||
bgp_path_info_mpath_enqueue(prev_mpath,
|
bgp_path_info_mpath_enqueue(prev_mpath,
|
||||||
|
@ -1143,6 +1143,9 @@ static int rfapiVpnBiSamePtUn(struct bgp_path_info *bpi1,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
memset(&pfx_un1, 0, sizeof(pfx_un1));
|
||||||
|
memset(&pfx_un2, 0, sizeof(pfx_un2));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* UN address comparisons
|
* UN address comparisons
|
||||||
*/
|
*/
|
||||||
@ -1184,7 +1187,7 @@ static int rfapiVpnBiSamePtUn(struct bgp_path_info *bpi1,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pfx_un1.family || !pfx_un2.family)
|
if (pfx_un1.family == 0 || pfx_un2.family == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (pfx_un1.family != pfx_un2.family)
|
if (pfx_un1.family != pfx_un2.family)
|
||||||
|
@ -151,7 +151,7 @@ int vty_out(struct vty *vty, const char *format, ...)
|
|||||||
va_list args;
|
va_list args;
|
||||||
ssize_t len;
|
ssize_t len;
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
char *p = buf;
|
char *p = NULL;
|
||||||
char *filtered;
|
char *filtered;
|
||||||
|
|
||||||
if (vty->frame_pos) {
|
if (vty->frame_pos) {
|
||||||
|
@ -207,7 +207,7 @@ static void parse_sa_message(struct vici_message_ctx *ctx,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (!key)
|
if (!key || !key->ptr)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
switch (key->ptr[0]) {
|
switch (key->ptr[0]) {
|
||||||
@ -550,7 +550,7 @@ int sock_open_unix(const char *path)
|
|||||||
|
|
||||||
memset(&addr, 0, sizeof(struct sockaddr_un));
|
memset(&addr, 0, sizeof(struct sockaddr_un));
|
||||||
addr.sun_family = AF_UNIX;
|
addr.sun_family = AF_UNIX;
|
||||||
strncpy(addr.sun_path, path, sizeof(addr.sun_path) - 1);
|
strlcpy(addr.sun_path, path, sizeof(addr.sun_path));
|
||||||
|
|
||||||
ret = connect(fd, (struct sockaddr *)&addr,
|
ret = connect(fd, (struct sockaddr *)&addr,
|
||||||
sizeof(addr.sun_family) + strlen(addr.sun_path));
|
sizeof(addr.sun_family) + strlen(addr.sun_path));
|
||||||
|
@ -184,6 +184,7 @@ static int ripng_if_down(struct interface *ifp)
|
|||||||
zlog_debug("turn off %s", ifp->name);
|
zlog_debug("turn off %s", ifp->name);
|
||||||
|
|
||||||
/* Leave from multicast group. */
|
/* Leave from multicast group. */
|
||||||
|
if (ripng)
|
||||||
ripng_multicast_leave(ifp, ripng->sock);
|
ripng_multicast_leave(ifp, ripng->sock);
|
||||||
|
|
||||||
ri->running = 0;
|
ri->running = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user