Skip to content

Commit

Permalink
NET-1146: add node ipv6 addr to egress route (#2896)
Browse files Browse the repository at this point in the history
* add node ipv6 addr to egress route

* fix egress route ipv6 address issue

* revert ipv6 peer addr change

---------

Co-authored-by: Max Ma <[email protected]>
  • Loading branch information
abhishek9686 and yabinma authored Apr 16, 2024
1 parent 5ff9289 commit 8b08ad1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion logic/peers.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ func GetPeerUpdateForHost(network string, host *models.Host, allNodes []models.N
}
if peer.IsEgressGateway {
hostPeerUpdate.EgressRoutes = append(hostPeerUpdate.EgressRoutes, models.EgressNetworkRoutes{
NodeAddr: node.PrimaryAddressIPNet(),
NodeAddr: node.Address,
NodeAddr6: node.Address6,
EgressRanges: peer.EgressGatewayRanges,
})
}
Expand Down
1 change: 1 addition & 0 deletions models/mqtt.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ type EgressInfo struct {
// EgressNetworkRoutes - struct for egress network routes for adding routes to peer's interface
type EgressNetworkRoutes struct {
NodeAddr net.IPNet `json:"node_addr"`
NodeAddr6 net.IPNet `json:"node_addr6"`
EgressRanges []string `json:"egress_ranges"`
}

Expand Down

0 comments on commit 8b08ad1

Please sign in to comment.