summaryrefslogtreecommitdiffstats
path: root/sharpd
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2021-07-01 22:29:26 +0200
committerDonatas Abraitis <donatas.abraitis@gmail.com>2021-07-01 22:54:39 +0200
commit8643c2e5f7b5541f136a3dfff5abe5b537159442 (patch)
tree5951d4ae8a28244fa2545c56d06629ef009ccf87 /sharpd
parent*: Convert numeric 32 into IPV4_MAX_BITLEN for prefixlen (diff)
downloadfrr-8643c2e5f7b5541f136a3dfff5abe5b537159442.tar.xz
frr-8643c2e5f7b5541f136a3dfff5abe5b537159442.zip
*: Replace 4/16 integers to IPV4_MAX_BYTELEN/IPV6_MAX_BYTELEN
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'sharpd')
-rw-r--r--sharpd/sharp_vty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sharpd/sharp_vty.c b/sharpd/sharp_vty.c
index f8c46894b..b6581cd9e 100644
--- a/sharpd/sharp_vty.c
+++ b/sharpd/sharp_vty.c
@@ -98,7 +98,7 @@ DEFPY(watch_nexthop_v6, watch_nexthop_v6_cmd,
if (n) {
type_import = false;
p.prefixlen = IPV6_MAX_BITLEN;
- memcpy(&p.u.prefix6, &nhop, 16);
+ memcpy(&p.u.prefix6, &nhop, IPV6_MAX_BYTELEN);
p.family = AF_INET6;
} else {
type_import = true;