With DELL systems (at least R740 and R640), executing ipmitool lan print is a success but returns in error because those systems do not support IPMI_LANP_BAD_PASS_THRESH property.
The error occurs because get_lan_param_select() returns NULL despite the BMC answered with proper code 0x80 "not supported":
176 /* get_lan_param_select - Query BMC for LAN parameter data 177 * 178 * return pointer to lan_param if successful 179 * if parameter not supported then 180 * return pointer to lan_param with 181 * lan_param->data == NULL and lan_param->data_len == 0 182 * return NULL on error 183 * 184 * @intf: ipmi interface handle 185 * @chan: ipmi channel 186 * @param: lan parameter id 187 * @select: lan parameter set selector 188 */ 189 static struct lan_param * 190 get_lan_param_select(struct ipmi_intf *intf, uint8_t chan, int param, int select) 191 { : 222 rsp = intf->sendrecv(intf, &req); 223 if (!rsp) { 224 lprintf(LOG_INFO, "Get LAN Parameter '%s' command failed", p->desc); 225 return rc; 226 } 227 228 switch (rsp->ccode) 229 { 230 case 0x00: /* successful */ 231 break; 232 233 case 0x80: /* parameter not supported */ 234 case 0xc9: /* parameter out of range */ 235 case 0xcc: /* invalid data field in request */ 236 /* We treat them as valid but empty response */ 237 p->data = NULL; 238 p->data_len = 0; 239 rc = p; 240 /* fall through */ 241 default: 242 /* other completion codes are treated as error */ 243 lprintf(LOG_INFO, "Get LAN Parameter '%s' command failed: %s", 244 p->desc, 245 specific_val2str(rsp->ccode, 246 get_lan_cc_vals, 247 completion_code_vals)); 248 >>> return NULL; 249 } :
The reason is the unexpected return NULL on line 248 instead of return rc, which should apply unconditionally (rc is initialized to NULL so if there is some unknown error this will work anyway):
233 case 0x80: /* parameter not supported */ 234 case 0xc9: /* parameter out of range */ 235 case 0xcc: /* invalid data field in request */ 236 /* We treat them as valid but empty response */ 237 p->data = NULL; 238 p->data_len = 0; 239 rc = p; 240 /* fall through */ 241 default: 242 /* other completion codes are treated as error */ 243 lprintf(LOG_INFO, "Get LAN Parameter '%s' command failed: %s", 244 p->desc, 245 specific_val2str(rsp->ccode, 246 get_lan_cc_vals, 247 completion_code_vals)); 248 >>> return rc; 249 }