mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-06 01:26:59 +02:00
fix: possible nil ptr for invalid records like too long name
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
This commit is contained in:
parent
6cf4783a07
commit
abf56c2240
@ -416,6 +416,9 @@ func (p *AWSProvider) records(ctx context.Context, zones map[string]*route53.Hos
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, ep := range newEndpoints {
|
for _, ep := range newEndpoints {
|
||||||
|
if ep == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if r.SetIdentifier != nil {
|
if r.SetIdentifier != nil {
|
||||||
ep.SetIdentifier = aws.StringValue(r.SetIdentifier)
|
ep.SetIdentifier = aws.StringValue(r.SetIdentifier)
|
||||||
switch {
|
switch {
|
||||||
|
@ -353,6 +353,12 @@ func TestAWSRecords(t *testing.T) {
|
|||||||
TTL: aws.Int64(recordTTL),
|
TTL: aws.Int64(recordTTL),
|
||||||
ResourceRecords: []*route53.ResourceRecord{{Value: aws.String("8.8.8.8")}},
|
ResourceRecords: []*route53.ResourceRecord{{Value: aws.String("8.8.8.8")}},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Name: aws.String("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.ext-dns-test-2.teapot.zalan.do."),
|
||||||
|
Type: aws.String(route53.RRTypeA),
|
||||||
|
TTL: aws.Int64(recordTTL),
|
||||||
|
ResourceRecords: []*route53.ResourceRecord{},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
Name: aws.String("*.wildcard-test.zone-2.ext-dns-test-2.teapot.zalan.do."),
|
Name: aws.String("*.wildcard-test.zone-2.ext-dns-test-2.teapot.zalan.do."),
|
||||||
Type: aws.String(route53.RRTypeA),
|
Type: aws.String(route53.RRTypeA),
|
||||||
|
Loading…
Reference in New Issue
Block a user