dim
dim copied to clipboard
DIM allows invalid PTR records to be added
DIM currently allows invalid PTR records to be added, for example:
rr_create(ip='12.0.0.1', type='PTR', views=['default'], ptrdname='z.test.com.', name='12.0.0.1.0.0.12.in-addr.arpa.', comment='')
results in
{
'layer3domain': 'default',
'record': '12.0.0.1',
'ttl': None,
'type': 'PTR',
'value': 'a.test.com.',
'view': 'default',
'zone': '0.0.12.in-addr.arpa'
}
see https://datatracker.ietf.org/doc/html/rfc1035#section-3.5
Domain names in the IN-ADDR.ARPA domain are defined to have up to four labels in addition to the IN-ADDR.ARPA suffix. Each label represents one octet of an Internet address, and is expressed as a character string for a decimal value in the range 0-255 (with leading zeros omitted except in the case of a zero octet which is represented by a single zero).
Additionally, rr_create(ip='12.0.0.2', type='PTR', views=['default'], ptrdname='b.test.com.', name='0.0.12.in-addr.arpa.', comment='')
results in
{
'layer3domain': 'default',
'record': '@',
'ttl': None,
'type': 'PTR',
'value': 'b.test.com.',
'view': 'default',
'zone': '0.0.12.in-addr.arpa'
}