From efd6cf89b2ae60b3117016dd1ca8ab43396c1602 Mon Sep 17 00:00:00 2001
From: zhangyao2022 <zhangyao108@huawei.com>
Date: Fri, 24 Nov 2023 15:38:11 +0800
Subject: [PATCH] fix: fixed the ListenNetlink parsing error of socket section

---
 core/coms/socket/src/config.rs | 2 +-
 core/coms/socket/src/rentry.rs | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/core/coms/socket/src/config.rs b/core/coms/socket/src/config.rs
index 9585d5f..69cdc32 100755
--- a/core/coms/socket/src/config.rs
+++ b/core/coms/socket/src/config.rs
@@ -207,7 +207,7 @@ impl SocketConfig {
         let config = &self.data.borrow().Socket;
         self.parse_sockets(config.ListenStream.as_ref(), ListenItem::Stream)?;
         self.parse_sockets(config.ListenDatagram.as_ref(), ListenItem::Datagram)?;
-        self.parse_sockets(config.ListenNetlink.as_ref(), ListenItem::Netlink)?;
+        self.parse_sockets(&[config.ListenNetlink.clone()], ListenItem::Netlink)?;
         self.parse_sockets(
             config.ListenSequentialPacket.as_ref(),
             ListenItem::SequentialPacket,
diff --git a/core/coms/socket/src/rentry.rs b/core/coms/socket/src/rentry.rs
index 9f9bcb5..8b20c7e 100755
--- a/core/coms/socket/src/rentry.rs
+++ b/core/coms/socket/src/rentry.rs
@@ -60,8 +60,8 @@ pub(super) struct SectionSocket {
     pub ListenStream: Vec<String>,
     #[entry(multiple)]
     pub ListenDatagram: Vec<String>,
-    #[entry(multiple)]
-    pub ListenNetlink: Vec<String>,
+    #[entry(default = String::new())]
+    pub ListenNetlink: String,
     #[entry(multiple)]
     pub ListenSequentialPacket: Vec<String>,
     #[entry(multiple)]
-- 
2.33.0

