[ovs-dev] [PATCH] vlog: fix the crash caused by option syslog-method
Binbin Xu
xu.binbin1 at zte.com.cn
Fri Aug 19 20:54:54 UTC 2016
When we start ovs-appctl with no argument option "syslog-method",
the process crashed.
backtrace:
0 0x00000000004180c4 in vlog_set_syslog_method (method=0x0) at lib/vlog.c:587
1 0x0000000000408b27 in parse_command_line (argv=0x7fff097e83b8, argc=2) at utilities/ovs-appctl.c:175
2 main (argc=2, argv=0x7fff097e83b8) at utilities/ovs-appctl.c:53
Signed-off-by: Binbin Xu <xu.binbin1 at zte.com.cn>
---
include/openvswitch/vlog.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/openvswitch/vlog.h b/include/openvswitch/vlog.h
index de64cbd..3a40421 100644
--- a/include/openvswitch/vlog.h
+++ b/include/openvswitch/vlog.h
@@ -243,7 +243,7 @@ void vlog_rate_limit(const struct vlog_module *, enum vlog_level,
#define VLOG_LONG_OPTIONS \
{"verbose", optional_argument, NULL, 'v'}, \
{"log-file", optional_argument, NULL, OPT_LOG_FILE}, \
- {"syslog-method", optional_argument, NULL, OPT_SYSLOG_IMPL}, \
+ {"syslog-method", required_argument, NULL, OPT_SYSLOG_IMPL}, \
{"syslog-target", required_argument, NULL, OPT_SYSLOG_TARGET}
#define VLOG_OPTION_HANDLERS \
--
2.9.3
More information about the dev
mailing list