diff options
author | Binbin Xu <xu.binbin1@zte.com.cn> | 2016-08-20 04:54:54 +0800 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2016-08-19 09:09:24 -0700 |
commit | 12c1bda689474e8f3182507537c1ce27b71d4aa2 (patch) | |
tree | e506a1fb29a93c2eedf3aba425a0747f3530f60c /include | |
parent | 96a234ad8a96314cb083dc1816f0023e0940bc92 (diff) | |
download | openvswitch-12c1bda689474e8f3182507537c1ce27b71d4aa2.tar.gz |
vlog: Fix crash when --syslog-method has no argument.
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@zte.com.cn>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/openvswitch/vlog.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/openvswitch/vlog.h b/include/openvswitch/vlog.h index de64cbd8a..3a4042113 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 \ |