terminate MX label with null
This commit is contained in:
		
							parent
							
								
									908fd5314c
								
							
						
					
					
						commit
						c6715ee6bf
					
				| @ -22,7 +22,7 @@ exports.DNS_PACKER_TYPE_MX = function (ab, dv, total, record) { | ||||
|   // 16-bit priority and a sequence of labels as the exchange
 | ||||
|   record.exchange.split('.').forEach(function (label) { | ||||
|     mxLen += 1 + label.length; | ||||
|      | ||||
| 
 | ||||
|     dv.setUint8(total, label.length, false); | ||||
|     total += 1; | ||||
| 
 | ||||
| @ -31,10 +31,13 @@ exports.DNS_PACKER_TYPE_MX = function (ab, dv, total, record) { | ||||
|       total += 1; | ||||
|     }); | ||||
|   }); | ||||
|   dv.setUint8(total, 0, false); | ||||
|   total += 1; | ||||
|   mxLen += 1; | ||||
| 
 | ||||
|   // RDLENGTH
 | ||||
|   dv.setUint16(rdLenIndex, mxLen, false); | ||||
|    | ||||
| 
 | ||||
|   return total; | ||||
| }; | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user