mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-02 16:57:58 +00:00
solaris: more warnings fixed
Signed-off-by: David Lamparter <equinox@opensourcerouting.org> (cherry picked from commit da1b7eaa0ac5d590818e1cde92a9807a2f0e07f2)
This commit is contained in:
parent
f7f9a982fa
commit
fb4ca3e7c4
@ -139,6 +139,8 @@ extern struct zebra_privs_t zserv_privs;
|
||||
static inline void
|
||||
rta_copy (union sockunion *dest, caddr_t src) {
|
||||
int len;
|
||||
if (!dest)
|
||||
return;
|
||||
#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
|
||||
len = (((struct sockaddr *)src)->sa_len > sizeof (*dest)) ?
|
||||
sizeof (*dest) : ((struct sockaddr *)src)->sa_len ;
|
||||
@ -153,8 +155,7 @@ rta_copy (union sockunion *dest, caddr_t src) {
|
||||
if ((RTMADDRS) & (RTA)) \
|
||||
{ \
|
||||
int len = SAROUNDUP ((PNT)); \
|
||||
if ( ((DEST) != NULL) && \
|
||||
af_check (((struct sockaddr *)(PNT))->sa_family)) \
|
||||
if (af_check (((struct sockaddr *)(PNT))->sa_family)) \
|
||||
rta_copy((DEST), (PNT)); \
|
||||
(PNT) += len; \
|
||||
}
|
||||
@ -162,8 +163,7 @@ rta_copy (union sockunion *dest, caddr_t src) {
|
||||
if ((RTMADDRS) & (RTA)) \
|
||||
{ \
|
||||
int len = SAROUNDUP ((PNT)); \
|
||||
if ((DEST) != NULL) \
|
||||
rta_copy((DEST), (PNT)); \
|
||||
rta_copy((DEST), (PNT)); \
|
||||
(PNT) += len; \
|
||||
}
|
||||
|
||||
@ -755,7 +755,9 @@ ifam_read (struct ifa_msghdr *ifam)
|
||||
/* Unset interface index from link-local address when IPv6 stack
|
||||
is KAME. */
|
||||
if (IN6_IS_ADDR_LINKLOCAL (&addr.sin6.sin6_addr))
|
||||
SET_IN6_LINKLOCAL_IFINDEX (addr.sin6.sin6_addr, 0);
|
||||
{
|
||||
SET_IN6_LINKLOCAL_IFINDEX (addr.sin6.sin6_addr, 0);
|
||||
}
|
||||
|
||||
if (ifam->ifam_type == RTM_NEWADDR)
|
||||
connected_add_ipv6 (ifp, flags, &addr.sin6.sin6_addr,
|
||||
@ -1174,7 +1176,8 @@ rtmsg_debug (struct rt_msghdr *rtm)
|
||||
zlog_debug ("Kernel: Len: %d Type: %s", rtm->rtm_msglen, lookup (rtm_type_str, rtm->rtm_type));
|
||||
rtm_flag_dump (rtm->rtm_flags);
|
||||
zlog_debug ("Kernel: message seq %d", rtm->rtm_seq);
|
||||
zlog_debug ("Kernel: pid %d, rtm_addrs 0x%x", rtm->rtm_pid, rtm->rtm_addrs);
|
||||
zlog_debug ("Kernel: pid %lld, rtm_addrs 0x%x",
|
||||
(long long)rtm->rtm_pid, rtm->rtm_addrs);
|
||||
}
|
||||
|
||||
/* This is pretty gross, better suggestions welcome -- mhandler */
|
||||
|
Loading…
Reference in New Issue
Block a user