From 4da8051b282b347b6b89b5a8d6b5ffab2d92ac0f Mon Sep 17 00:00:00 2001 From: Lars Gierth Date: Fri, 23 Mar 2018 04:22:41 +0100 Subject: [PATCH] fix: use consistent /dnsaddr code --- src/convert.js | 4 ++-- src/protocols-table.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/convert.js b/src/convert.js index 30bb527a..876decf0 100644 --- a/src/convert.js +++ b/src/convert.js @@ -29,9 +29,9 @@ Convert.toString = function convertToString (proto, buf) { case 132: // sctp return buf2port(buf) - case 53: // dns case 54: // dns4 case 55: // dns6 + case 56: // dnsaddr return buf2str(buf) case 421: // ipfs @@ -54,9 +54,9 @@ Convert.toBuffer = function convertToBuffer (proto, str) { case 132: // sctp return port2buf(parseInt(str, 10)) - case 53: // dns case 54: // dns4 case 55: // dns6 + case 56: // dnsaddr return str2buf(str) case 421: // ipfs diff --git a/src/protocols-table.js b/src/protocols-table.js index 595049cd..05a42869 100644 --- a/src/protocols-table.js +++ b/src/protocols-table.js @@ -30,9 +30,9 @@ Protocols.table = [ [17, 16, 'udp'], [33, 16, 'dccp'], [41, 128, 'ip6'], - [53, V, 'dnsaddr', 'resolvable'], [54, V, 'dns4', 'resolvable'], [55, V, 'dns6', 'resolvable'], + [56, V, 'dnsaddr', 'resolvable'], [132, 16, 'sctp'], // all of the below use varint for size [302, 0, 'utp'],