-
Notifications
You must be signed in to change notification settings - Fork 908
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
WIP ZONEVERSION (RFC9660) support #14818
base: master
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 11799714388Details
💛 - Coveralls |
auto& edited_serial = auth_serial.second.second; | ||
|
||
uint8_t labelcount = name.countLabels(); | ||
EDNSZoneVersion unedited = {labelcount, 0 /* FIXME enum */, unedited_serial}; |
Check notice
Code scanning / CodeQL
FIXME comment Note
{ | ||
uint8_t labelcount; | ||
uint8_t type; | ||
char version[256]; // FIXME they can be bigger |
Check notice
Code scanning / CodeQL
FIXME comment Note
|
||
bool getEDNSZoneVersionFromString(const string& options, EDNSZoneVersion& zoneversion) | ||
{ | ||
// cerr<<"options.size:"<<options.size()<<endl; |
Check notice
Code scanning / CodeQL
Commented-out code Note
bool getEDNSZoneVersionFromString(const char* options, unsigned int len, EDNSZoneVersion& zoneversion) | ||
{ | ||
EDNSZoneVersionWire zoneversionw{}; | ||
// static_assert(sizeof(zoneversionw) == 4, "sizeof(EDNSSubnetOptsWire) must be 4 bytes"); |
Check notice
Code scanning / CodeQL
Commented-out code Note
EDNSZoneVersionWire zoneversionw{}; | ||
// static_assert(sizeof(zoneversionw) == 4, "sizeof(EDNSSubnetOptsWire) must be 4 bytes"); | ||
if (len > sizeof(zoneversionw)) { | ||
return false; // FIXME this silently breaks on >256 bytes of version |
Check notice
Code scanning / CodeQL
FIXME comment Note
} else if (iter->first == EDNSOptionCode::ZONEVERSION) { | ||
EDNSZoneVersion zoneversion; | ||
if (getEDNSZoneVersionFromString(iter->second, zoneversion)) { | ||
if (zoneversion.type == 0) { // FIXME enum |
Check notice
Code scanning / CodeQL
FIXME comment Note
|
||
uint8_t labelcount = name.countLabels(); | ||
EDNSZoneVersion unedited = {labelcount, 0 /* FIXME enum */, unedited_serial}; | ||
EDNSZoneVersion edited = {labelcount, 246 /* FIXME enum and wrong number */, edited_serial}; |
Check notice
Code scanning / CodeQL
FIXME comment Note
this works: ./sdig 200.1.122.30 53 dateserial.example.com A zoneversion Reply to question for qname='dateserial.example.com.', qtype=A Rcode: 0 (No Error), RD: 0, QR: 1, TC: 0, AA: 1, opcode: 0 1 dateserial.example.com. 43200 IN SOA ns.dateserial.example.com. hsalgado.nic.cl. 2023050202 21600 7200 2592000 43200 2 . 0 IN OPT ABMABgMAeJVL2g== EDNS Zone Version for labelcount 3: 2023050202 missing: * support in auth * meson updates * good code
Short description
SOA serial
is the served serial.type 246
is the unedited serial in our backend storage.TODO:
Checklist
I have: