diff --git a/scapy/fields.py b/scapy/fields.py index 280c1b3c21c88db0a14134459c8d85351d648971..4e771da13184df3b9ecddff9c0dcc86461072089 100644 --- a/scapy/fields.py +++ b/scapy/fields.py @@ -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)