Skip to content

Commit

Permalink
remove buggydns1
Browse files Browse the repository at this point in the history
  • Loading branch information
jfesler committed Jul 19, 2024
1 parent 3217f30 commit 1244b6d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 38 deletions.
6 changes: 0 additions & 6 deletions generate.pl
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,6 @@
v6ns ns v6ns1
v6ns1 AAAA $argv{6}
; buggydns detects CPE devices that misinterpret AAAA
; requests for A; the buggy CPE will return either the
; first or last 32 bits.
; Do not use where IPv4 is between 32.0.0.0 and 63.255.255.255.
;buggydns1 AAAA $argv{buggy}
; Convenience names not used in the tests;
; but perhaps friendly for humans
a A $argv{4}
Expand Down
33 changes: 1 addition & 32 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var files = [ "v6ns","domain","v6ns1"];
var variables = [ "domain","ns","hostmaster","4","6","1280","buggy","serial" ];
var variables = [ "domain","ns","hostmaster","4","6","1280","serial" ];


function update_serial() {
Expand All @@ -20,48 +20,17 @@ function update_serial() {
$("#form_serial").val( yyyy + mm + dd );

}
function update_buggydns() {
ipv4 = $("#form_4").val();
parts = ipv4.split(".");
s = "";
for (i=0; i < parts.length; i++) {
val = parseInt(parts[i],10);
hex = val.toString(16);
if (hex.length == 1) {
hex = "0" + hex;
}
s = s + hex;
}
r = s.substring(0,4) + ":" + s.substring(4,8) + ":" +
s.substring(0,4) + ":" + s.substring(4,8) + ":" +
s.substring(0,4) + ":" + s.substring(4,8) + ":" +
s.substring(0,4) + ":" + s.substring(4,8);
$("#form_buggy").val(r)

if (parts[0] < 32) {
return true;
}
if (parts[0] > 63) {
return true;
}
return false;
}


function update_templates() {
try {
update_serial();
safe=update_buggydns()
} catch (err) {
}

for (i=0; i < files.length; i++) {
file = files[i];
template = templates[file];

if (safe) {
template = template.replace(/;buggydns1/,'buggydns1');
}

for (j=0; j < variables.length; j++) {
variable = variables[j];
Expand Down

0 comments on commit 1244b6d

Please sign in to comment.