mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:47:44 +00:00
Kernel/Net: Get the correct interface type in SIOCGIFHWADDR ioctl
When calling ioctl on a socket with SIOCGIFHWADDR, return the correct physical interface type. This value was previously hardcoded to ARPHRD_ETHER (Ethernet), and now can also return ARPHRD_LOOPBACK for the loopback adapter.
This commit is contained in:
parent
6f9b84a64a
commit
037744e62a
5 changed files with 19 additions and 1 deletions
|
@ -22,6 +22,7 @@ public:
|
|||
|
||||
virtual void send_raw(ReadonlyBytes) override;
|
||||
virtual StringView class_name() const override { return "LoopbackAdapter"sv; }
|
||||
virtual Type adapter_type() const override { return Type::Loopback; }
|
||||
virtual bool link_up() override { return true; }
|
||||
virtual bool link_full_duplex() override { return true; }
|
||||
virtual int link_speed() override { return 1000; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue