Skip to content
Snippets Groups Projects
Commit ab592d64 authored by Phil's avatar Phil
Browse files

Improved SourceIPField mangement of set of IP

parent 43843b26
No related branches found
No related tags found
No related merge requests found
......@@ -230,11 +230,9 @@ class SourceIPField(IPField):
if isinstance(dst,Gen):
r = map(conf.route.route, dst)
r.sort()
if r[0] == r[-1]:
x=r[0][1]
else:
if r[0] != r[-1]:
warning("More than one possible route for %s"%repr(dst))
return None
iff,x,gw = r[0]
else:
iff,x,gw = conf.route.route(dst)
return IPField.i2h(self, pkt, x)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment