u-root / u-root

A fully Go userland with Linux bootloaders! u-root can create a one-binary root file system (initramfs) containing a busybox-like set of tools written in Go.
https://u-root.org
BSD 3-Clause "New" or "Revised" License
2.62k stars 406 forks source link

Various attributes are missing in comparision to the ip command from core utils #3191

Open 10000TB opened 2 days ago

10000TB commented 2 days ago

(1) It looks like a couple of attributes are missing in comparision to the ip command from core utils from my end -- is your test log from the golang command or c implementatio on your linux ?

(a) qdisc noqueue -- is missing (b) mode DEFAULT -- is missing (c) qlen 1000 -- is missing (d) MAC for link / loopback is missing. (e) brd -- info is missing, e.g.

link/ether 1c:a0:b8:77:f4:22

while we should have

link/ether 1c:a0:b8:77:f4:22 brd ff:ff:ff:ff:ff:ff

xuehaohu@worldpeace:~/go/src/github.com/u-root/u-root/cmds/core/ip$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 1c:a0:b8:77:f4:22 brd ff:ff:ff:ff:ff:ff
altname enp0s31f6
4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default
link/ether 02:42:e4:13:32:83 brd ff:ff:ff:ff:ff:ff
xuehaohu@worldpeace:~/go/src/github.com/u-root/u-root/cmds/core/ip$ ./ip link
1: lo: <UP,LOOPBACK> mtu 65536 state UNKNOWN group default
link/loopback
2: eno1: <UP,BROADCAST,MULTICAST> mtu 1500 state UP group default
link/ether 1c:a0:b8:77:f4:22
4: docker0: <UP,BROADCAST,MULTICAST> mtu 1500 state DOWN group default
link/ether 02:42:e4:13:32:83
xuehaohu@worldpeace:~/go/src/github.com/u-root/u-root/cmds/core/ip$
10000TB commented 2 days ago

@RiSKeD : "Yes that is correct. Certain information is not accessible via our external library depency and cannot be displayed because of this."

10000TB commented 2 days ago

I am ok with with the explanation for this MVP implementation.

Thank you Fabian

10000TB commented 2 days ago

on a second thought, I'd like to keep this open to track the improvement.