Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

host_tracker doesn't raise events when it learns IP addresses #130

Open
nemethf opened this issue Nov 11, 2014 · 0 comments
Open

host_tracker doesn't raise events when it learns IP addresses #130

nemethf opened this issue Nov 11, 2014 · 0 comments

Comments

@nemethf
Copy link
Contributor

nemethf commented Nov 11, 2014

If host_tracker receives a packet_in from an unknown host, it raises an event without the host's IP address. The packet_in handler will eventually call updateIPInfo, but that method won't raise a new event. If (dpid,inport,packet.src) never changes, host_tracker listeners will never learn the host's IP address.

I don't think this is a really serious issue because other pox components don't seem to need IP addresses, but external modules (like the one i'm currently writing) might like to use this information.

The correct fix is probably more complex, but here is a one-line-long workaround:

diff --git a/pox/host_tracker/host_tracker.py b/pox/host_tracker/host_tracker.py
index f7fd60c..87dad77 100644
--- a/pox/host_tracker/host_tracker.py
+++ b/pox/host_tracker/host_tracker.py
@@ -309,6 +309,7 @@ class host_tracker (EventMixin):
       ipEntry = IpEntry(hasARP)
       macEntry.ipAddrs[pckt_srcip] = ipEntry
       log.info("Learned %s got IP %s", str(macEntry), str(pckt_srcip) )
+      self.raiseEventNoErrors(HostEvent, macEntry, move=True)
     if hasARP:
       ipEntry.pings.received()

(I think this issue is independent of #125)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant