Fix udpPayloadSize encoding

This commit is contained in:
Martin Kolárik
2019-03-26 13:25:30 +01:00
committed by Mathias Buus
parent 77eadae3c3
commit c61dd19846
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1316,7 +1316,7 @@ answer.encode = function (a, buf, offset) {
if (a.name !== '.') {
throw new Error('OPT name must be root.')
}
buf.writeUInt16BE(a.updPayloadSize || 4096, offset + 2)
buf.writeUInt16BE(a.udpPayloadSize || 4096, offset + 2)
buf.writeUInt8(a.extendedRcode || 0, offset + 4)
buf.writeUInt8(a.ednsVersion || 0, offset + 5)
buf.writeUInt16BE(a.flags || 0, offset + 6)
+1 -1
View File
@@ -340,7 +340,7 @@ tape('opt', function (t) {
additionals: [{
type: 'OPT',
name: '.',
udpPayloadSize: 4096
udpPayloadSize: 1024
}]
}
testEncoder(t, packet, val)