def lisp_itr_timeout_dynamic_eids(lisp_socket): lisp.lisp_set_exception() now = lisp.lisp_get_timestamp() for db in lisp.lisp_db_list: if (db.dynamic_eid_configured() == False): continue delete_list = [] for dyn_eid in db.dynamic_eids.values(): ts = dyn_eid.last_packet if (ts == None): continue if (ts + dyn_eid.timeout > now): continue # # Check hardware if dyn-EID has had packets SENT to. We want the # opposite but this is all we get from Arista. # if (lisp.lisp_program_hardware): prefix = dyn_eid.dynamic_eid.print_prefix_no_iid() if (lisp.lisp_arista_is_alive(prefix)): lisp.lprint(("Hardware indicates dynamic-EID {} " + \ "still active").format(lisp.green(prefix, False))) continue #endif #endif # # Tell ETR process so it can register dynamic-EID. # eid_str = dyn_eid.dynamic_eid.print_address() ipc = "learn%{}%None".format(eid_str) ipc = lisp.lisp_command_ipc(ipc, "lisp-itr") lisp.lisp_ipc(ipc, lisp_socket, "lisp-etr") lisp.lprint("Dynamic-EID {}".format( \ lisp.bold(lisp.green(eid_str, False) + " activity timeout", False))) delete_list.append(eid_str) #endfor # # Remove the timed out entries from db.dynamic_eids{}. # for eid_str in delete_list: db.dynamic_eids.pop(eid_str) #endfor # # Restart periodic timer. # threading.Timer(lisp.LISP_DEFAULT_DYN_EID_TIMEOUT, lisp_itr_timeout_dynamic_eids, [lisp_socket]).start() return
def lisp_itr_pcap_process_packet(device, not_used, packet): offset = 4 if device == "lo0" else 0 if device == "lispers.net" else 14 if (lisp.lisp_frame_logging): title = lisp.bold("Received frame on interface '{}'".format(device), False) frame = lisp.lisp_format_packet(packet[0:64]) lisp.lprint("{}: {}".format(title, frame)) #endif # # Get input interface based on source MAC address. # macs = "" my_sa = False interface = device if (offset == 14): interfaces, sa, da, my_sa = lisp.lisp_get_input_interface(packet) interface = device if (device in interfaces) else interfaces[0] macs = lisp.lisp_format_macs(sa, da) if (interface.find("vlan") != -1): offset +=4 # # If destination MAC address is multicast, set my_sa. Examine low-order # bit of first byte by grabbing the second nibble and testing low-order # bit after converting to integer. # if (int(da[1], 16) & 1): my_sa = True #endif # # Check for VLAN encapsulation. # if (offset != 0): ethertype = struct.unpack("H", packet[offset-2:offset])[0] ethertype = socket.ntohs(ethertype) if (ethertype == 0x8100): vlan = struct.unpack("I", packet[offset:offset+4])[0] vlan = socket.ntohl(vlan) interface = "vlan" + str(vlan >> 16) offset += 4 elif (ethertype == 0x806): lisp.dprint("Dropping ARP packets, host should have default route") return #endif #endif if (lisp.lisp_l2_overlay): offset = 0 lisp_itr_data_plane(packet[offset::], device, interface, macs, my_sa) return
def lisp_timeout_pubsub(): lisp.lisp_set_exception() # # Return quickly if inject mode is not enabled. # lisp_ms_scale_inject() now = lisp.lisp_get_timestamp() delete_list = [] for e in lisp.lisp_pubsub_cache: for pubsub in lisp.lisp_pubsub_cache[e].values(): ttl = pubsub.ttl * 60 if (pubsub.uptime + ttl > now): continue delete_list.append([e, pubsub.xtr_id]) #endfor #endfor # # Remove entries from delete queue. # for e, xtr_id in delete_list: eid = lisp.green(e, False) lisp.lprint("Pubsub state {} for xtr-id 0x{} has {}".format( eid, lisp.lisp_hex_string(xtr_id), lisp.bold("timed out", False))) # # Remove entry from dictionary array. And explictly free memory. # entry = lisp.lisp_pubsub_cache[e][xtr_id] lisp.lisp_pubsub_cache[e].pop(xtr_id) del (entry) # # If not more subscriptions for this EID-prefix, remove EID-prefix # from parent dictionary array. # if (len(lisp.lisp_pubsub_cache[e]) == 0): lisp.lisp_pubsub_cache.pop(e) #endif #endfor # # Restart periodic timer. # lisp_pubsub_timer = threading.Timer( \ lisp.LISP_PUBSUB_TIMEOUT_CHECK_INTERVAL, lisp_timeout_pubsub, []) lisp_pubsub_timer.start() return
def process_eid_records(record_count, nonce, packet): for i in range(record_count): eid_record = lisp.lisp_eid_record() packet = eid_record.decode(packet) if (packet == None): break print "EID-prefix: {}, ttl: {}, rloc-set:".format( \ eid_record.print_prefix(), eid_record.print_ttl()) if (eid_record.rloc_count == 0): action = lisp.lisp_map_reply_action_string[eid_record.action] action = lisp.bold(action, False) print " Empty, map-reply action: {}".format(action) #endif eid_record.print_record("", False) for j in range(eid_record.rloc_count): rloc_record = lisp.lisp_rloc_record() packet = rloc_record.decode(packet, nonce) if (packet == None): break p = rloc_record.priority mp = rloc_record.mpriority print " RLOC: {}, up/uw/mp/mw: {}/{}/{}/{}, flags: {}{}{}". \ format(rloc_record.rloc.print_address_no_iid(), p, rloc_record. weight, mp, rloc_record.mweight, rloc_record.print_flags(), "" if rloc_record.rloc_name == None else \ ", " + rloc_record.print_rloc_name(), ", RTR" if p == 254 and mp == 255 else "") if (rloc_record.geo): print " geo: {}".format(rloc_record.geo.print_geo()) #endif if (rloc_record.elp): elp = rloc_record.elp.print_elp(False) print " elp: {}".format(elp) #endif if (rloc_record.rle): rle = rloc_record.rle.print_rle(False) print " rle: {}".format(rle) #endif if (rloc_record.json): json = rloc_record.json.print_json(False) print " json: {}".format(json) #endif rloc_record.print_record(" ") #endfor print "" #endfor return
def lisp_itr_process_nonce_ipc(ipc): x, opcode, rloc_str, nonce = ipc.split("%") nonce = int(nonce, 16) echo_nonce = lisp.lisp_get_echo_nonce(None, rloc_str) if (echo_nonce == None): echo_nonce = lisp.lisp_echo_nonce(rloc_str) # # If we are in request-nonce mode, exit it, so we can echo the nonce the # other side is requesting. # if (opcode == "R"): echo_nonce.request_nonce_rcvd = nonce echo_nonce.last_request_nonce_rcvd = lisp.lisp_get_timestamp() echo_nonce.echo_nonce_sent = nonce echo_nonce.last_new_echo_nonce_sent = lisp.lisp_get_timestamp() lisp.lprint("Start echo-nonce mode for {}, nonce 0x{}".format( \ lisp.red(echo_nonce.rloc_str, False), lisp.lisp_hex_string(nonce))) #endif if (opcode == "E"): echo_nonce.echo_nonce_rcvd = nonce echo_nonce.last_echo_nonce_rcvd = lisp.lisp_get_timestamp() if (echo_nonce.request_nonce_sent == nonce): en = lisp.bold("echoed nonce", False) lisp.lprint("Received {} {} from {}".format(en, lisp.lisp_hex_string(nonce), lisp.red(echo_nonce.rloc_str, False))) echo_nonce.request_nonce_sent = None lisp.lprint("Stop request-nonce mode for {}".format( \ lisp.red(echo_nonce.rloc_str, False))) echo_nonce.last_good_echo_nonce_rcvd = lisp.lisp_get_timestamp() else: rns = "none" if (echo_nonce.request_nonce_sent): rns = lisp.lisp_hex_string(echo_nonce.request_nonce_sent) #endif lisp.lprint(("Received echo-nonce 0x{} from {}, but request-" + \ "nonce is {}").format(lisp.lisp_hex_string(nonce), lisp.red(echo_nonce.rloc_str, False), rns)) #endif #endif return
source, rtt)) packet = map_referral.decode(packet) if (packet == None): print("Could not decode Map-Referral packet") continue #endif no_reply = False map_referral.print_map_referral() for i in range(map_referral.record_count): eid_record = lisp.lisp_eid_record() packet = eid_record.decode(packet) if (packet == None): break action = lisp.lisp_map_referral_action_string[eid_record.action] action = lisp.bold(action, False) print("EID-prefix: {}, ttl: {}, referral-type: {}". \ format(eid_record.print_prefix(), eid_record.print_ttl(), action)) eid_record.print_record("", True) ref_select = 0 if (eid_record.rloc_count != 0): print(" Referrals:", end=" ") if (lisp.lisp_debug_logging): print("\n") ref_select = random.randint(0, 255) % eid_record.rloc_count #endif to_ms = eid_record.action in (lisp.LISP_DDT_ACTION_MS_REFERRAL, lisp.LISP_DDT_ACTION_MS_ACK)
def lisp_itr_kernel_filter(sources, dyn_eids): if (os.getenv("LISP_NO_IPTABLES") != None): lisp.lprint("User selected to suppress installing iptables rules") return #endif os.system("sudo iptables -t raw -N lisp") os.system("sudo iptables -t raw -A PREROUTING -j lisp") os.system("sudo ip6tables -t raw -N lisp") os.system("sudo ip6tables -t raw -A PREROUTING -j lisp") # # Have kernel process packets for local addresses when sourced from site # EIDs. We do not want the lisp-itr process to process such packets. # We want the kernel to deliver packets to and from local applications. # And we want the kernel to forward decapsulated packets out interfaces # leading the EIDs. # add = "sudo ip{}tables -t raw -A lisp -j ACCEPT -d {}" addr_set = ["127.0.0.1", "::1", "224.0.0.0/4 -p igmp", "ff00::/8", "fe80::/16"] addr_set += sources + lisp.lisp_get_all_addresses() for addr in addr_set: if (lisp.lisp_is_mac_string(addr)): continue six = "" if addr.find(":") == -1 else "6" os.system(add.format(six, addr)) #endfor # # When source and destination addresses are EIDs for this LISP site, # we want the kernel to do local routing. But as a PITR, we don't want # the kernel to route everything (EID-prefix 0.0.0.0/0) or we can't have # this process encapsulate for any source address to a destination EID. # if (lisp.lisp_pitr == False): add = "sudo ip{}tables -t raw -A lisp -j ACCEPT -s {} -d {}" check = "sudo ip{}tables -t raw -C lisp -j ACCEPT -s {} -d {}" for source in sources: if (lisp.lisp_is_mac_string(source)): continue if (source in dyn_eids): continue six = "" if source.find(":") == -1 else "6" for s in sources: if (lisp.lisp_is_mac_string(s)): continue if (s in dyn_eids): continue if (s.find(".") != -1 and source.find(".") == -1): continue if (s.find(":") != -1 and source.find(":") == -1): continue if (commands.getoutput(check.format(six, source, s)) == ""): continue #endif os.system(add.format(six, source, s)) #endfor #endfor #endif # # Now put in drop rules for each "lisp database-mapping" EID-prefix. # drop = "sudo ip{}tables -t raw -A lisp -j DROP -s {}" for source in sources: if (lisp.lisp_is_mac_string(source)): continue six = "" if source.find(":") == -1 else "6" os.system(drop.format(six, source)) #endif # # Print out rules we just configured. # rules = commands.getoutput("sudo iptables -t raw -S lisp").split("\n") rules += commands.getoutput("sudo ip6tables -t raw -S lisp").split("\n") lisp.lprint("Using kernel filters: {}".format(rules)) # # Check if we need to put in a iptables rule workaround for the virtio TCP # checksum corruption problem for KVM guest OSes. Check environmnt # variable LISP_VIRTIO_BUG. # # Note a debian host system that runs docker will need the following # command so ip6tables works inside of the docker container: # # sudo modprobe ip6table_filter # if (os.getenv("LISP_VIRTIO_BUG") != None): c = ("sudo iptables -A POSTROUTING -t mangle -p tcp -j " + \ "CHECKSUM --checksum-fill; ") c += ("sudo iptables -A POSTROUTING -t mangle -p udp -j " + \ "CHECKSUM --checksum-fill; ") c += ("sudo ip6tables -A POSTROUTING -t mangle -p tcp -j " + \ "CHECKSUM --checksum-fill; ") c += ("sudo ip6tables -A POSTROUTING -t mangle -p udp -j " + \ "CHECKSUM --checksum-fill") os.system(c) virtio = lisp.bold("virtio", False) lisp.lprint("{} bug workaround, configure '{}'".format(virtio, c)) #endif return
def lisp_itr_get_capture_info(): global lisp_pcap_lock lisp.lisp_set_exception() # # Wait for database-mapping commands to execute. We need to retrieve # EID-prefixes we need to listen on. # sources, dyn_eids = lisp_itr_get_local_eid_prefixes() # # If "ipc-data-plane = yes" is configured, we do not need to do any # data-plane forwarding. There is another module running with the # lispers.net control-plane that is doing data-plane forwarding. We'll # get punts via the lispers.net-itr named socket. But we do have to # packet capture RLOC-probe replies. Also capture multicast Map-Register # messages for LISP-Decent. # cp_pfilter = None if (lisp.lisp_ipc_data_plane): lisp.lprint(lisp.bold("Data-plane packet capture disabled", False)) cp_pfilter = "(udp src port 4342 and ip[28] == 0x28)" + \ " or (ip[16] >= 224 and ip[16] < 240 and (ip[28] & 0xf0) == 0x30)" lisp.lprint("Control-plane capture: '{}'".format(cp_pfilter)) else: lisp.lprint("Capturing packets for source-EIDs {}".format( \ lisp.green(str(sources), False))) #endif if (lisp.lisp_pitr): lisp.lprint("Configured for PITR functionality") # # We want the kernel to handle any packets with source AND destination # that matches any EID-prefixes for the site. Any other case, we want # the pcap filters to get the packet to this lisp-itr process. # l2_overlay = lisp.lisp_l2_overlay if (l2_overlay == False): if (lisp.lisp_is_linux()): lisp_itr_kernel_filter(sources, dyn_eids) #endif # # Build packet capture filter so we get packets for configured source EID- # prefixes. # if (cp_pfilter == None): if (lisp.lisp_pitr): pfilter = lisp_itr_build_pcap_filter(sources, [], False, True) else: pfilter = lisp_itr_build_pcap_filter(sources, dyn_eids, l2_overlay, False) #endif else: pfilter = cp_pfilter #endif # # User can select which interfaces to pcap on. # interfaces = lisp_get_active_interfaces() pcap_list = os.getenv("LISP_PCAP_LIST") if (pcap_list == None): us = "" rloc_interfaces = [] else: eid_interfaces = list(set(pcap_list.split()) & set(interfaces)) rloc_interfaces = list(set(pcap_list.split()) ^ set(interfaces)) us = "user-selected " lisp.lprint("User pcap-list: {}, active-interfaces: {}".format( \ pcap_list, interfaces)) interfaces = eid_interfaces #endif # # Start a pcap thread so we can receive packets from applications on this # system. But make sure the device is up on A10 devices. If ethernet MAC # capturing, do not listen on non ethernet interfaces. # mac_capturing = (pfilter.find("ether host") != -1) for device in interfaces: if (device in ["lo", "lispers.net"] and mac_capturing): lisp.lprint(("Capturing suppressed on interface {}, " + \ "MAC filters configured").format(device)) continue #endif args = [device, pfilter, lisp_pcap_lock] lisp.lprint("Capturing packets on {}interface {}".format(us, device)) threading.Thread(target=lisp_itr_pcap_thread, args=args).start() #endfor if (cp_pfilter): return # # Start a pcap thread so we can receive RLOC-probe Map-Replies packets on # RLOC interfaces. This is only called when LISP_PCAP_LIST is set. # probe_pfilter = "(udp src port 4342 and ip[28] == 0x28)" for device in rloc_interfaces: args = [device, probe_pfilter, lisp_pcap_lock] lisp.lprint("Capture RLOC-probe replies on RLOC interface {}".format( \ device)) threading.Thread(target=lisp_itr_pcap_thread, args=args).start() #endfor return
def lisp_ms_scale_inject(): global lisp_inject_mode_count # # Only do it once or never. # if (lisp_inject_mode_count == 0): return count = lisp_inject_mode_count i = lisp.bold("Injecting", False) lisp.fprint("{} {} entries into mapping system for scale testing". \ format(i, count)) # # Create EID-record info. # iid = 1300 phone = 9990000000 eid = lisp.lisp_address(lisp.LISP_AFI_NAME, "ct", 0, iid) group = lisp.lisp_address(lisp.LISP_AFI_NONE, "", 0, 0) parent_site = lisp.lisp_site_eid_lookup(eid, group, False) if (parent_site == None): lisp.fprint("No site found for instance-ID {}".format(iid)) return #endif if (parent_site.accept_more_specifics == False): lisp.fprint("Site must be configured with accept-more-specifics") return #endif # # Create RLOC-record info. # rloc = lisp.lisp_rloc() gps_record = ' "phone" : "{}", "text-interval" : "10", ' + \ '"gps" : "(37.623322,-122.384974579)" ' hs_record = ' "phone" : "{}", "health-state" : "not-tested" ' # # Now loop. # ts = lisp.lisp_get_timestamp() mem = 0 for i in range(1, count + 1): site_eid = lisp.lisp_site_eid(parent_site.site) site_eid.eid = copy.deepcopy(eid) site_eid.eid.address = hmac.new("ct", str(phone), hashlib.sha256).hexdigest() site_eid.dynamic = True site_eid.parent_for_more_specifics = parent_site site_eid.add_cache() site_eid.inherit_from_ams_parent() parent_site.more_specific_registrations.append(site_eid) # # Add GPS and HS RLOC records for EID entry. # gr = copy.deepcopy(rloc) json_string = "{" + gps_record.format(phone) + "}" gr.json = lisp.lisp_json(site_eid.eid.address, json_string) hr = copy.deepcopy(rloc) json_string = "{" + hs_record.format(phone) + "}" hr.json = lisp.lisp_json(site_eid.eid.address, json_string) site_eid.registered_rlocs = [gr, hr] mem += sys.getsizeof(site_eid) # # Print every 100 added. # if (i % 100 == 0): lisp.fprint("Added {} site-eid entries".format(i)) #endif # # Pause after 10000. # if (i % 10000 == 0 and i != count): lisp.fprint("Sleeping for 100ms ...") time.sleep(.1) #endif phone += 1 #endfor # # Compute and print elapsed time. # ts = time.time() - ts if (ts < 60): lisp.fprint("Finished in {} secs, memory {}".format(round(ts, 3), mem)) else: ts = ts / 60 lisp.fprint("Finished in {} mins, memory {}".format(round(ts, 1), mem)) #endif lisp_inject_mode_count = 0
def ii1I(record_count, nonce, packet): if 76 - 76: O0 / o0oOOo0O0Ooo.I1IiiI * Ii1I - OOooOOo for Oooo in range(record_count): O00o = lisp.lisp_eid_record() packet = O00o.decode(packet) if (packet == None): break print "EID-prefix: {}, ttl: {}, rloc-set:".format( O00o.print_prefix(), O00o.print_ttl()) if 61 - 61: iII111i.iIii1I11I1II1 * I1IiiI.ooOoO0o % Oo0Ooo if 72 - 72: OOooOOo if (O00o.rloc_count == 0): o0Oo00OOOOO = lisp.lisp_map_reply_action_string[O00o.action] o0Oo00OOOOO = lisp.bold(o0Oo00OOOOO, False) print " Empty, map-reply action: {}".format(o0Oo00OOOOO) if 85 - 85: ooOoO0o.iII111i - OoO0O00 % ooOoO0o % II111iiii if 81 - 81: OoO0O00 + II111iiii % iII111i * O0 O00o.print_record("", False) for oOOo0oo in range(O00o.rloc_count): o0oo0o0O00OO = lisp.lisp_rloc_record() packet = o0oo0o0O00OO.decode(packet, nonce) if (packet == None): break o0oO = o0oo0o0O00OO.priority I1i1iii = o0oo0o0O00OO.mpriority print " RLOC: {}, up/uw/mp/mw: {}/{}/{}/{}, flags: {}{}{}".format( o0oo0o0O00OO.rloc.print_address_no_iid(), o0oO, o0oo0o0O00OO. # o0oOOo0O0Ooo . Ii1I weight, I1i1iii, o0oo0o0O00OO.mweight, o0oo0o0O00OO.print_flags(), "" if o0oo0o0O00OO.rloc_name == None else ", " + o0oo0o0O00OO.print_rloc_name(), # OoOoOO00 / I11i ", RTR" if o0oO == 254 and I1i1iii == 255 else "") if 98 - 98: iIii1I11I1II1 / i1IIi / i11iIiiIii / o0oOOo0O0Ooo if (o0oo0o0O00OO.geo): print " geo: {}".format(o0oo0o0O00OO.geo.print_geo()) if 28 - 28: OOooOOo - IiII.IiII + OoOoOO00 - OoooooooOO + O0 if (o0oo0o0O00OO.elp): oOoOooOo0o0 = o0oo0o0O00OO.elp.print_elp(False) print " elp: {}".format(oOoOooOo0o0) if 61 - 61: o0oOOo0O0Ooo / OoO0O00 + ooOoO0o * oO0o / oO0o if (o0oo0o0O00OO.rle): OoOo = o0oo0o0O00OO.rle.print_rle(False) print " rle: {}".format(OoOo) if 18 - 18: i11iIiiIii if (o0oo0o0O00OO.json): Ii11I = o0oo0o0O00OO.json.print_json(False) print " json: {}".format(Ii11I) if 69 - 69: oO0o % I1Ii111 - o0oOOo0O0Ooo + I1Ii111 - O0 % OoooooooOO o0oo0o0O00OO.print_record(" ") if 31 - 31: II111iiii - OOooOOo.I1Ii111 % OoOoOO00 - O0 print "" if 4 - 4: II111iiii / ooOoO0o.iII111i return if 58 - 58: OOooOOo * i11iIiiIii / OoOoOO00 % I1Ii111 - I1ii11iIi11i / oO0o if 50 - 50: I1IiiI if 34 - 34: I1IiiI * II111iiii % iII111i * OoOoOO00 - I1IiiI if 33 - 33: o0oOOo0O0Ooo + OOooOOo * OoO0O00 - Oo0Ooo / oO0o % Ii1I if 21 - 21: OoO0O00 * iIii1I11I1II1 % oO0o * i1IIi
OoOOoOooooOOo, II1IIIIiII1i)) iI11Ii = III1Iiii1I11.decode(iI11Ii) if (iI11Ii == None): print("Could not decode Map-Referral packet") continue if 1 - 1: II111iiii II1 = False III1Iiii1I11.print_map_referral() if 68 - 68: iII111i - I1IiiI / I1Ii111 / I11i for I11iiii in range(III1Iiii1I11.record_count): O0i1iI = lisp.lisp_eid_record() iI11Ii = O0i1iI.decode(iI11Ii) if (iI11Ii == None): break if 29 - 29: I1IiiI % OOooOOo - I1IiiI / OOooOOo.i1IIi i11III1111iIi = lisp.lisp_map_referral_action_string[O0i1iI.action] i11III1111iIi = lisp.bold(i11III1111iIi, False) if 38 - 38: iII111i + I11i / I1Ii111 % ooOoO0o - I1ii11iIi11i print("EID-prefix: {}, ttl: {}, referral-type: {}".format( O0i1iI.print_prefix(), O0i1iI.print_ttl(), i11III1111iIi)) if 14 - 14: oO0o / I1Ii111 if 85 - 85: I11i O0i1iI.print_record("", True) if 20 - 20: oO0o % IiII III1i1i11i = 0 if (O0i1iI.rloc_count != 0): print(" Referrals:", end=" ") if (lisp.lisp_debug_logging): print("\n") III1i1i11i = random.randint(0, 255) % O0i1iI.rloc_count if 100 - 100: oO0o / I1Ii111 / I1ii11iIi11i if 78 - 78: Oo0Ooo - o0oOOo0O0Ooo / OoOoOO00 ii111iI1iIi1 = O0i1iI.action in (lisp.LISP_DDT_ACTION_MS_REFERRAL,
II, Ii1Iii1iIi) III1Iiii1I11 = o00O0OoO.decode(III1Iiii1I11) if (III1Iiii1I11 == None): print "Could not decode Map-Referral packet" continue if 82 - 82: I1ii11iIi11i / I1IiiI % iIii1I11I1II1 / i1IIi - I1IiiI iiIi1IIi1I = False o00O0OoO.print_map_referral() if 7 - 7: I1Ii111 * OoO0O00 - ooOoO0o + OOooOOo * I1IiiI % OoO0O00 for iI1i111I1Ii in range(o00O0OoO.record_count): i11i1ii1I = lisp.lisp_eid_record() III1Iiii1I11 = i11i1ii1I.decode(III1Iiii1I11) if (III1Iiii1I11 == None): break if 88 - 88: I11i % I1ii11iIi11i I1i11 = lisp.lisp_map_referral_action_string[i11i1ii1I.action] I1i11 = lisp.bold(I1i11, False) if 12 - 12: i1IIi + i1IIi - I1ii11iIi11i * Oo0Ooo % Oo0Ooo - II111iiii print "EID-prefix: {}, ttl: {}, referral-type: {}".format( i11i1ii1I.print_prefix(), i11i1ii1I.print_ttl(), I1i11) if 52 - 52: ooOoO0o.iII111i + I1Ii111 if 38 - 38: i1IIi - II111iiii.I1Ii111 i11i1ii1I.print_record("", True) if 58 - 58: I1IiiI.iII111i + OoOoOO00 O00OO = 0 if (i11i1ii1I.rloc_count != 0): print " Referrals:", if (lisp.lisp_debug_logging): print "\n" O00OO = random.randint(0, 255) % i11i1ii1I.rloc_count if 17 - 17: I11i / I1Ii111 + oO0o - i11iIiiIii.iII111i if 95 - 95: OoO0O00 % i1IIi * i11iIiiIii % Oo0Ooo - oO0o ii1Ii11I = i11i1ii1I.action in (lisp.LISP_DDT_ACTION_MS_REFERRAL,