diff options
author | Stefano Garzarella <sgarzare@redhat.com> | 2019-05-17 15:47:45 +0200 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2019-07-02 10:21:06 +0800 |
commit | 21c520d0c1ab64770f09f6fbf5952807e856e903 (patch) | |
tree | a3a9559820bca50f091c72c5a619f59b73bbf46e /qemu-bridge-helper.c | |
parent | 59377b4a4b6830b71ea937aaf25bfca941cad264 (diff) |
net: fix assertion failure when ipv6-prefixlen is not a number
If 'ipv6-prefixlen' is not a number, the current behaviour
produces an assertion failure:
$ qemu-system-x86_64 -net user,ipv6-net=feca::0/a
qemu-system-x86_64: qemu/util/qemu-option.c:1175: qemu_opts_foreach:
Assertion `!errp || !*errp' failed.
Aborted (core dumped)
This patch fixes it, jumping to the end of the function when
'ipv6-prefixlen' is not a number, and printing the more friendly
message:
$ qemu-system-x86_64 -net user,ipv6-net=feca::0/a
qemu-system-x86_64: Parameter 'ipv6-prefixlen' expects a number
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'qemu-bridge-helper.c')
0 files changed, 0 insertions, 0 deletions