Subject: [PATCH net] bonding: fix send_peer_notif data truncation

From: liaichun <[email-masked]>
Date: Tue, 26 Jan 2021 11:52:01 +0000

send_peer_notif is u8, the value of this parameter is obtained from u8*int, the data may be truncated.
 And in practice, more than u8(256)  characters are used.
Fixes: 07a4ddec3ce9 ("bonding: add an option to specify a delay between peer notifications")

Signed-off-by: Aichun Li <[email-masked]>
---
 include/net/bonding.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/bonding.h b/include/net/bonding.h index 0960d9af7b8e..65394566d556 100644
--- a/include/net/bonding.h
+++ b/include/net/bonding.h
@@ -215,7 +215,7 @@ struct bonding {
 	 */
 	spinlock_t mode_lock;
 	spinlock_t stats_lock;
-	u8	 send_peer_notif;
+	u64	 send_peer_notif;
 	u8       igmp_retrans;
 #ifdef CONFIG_PROC_FS
 	struct   proc_dir_entry *proc_entry;
--
2.19.1