summaryrefslogtreecommitdiffstats
path: root/ripd
diff options
context:
space:
mode:
authorPat Ruddy <pat@voltanet.io>2021-03-25 15:39:07 +0100
committerPat Ruddy <pat@voltanet.io>2021-03-25 16:24:50 +0100
commit9e26322126ed6daef7ae16b4c9a547ae28a02226 (patch)
tree2b80ff835e5368b6a70fe7cc87da585eeeca5c80 /ripd
parentMerge pull request #8318 from qlyoung/improve-lua-autoconf-detection (diff)
downloadfrr-9e26322126ed6daef7ae16b4c9a547ae28a02226.tar.xz
frr-9e26322126ed6daef7ae16b4c9a547ae28a02226.zip
lib, bgpd: add a specific oid_copy function for IPv6 addrs
Do not overload the v4 oid_copy_addr function for ipv6 coverity does not like this kind of thing. Signed-off-by: Pat Ruddy <pat@voltanet.io>
Diffstat (limited to 'ripd')
-rw-r--r--ripd/rip_snmp.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/ripd/rip_snmp.c b/ripd/rip_snmp.c
index 37bce7484..b922d6691 100644
--- a/ripd/rip_snmp.c
+++ b/ripd/rip_snmp.c
@@ -271,7 +271,7 @@ static struct interface *rip2IfLookup(struct variable *v, oid name[],
if (ifp == NULL)
return NULL;
- oid_copy_addr(name + v->namelen, addr, sizeof(struct in_addr));
+ oid_copy_in_addr(name + v->namelen, addr);
*length = v->namelen + sizeof(struct in_addr);
@@ -320,8 +320,8 @@ static struct rip_peer *rip2PeerLookup(struct variable *v, oid name[],
|| (peer->domain
> (int)name[v->namelen
+ sizeof(struct in_addr)])) {
- oid_copy_addr(name + v->namelen, &peer->addr,
- sizeof(struct in_addr));
+ oid_copy_in_addr(name + v->namelen,
+ &peer->addr);
name[v->namelen + sizeof(struct in_addr)] =
peer->domain;
*length =
@@ -334,8 +334,7 @@ static struct rip_peer *rip2PeerLookup(struct variable *v, oid name[],
if (!peer)
return NULL;
- oid_copy_addr(name + v->namelen, &peer->addr,
- sizeof(struct in_addr));
+ oid_copy_in_addr(name + v->namelen, &peer->addr);
name[v->namelen + sizeof(struct in_addr)] = peer->domain;
*length = sizeof(struct in_addr) + v->namelen + 1;