libnetwork/drivers/bridge: testEndpoint.Interface: return concrete type

Interface-matching should generally happen on the receiver side, and this
function was only used in a single location, and passed as argument to
Driver.CreateEndpoint, which already matches the interface by accepting
a driverapi.InterfaceInfo.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-08-27 15:20:21 +02:00
parent 9afb688f5f
commit 15435f7293
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -549,12 +549,8 @@ func newTestEndpoint(nw *net.IPNet, ordinal byte) *testEndpoint {
return &testEndpoint{iface: &testInterface{addr: addr}}
}
func (te *testEndpoint) Interface() driverapi.InterfaceInfo {
if te.iface != nil {
return te.iface
}
return nil
func (te *testEndpoint) Interface() *testInterface {
return te.iface
}
func (i *testInterface) MacAddress() net.HardwareAddr {