[ovs-dev] [PATCH v1] socket-util: Fix recursion issue in sendmmsg
Zhenyu Gao
sysugaozhenyu at gmail.com
Fri Jul 14 15:06:50 UTC 2017
The wrap_sendmmsg has infinite recursion issue.
Fix it by undef sendmmsg.
Signed-off-by: Zhenyu Gao <sysugaozhenyu at gmail.com>
---
lib/socket-util.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/socket-util.c b/lib/socket-util.c
index de7df67..04401d4 100644
--- a/lib/socket-util.c
+++ b/lib/socket-util.c
@@ -1043,6 +1043,9 @@ sendmmsg(int fd, struct mmsghdr *msgs, unsigned int n, unsigned int flags)
return emulate_sendmmsg(fd, msgs, n, flags);
}
#else
+/* sendmmsg was redefined in lib/socket-util.c, should undef sendmmsg here
+ * to avoid recursion */
+#undef sendmmsg
int
wrap_sendmmsg(int fd, struct mmsghdr *msgs, unsigned int n, unsigned int flags)
{
--
1.8.3.1
More information about the dev
mailing list