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]
Message-Id: <1577794502-8063-1-git-send-email-aroulin@cumulusnetworks.com>
Date:   Tue, 31 Dec 2019 04:15:00 -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, aroulin@...ulusnetworks.com
Subject: [PATCH iproute2-next v3 0/2] pretty-print LACP slave state

Print the bond slave 802.3ad/LACP state in a human-readable way.
The LACP bond slave actor/partner state definitions are exported
to userspace in the kernel include/uapi.

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/ in net-next;
the following patches are the changes and are already in net-next:
[PATCH net-next v2] bonding: move 802.3ad port state flags to uapi
[PATCH net-next v2] bonding: rename AD_STATE_* to LACP_STATE_*

v2:
 - address patch format and comments

v3:
 - prefix state defines with LACP_*

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 | 16 +++++++--------
 ip/iplink_bond_slave.c          | 36 +++++++++++++++++++++++++++++----
 2 files changed, 40 insertions(+), 12 deletions(-)

-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ