ryran / xsos

sosreport examiner - instantly summarize system info from a sosreport or a running system
337 stars 121 forks source link

xsos --ip returns incorrect state for loopback adapter in SOS Report #271

Open SenseiC opened 2 years ago

SenseiC commented 2 years ago

Not 100% certain this constitutes an issue or not... I couldn't determine exactly how the code gets the status of the loopback device, but as an example...

From the SOS Report (sos_commands/networking/ip_-d_address) you can see that the loopback adapter got reported as having a state of UNKNOWN:

$ head -n4 sos_commands/networking/ip_-d_address
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 promiscuity 0 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever

but xsos reports a state of "up":

$ xsos --ip . | head -n4
IP4
  Interface  Master IF  MAC Address        MTU     State  IPv4 Address
  =========  =========  =================  ======  =====  ==================
  lo         -          -                  65536   up     127.0.0.1/8

SenseiC

superjamie commented 2 years ago

Thanks for the report. I fixed the code formatting and will try look into this soon.