def test_bad_option_length(self): with self.assertRaisesRegex(ValueError, 'must have length 0'): ReconfigureAcceptOption.parse(bytes.fromhex('00140001'))
def setUp(self): self.option_bytes = bytes.fromhex('00140000') self.option_object = ReconfigureAcceptOption() self.parse_option()
]), IAPDOption(iaid=bytes.fromhex('c43cb2f1'), options=[ IAPrefixOption( prefix=IPv6Network('2001:db8:ffcc:fe00::/56'), preferred_lifetime=375, valid_lifetime=600), ]), ClientIdOption(duid=LinkLayerDUID(hardware_type=1, link_layer_address=bytes.fromhex( '3431c43cb2f1'))), ServerIdOption(duid=LinkLayerTimeDUID(hardware_type=1, time=488458703, link_layer_address=bytes.fromhex( '00137265ca42'))), ReconfigureAcceptOption(), RecursiveNameServersOption( dns_servers=[IPv6Address('2001:4860:4860::8888')]), ], ) reply_packet = codecs.decode( '07f350d600030028c43cb2f100000000' '000000000005001820010db8ffff0001' '000c00000000e09c0000017700000258' '00190029c43cb2f10000000000000000' '001a001900000177000002583820010d' 'b8ffccfe000000000000000000000100' '0a000300013431c43cb2f10002000e00' '0100011d1d49cf00137265ca42001400' '00001700102001486048600000000000'