Project

General

Profile

Bug #11911

Inconsistent case handling for properties in dladm

Added by Garrett D'Amore 11 months ago. Updated 2 months ago.

Status:
Closed
Priority:
Normal
Category:
lib - userland libraries
Start date:
Due date:
% Done:

100%

Estimated time:
2.00 h
Difficulty:
Medium
Tags:
Gerrit CR:

Description

We noticed that when setting the mtu property using "mtu", the value would persist across reboots. But if we set the property using "MTU", it would not.

Upon deeper investigation, what we find is that the dladm data contains the upper case instead of the lower case, or even in addition.

This is due to inconsistent handling in the library.

History

#1

Updated by Electric Monk 3 months ago

  • Gerrit CR set to 283
#2

Updated by Garrett D'Amore 2 months ago

The PR for this was tested by manual runs of dladm, with various capitalization cases of mtu and other properties. Without this change, that would result in inconsistent behavior, but with it, the results are 100% as one would expect with well known properties treated case insensitively.

Testing was done by me, as well as part of our regular formal QA process (performed by dedicated QA engineers here at RackTop.)

In addition, our product makes programmatic use of dladm, and this code has been run through many, many test cycles for validation of reporting of properties, as well as configuring them -- particularly MTU and VLAN configuration, which are the most commonly needed changes.

#3

Updated by Electric Monk 2 months ago

  • Status changed from New to Closed
  • % Done changed from 90 to 100

git commit 777a71cfc7f5d1d0c739d58698fe598f2cdb6f2d

commit  777a71cfc7f5d1d0c739d58698fe598f2cdb6f2d
Author: Garrett D'Amore <garrett@damore.org>
Date:   2020-07-21T19:58:19.000Z

    11911 Inconsistent case handling for properties in dladm
    Reviewed by: Andrew Stormont <astormont@racktopsystems.com>
    Reviewed by: Albert Lee <alee@racktopsystems.com>
    Reviewed by: Paul Winder <paul@winder.uk.net>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Approved by: Robert Mustacchi <rm@fingolfin.org>

Also available in: Atom PDF