39 lines
1.4 KiB
Diff
39 lines
1.4 KiB
Diff
From fa55117da22086855061d9dd87fae15fdbec58e6 Mon Sep 17 00:00:00 2001
|
|
From: Jakub Kicinski <jakub.kicinski@netronome.com>
|
|
Date: Wed, 18 Apr 2018 11:06:07 -0700
|
|
Subject: [PATCH] iplink_geneve: correct size of message to avoid spurious
|
|
errors
|
|
|
|
Commit 6c4b672738ac ("iplink_geneve: Get rid of inet_get_addr()")
|
|
inadvertently changed the parameter to addattr_l() resulting in:
|
|
|
|
addattr_l ERROR: message exceeded bound of 4
|
|
|
|
when remote is specified.
|
|
|
|
Fixes: 6c4b672738ac ("iplink_geneve: Get rid of inet_get_addr()")
|
|
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
|
|
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
|
|
(cherry picked from commit f5393225f947f76523571d6205198112dc4a8e09)
|
|
Signed-off-by: Phil Sutter <psutter@redhat.com>
|
|
---
|
|
ip/iplink_geneve.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/ip/iplink_geneve.c b/ip/iplink_geneve.c
|
|
index c66607267f7d1..e49a9adda1072 100644
|
|
--- a/ip/iplink_geneve.c
|
|
+++ b/ip/iplink_geneve.c
|
|
@@ -199,7 +199,7 @@ static int geneve_parse_opt(struct link_util *lu, int argc, char **argv,
|
|
if (is_addrtype_inet(&daddr)) {
|
|
int type = (daddr.family == AF_INET) ? IFLA_GENEVE_REMOTE :
|
|
IFLA_GENEVE_REMOTE6;
|
|
- addattr_l(n, sizeof(1024), type, daddr.data, daddr.bytelen);
|
|
+ addattr_l(n, 1024, type, daddr.data, daddr.bytelen);
|
|
}
|
|
if (!set_op || GENEVE_ATTRSET(attrs, IFLA_GENEVE_LABEL))
|
|
addattr32(n, 1024, IFLA_GENEVE_LABEL, label);
|
|
--
|
|
2.17.0
|
|
|