lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 11 Dec 2019 14:33:13 -0800
From:   Andy Roulin <aroulin@...ulusnetworks.com>
To:     netdev@...r.kernel.org
Cc:     dsahern@...il.com, nikolay@...ulusnetworks.com,
        roopa@...ulusnetworks.com, j.vosburgh@...il.com, vfalico@...il.com,
        andy@...yhouse.net, stephen@...workplumber.org
Subject: [PATCH iproute2-next v2 0/2] pretty-print 802.3ad slave state

Print the bond slave 802.3ad state in a human-readable way.
The 802.3ad bond slave actor/partner state definitions are exported
to userspace in the kernel include/uapi (dependent on the related
patch posted to net-next)

rtnetlink sends the bond slave state to userspace, see
 - IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE; and
 - IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE

and these are only printed as numbers, e.g.,

ad_actor_oper_port_state 15

Add an additional output in ip link show that prints a string describing
the individual 3ad bit meanings.

ad_actor_oper_port_state_str <active,short_timeout,aggregating,in_sync>

JSON output is also supported, the field becomes a json array:

"ad_actor_oper_port_state_str":
	["active","short_timeout","aggregating","in_sync"]

These changes are dependent on a kernel change to uapi/
The following patch is the kernel change sent to net-next:
[PATCH net-next v2] bonding: move 802.3ad port state flags to uapi

v2:
 - address patch format and comments

Andy Roulin (2):
  include/uapi: update bonding kernel header
  iplink: bond: print 3ad actor/partner oper states as strings

 include/uapi/linux/if_bonding.h | 10 +++++++++
 ip/iplink_bond_slave.c          | 36 +++++++++++++++++++++++++++++----
 2 files changed, 42 insertions(+), 4 deletions(-)

-- 
2.20.1

Powered by blists - more mailing lists