Commit baf08e88 authored by Jonathon Duerig's avatar Jonathon Duerig
Browse files

Added a fix which ignores writes to unknown addresses (like the loopback interface).

parent 3cbcd135
...@@ -145,7 +145,10 @@ def get_next_packet(): ...@@ -145,7 +145,10 @@ def get_next_packet():
if not size_given: if not size_given:
size = 0 size = 0
total_size = total_size + size total_size = total_size + size
return (ipaddr, localport, remoteport, time, size, event_code) if emulated_to_real.has_key(ipaddr):
return (ipaddr, localport, remoteport, time, size, event_code)
else:
return None
elif ((netmon_output_version == 2) and cmatch): elif ((netmon_output_version == 2) and cmatch):
# #
# Watch for new or closed connections # Watch for new or closed connections
...@@ -167,7 +170,10 @@ def get_next_packet(): ...@@ -167,7 +170,10 @@ def get_next_packet():
sys.stdout.write('Packet send buffer was set to: ' + str(value) + '\n') sys.stdout.write('Packet send buffer was set to: ' + str(value) + '\n')
else: else:
return None return None
return (ipaddr, localport, remoteport, 0, value, event_code) if emulated_to_real.has_key(ipaddr):
return (ipaddr, localport, remoteport, 0, value, event_code)
else:
return None
else: else:
sys.stdout.write('skipped line in the wrong format: ' + line) sys.stdout.write('skipped line in the wrong format: ' + line)
return None return None
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment