34 lines
1.0 KiB
Diff
34 lines
1.0 KiB
Diff
From 5002608af85c5efe92005f839d7417ee5c0a7cf9 Mon Sep 17 00:00:00 2001
|
|
From: John Fastabend <john.r.fastabend@intel.com>
|
|
Date: Wed, 27 Jul 2011 15:05:19 -0700
|
|
Subject: [PATCH 10/29] lldpad: 802.1Qaz resolve incorrect tcbw memcpy
|
|
|
|
The tcbw attributes were not being correctly configured on
|
|
32bit archs because of incorrect sizeof() usage in argument
|
|
handlers. x86_64 happened to work by chance.
|
|
|
|
This patch resolves the issue.
|
|
|
|
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
|
|
Signed-off-by: Petr Sabata <contyk@redhat.com>
|
|
---
|
|
lldp_8021qaz_cmds.c | 2 +-
|
|
1 files changed, 1 insertions(+), 1 deletions(-)
|
|
|
|
diff --git a/lldp_8021qaz_cmds.c b/lldp_8021qaz_cmds.c
|
|
index 7ddb22b..1ee733e 100644
|
|
--- a/lldp_8021qaz_cmds.c
|
|
+++ b/lldp_8021qaz_cmds.c
|
|
@@ -471,7 +471,7 @@ static int _set_arg_tcbw(struct cmd *cmd, char *args,
|
|
free(parse);
|
|
return cmd_success;
|
|
} else {
|
|
- memcpy(tcbw, percent, sizeof(tcbw));
|
|
+ memcpy(tcbw, percent, sizeof(*tcbw) * MAX_TCS);
|
|
}
|
|
|
|
strncat(obuf, "tcbw = ", obuf_len - strlen(obuf) - 1);
|
|
--
|
|
1.7.6
|
|
|