diff options
author | Toomas Soome <tsoome@me.com> | 2022-11-19 16:59:15 +0200 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2022-12-05 19:43:34 +0200 |
commit | 0b49aa923f72d28badbed5f4d3ed43a816f07a39 (patch) | |
tree | 70ac58589fb9fcf956f0463eedd96409cdb108c1 | |
parent | c8ed50c6d60fbb337f556eadef95cef18c28afa5 (diff) | |
download | illumos-gate-0b49aa923f72d28badbed5f4d3ed43a816f07a39.tar.gz |
15197 libdladm: enumeration values not handled in switch
Reviewed by: Marco van Wieringen <mvw@planets.elm.net>
Approved by: Gordon Ross <gordon.w.ross@gmail.com>
-rw-r--r-- | usr/src/lib/libdladm/Makefile.com | 1 | ||||
-rw-r--r-- | usr/src/lib/libdladm/common/libdliptun.c | 2 | ||||
-rw-r--r-- | usr/src/lib/libdladm/common/libdlvnic.c | 2 |
3 files changed, 4 insertions, 1 deletions
diff --git a/usr/src/lib/libdladm/Makefile.com b/usr/src/lib/libdladm/Makefile.com index 13a5e8384a..d766a381c2 100644 --- a/usr/src/lib/libdladm/Makefile.com +++ b/usr/src/lib/libdladm/Makefile.com @@ -44,7 +44,6 @@ SRCDIR = ../common CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-parentheses -CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-unused-label CERRWARN += $(CNOWARN_UNINIT) CPPFLAGS += -I$(SRCDIR) -D_REENTRANT diff --git a/usr/src/lib/libdladm/common/libdliptun.c b/usr/src/lib/libdladm/common/libdliptun.c index 8e4855fff5..cf1ab20ba3 100644 --- a/usr/src/lib/libdladm/common/libdliptun.c +++ b/usr/src/lib/libdladm/common/libdliptun.c @@ -122,6 +122,8 @@ i_iptun_kparams(dladm_handle_t handle, const iptun_params_t *params, case IPTUN_TYPE_IPV6: hints.ai_family = AF_INET6; break; + case IPTUN_TYPE_UNKNOWN: + return (DLADM_STATUS_BADIPTUNLADDR); } } diff --git a/usr/src/lib/libdladm/common/libdlvnic.c b/usr/src/lib/libdladm/common/libdlvnic.c index d76fcf0b08..30e9f1b986 100644 --- a/usr/src/lib/libdladm/common/libdlvnic.c +++ b/usr/src/lib/libdladm/common/libdlvnic.c @@ -148,6 +148,8 @@ i_dladm_vnic_create_sys(dladm_handle_t handle, dladm_vnic_attr_t *attr) bcopy(ioc.vc_mac_addr, attr->va_mac_addr, MAXMACADDRLEN); attr->va_mac_len = ioc.vc_mac_len; break; + default: + break; } return (status); } |