Skip to content

Commit

Permalink
fixes nil pointer when other VPCs with peering connections are found (#…
Browse files Browse the repository at this point in the history
…27)

If you have multiple VPCs in the account that also have peering
connections, then the unrelated VPCs should be ignored.
  • Loading branch information
chris-h-phillips authored and theatrus committed Mar 13, 2018
1 parent 3c84c07 commit 75183b6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions aws/vpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ func (v *vpcclient) DescribeVPCPeerCIDRs(vpcID string) ([]*net.IPNet, error) {
peer = peering.RequesterVpcInfo
} else if vpcID == *peering.RequesterVpcInfo.VpcId {
peer = peering.AccepterVpcInfo
} else {
continue
}

for _, cidrBlock := range peer.CidrBlockSet {
Expand Down

0 comments on commit 75183b6

Please sign in to comment.