diff --git a/scapy.py b/scapy.py index 3f6700497..b5a59a6ed 100755 --- a/scapy.py +++ b/scapy.py @@ -21,6 +21,10 @@ # # $Log: scapy.py,v $ +# Revision 0.9.17.61 2005/03/23 18:27:06 pbi +# - used init_cookie for ISAKMP.answers() +# - raised an exception in route.make_route if parameters are incomplete +# # Revision 0.9.17.60 2005/03/23 17:07:56 pbi # - fixed session loading with -s # - prevented save_session() to trash current session @@ -651,7 +655,7 @@ from __future__ import generators -RCSID="$Id: scapy.py,v 0.9.17.60 2005/03/23 17:07:56 pbi Exp $" +RCSID="$Id: scapy.py,v 0.9.17.61 2005/03/23 18:27:06 pbi Exp $" VERSION = RCSID.split()[2]+"beta" @@ -1120,6 +1124,8 @@ class Route: elif net is not None: thenet,msk = net.split("/") msk = int(msk) + else: + raise Exception("make_route: Incorrect parameters. You should specify a host or a net") if gw is None: gw="0.0.0.0" if dev is None: @@ -1128,12 +1134,15 @@ class Route: else: nhop = thenet dev,ifaddr,x = self.route(nhop) - else: + else: ifreq = ioctl(s, SIOCGIFADDR,struct.pack("16s16x",dev)) ifaddr = socket.inet_ntoa(ifreq[20:24]) return (atol(thenet),(1L<