Introduce DefaultLink; dont hardcode name of the link
This commit is contained in:
parent
f97565ef0a
commit
371b23d055
@ -20,6 +20,8 @@ import (
|
|||||||
var (
|
var (
|
||||||
// ControlChannel is the name of the tunnel channel for passing contron message
|
// ControlChannel is the name of the tunnel channel for passing contron message
|
||||||
ControlChannel = "control"
|
ControlChannel = "control"
|
||||||
|
// DefaultLink is default network link
|
||||||
|
DefaultLink = "network"
|
||||||
)
|
)
|
||||||
|
|
||||||
// network implements Network interface
|
// network implements Network interface
|
||||||
@ -229,7 +231,7 @@ func (n *network) advertise(client transport.Client, advertChan <-chan *router.A
|
|||||||
Address: event.Route.Address,
|
Address: event.Route.Address,
|
||||||
Gateway: n.options.Address,
|
Gateway: n.options.Address,
|
||||||
Network: event.Route.Network,
|
Network: event.Route.Network,
|
||||||
Link: "network",
|
Link: DefaultLink,
|
||||||
Metric: int64(event.Route.Metric),
|
Metric: int64(event.Route.Metric),
|
||||||
}
|
}
|
||||||
e := &pb.Event{
|
e := &pb.Event{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user