Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep route: [ 0.0.0.0/0 via ECS instance ] to work with alicloud DNAT… #693

Merged
merged 1 commit into from
Apr 26, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions backend/alivpc/alivpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,11 @@ func (be *AliVpcBackend) recreateRoute(c *ecs.Client, table ecs.RouteTableSetTyp
log.Infof("Keep target entry: rtableid=%s, CIDR=%s, NextHop=%s \n", e.RouteTableId, e.DestinationCidrBlock, e.InstanceId)
continue
}
// 0.0.0.0/0 => ECS1 this kind of route is used for DNAT. so we keep it
if e.DestinationCidrBlock == "0.0.0.0/0" {
log.Infof("Keep route entry: rtableid=%s, CIDR=%s, NextHop=%s For DNAT\n", e.RouteTableId, e.DestinationCidrBlock, e.InstanceId)
continue
}
// Fix: here we delete all the route which targeted to us(instance) except the specified route.
// That means only one CIDR was allowed to target to the instance. Think if We need to change this
// to adapt to multi CIDR and deal with unavailable route entry.
Expand Down