summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Amelkin <alexander@amelkin.msk.ru>2019-09-05 15:10:02 +0300
committerAlexander Amelkin <alexander@amelkin.msk.ru>2019-09-05 15:10:02 +0300
commiteed9d5950e229257e90b3cdf311b456e36e3f30c (patch)
tree8265de6c607696d6febf00b93be638a9ae5877ba
parent4dc962b6141c3d513470b7afc9613d36e33c2375 (diff)
downloadipmitool-eed9d5950e229257e90b3cdf311b456e36e3f30c.tar.gz
lan: Refix 6e2b688e. Fix vlan range checking.
Commit 6e2b688e introduced a bug due to which VLAN id range checking was negated and resulted in error messages printed for correct VLAN ids. Resolves ipmitool/ipmitool#55 Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
-rw-r--r--lib/ipmi_lanp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ipmi_lanp.c b/lib/ipmi_lanp.c
index a293186..1be0e9a 100644
--- a/lib/ipmi_lanp.c
+++ b/lib/ipmi_lanp.c
@@ -1260,7 +1260,7 @@ ipmi_lan_set_vlan_id(struct ipmi_intf *intf, uint8_t chan, char *string)
rc = 0;
goto out;
}
- if (IPMI_LANP_IS_VLAN_VALID(id)) {
+ if (!IPMI_LANP_IS_VLAN_VALID(id)) {
lprintf(LOG_ERR,
"Retrieved VLAN ID %i is out of "
"range <%d..%d>.",
@@ -1285,7 +1285,7 @@ ipmi_lan_set_vlan_id(struct ipmi_intf *intf, uint8_t chan, char *string)
goto out;
}
- if (IPMI_LANP_IS_VLAN_VALID(id)) {
+ if (!IPMI_LANP_IS_VLAN_VALID(id)) {
lprintf(LOG_NOTICE,
"VLAN ID must be between %d and %d.",
IPMI_LANP_VLAN_ID_MIN,