tiiuae / ghaf

TII SSRC Secure Technologies: Ghaf Framework
https://tiiuae.github.io/ghaf/
Apache License 2.0
35 stars 56 forks source link

logging: Update the mac address retrieval #701

Closed vunnyso closed 1 month ago

vunnyso commented 1 month ago

With this patch will be calling hwinfo utility to retrieve Permanent HW Address / MAC Address for wlp0s5f0 network interface. As we cannot rely on the sys interface for mac retrieval possibly due to MAC randomization.

Description of changes

Checklist for things done

Testing

In admin-vm run following command

[ghaf@admin-vm:~]$ sudo cat /var/lib/private/alloy/MACAddress

Its should match exactly Permanent HW Address of net-vm

[ghaf@net-vm:~]$ hwinfo --network --only /class/net/wlp0s5f0 | grep "Permanent HW Address"
brianmcgillion commented 1 month ago

addresss is now correct and visible in the server