summaryrefslogtreecommitdiffstats
path: root/zebra
diff options
context:
space:
mode:
authorF. Aragon <paco@voltanet.io>2018-07-02 17:05:17 +0200
committerF. Aragon <paco@voltanet.io>2018-07-02 19:06:54 +0200
commita85297a7c92297af0578fac6d2b48ca8c72a6a34 (patch)
tree973b64af63600214ca2093a3115558b353bbf043 /zebra
parentMerge pull request #2475 from LabNConsulting/working/master/no_vrf_socket_4l3... (diff)
downloadfrr-a85297a7c92297af0578fac6d2b48ca8c72a6a34.tar.xz
frr-a85297a7c92297af0578fac6d2b48ca8c72a6a34.zip
bgpd zebra: element overflow (PVS-Studio)
The warning given by PVS-Studio is related to per-element overflow (there is no real overflow, because of how elements are mapped in the union). This same warning is typically reported by Coverity, too. Signed-off-by: F. Aragon <paco@voltanet.io>
Diffstat (limited to 'zebra')
-rw-r--r--zebra/connected.c2
-rw-r--r--zebra/rtadv.c2
-rw-r--r--zebra/zapi_msg.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/zebra/connected.c b/zebra/connected.c
index a9a4dfe08..8869d34fd 100644
--- a/zebra/connected.c
+++ b/zebra/connected.c
@@ -564,7 +564,7 @@ void connected_delete_ipv6(struct interface *ifp, struct in6_addr *address,
if (broad) {
memset(&d, 0, sizeof(struct prefix));
d.family = AF_INET6;
- IPV6_ADDR_COPY(&d.u.prefix, broad);
+ IPV6_ADDR_COPY(&d.u.prefix6, broad);
d.prefixlen = prefixlen;
ifc = connected_check_ptp(ifp, &p, &d);
} else
diff --git a/zebra/rtadv.c b/zebra/rtadv.c
index dc918b1a9..49ffcdd49 100644
--- a/zebra/rtadv.c
+++ b/zebra/rtadv.c
@@ -518,7 +518,7 @@ static void rtadv_process_advert(uint8_t *msg, unsigned int len,
/* Create entry for neighbor if not known. */
p.family = AF_INET6;
- IPV6_ADDR_COPY(&p.u.prefix, &addr->sin6_addr);
+ IPV6_ADDR_COPY(&p.u.prefix6, &addr->sin6_addr);
p.prefixlen = IPV6_MAX_PREFIXLEN;
if (!nbr_connected_check(ifp, &p))
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c
index 6e0d86d66..08666bf37 100644
--- a/zebra/zapi_msg.c
+++ b/zebra/zapi_msg.c
@@ -448,7 +448,7 @@ void nbr_connected_add_ipv6(struct interface *ifp, struct in6_addr *address)
struct prefix p;
p.family = AF_INET6;
- IPV6_ADDR_COPY(&p.u.prefix, address);
+ IPV6_ADDR_COPY(&p.u.prefix6, address);
p.prefixlen = IPV6_MAX_PREFIXLEN;
ifc = listnode_head(ifp->nbr_connected);
@@ -473,7 +473,7 @@ void nbr_connected_delete_ipv6(struct interface *ifp, struct in6_addr *address)
struct prefix p;
p.family = AF_INET6;
- IPV6_ADDR_COPY(&p.u.prefix, address);
+ IPV6_ADDR_COPY(&p.u.prefix6, address);
p.prefixlen = IPV6_MAX_PREFIXLEN;
ifc = nbr_connected_check(ifp, &p);