Skip to content

Commit dd8cd39

Browse files
committed
Add control.Interface.HardwareAddr
1 parent 1482471 commit dd8cd39

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

common/control/bind_finder.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package control
22

33
import (
4+
"net"
45
"net/netip"
56
)
67

@@ -12,8 +13,9 @@ type InterfaceFinder interface {
1213
}
1314

1415
type Interface struct {
15-
Index int
16-
MTU int
17-
Name string
18-
Addresses []netip.Prefix
16+
Index int
17+
MTU int
18+
Name string
19+
Addresses []netip.Prefix
20+
HardwareAddr net.HardwareAddr
1921
}

common/control/bind_finder_default.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@ func (f *DefaultInterfaceFinder) Update() error {
3131
return err
3232
}
3333
interfaces = append(interfaces, Interface{
34-
Index: netIf.Index,
35-
MTU: netIf.MTU,
36-
Name: netIf.Name,
37-
Addresses: common.Map(ifAddrs, M.PrefixFromNet),
34+
Index: netIf.Index,
35+
MTU: netIf.MTU,
36+
Name: netIf.Name,
37+
Addresses: common.Map(ifAddrs, M.PrefixFromNet),
38+
HardwareAddr: netIf.HardwareAddr,
3839
})
3940
}
4041
f.interfaces = interfaces

0 commit comments

Comments
 (0)