Hi all

Now I'm using the nox 0.9.0 compiled Aug 25.

Under the specific condition, sorry I didn't narrow down it,
set_match() method which is defined at src/nox/lib.util.py says
"Invalid ethernet addr".
This is occured by the fail of create_eaddr(), which is called by
convert_to_eaddr(), because of invalid argument.

The main reason of it seems like following, that is reported before.
http://noxrepo.org/pipermail/nox-dev/2010-August/006373.html

And I send a patch which one of a method to address.
Thank you.

===

diff --git a/src/nox/lib/util.py b/src/nox/lib/util.py
index 076d419..080a66d 100644
--- a/src/nox/lib/util.py
+++ b/src/nox/lib/util.py
@@ -34,6 +34,7 @@ from   nox.lib.packet.ipv4 import ipv4
 from   nox.lib.packet.udp import udp
 from   nox.lib.packet.tcp import tcp
 from   nox.lib.packet.icmp import icmp
+from   nox.lib.packet.packet_utils import mac_to_str

 from twisted.python import log

@@ -74,7 +75,7 @@ def convert_to_eaddr(val):
     if isinstance(val, ethernetaddr):
         return val
     if isinstance(val, array.array):
-        val = val.tostring()
+        val = mac_to_str(val)
     if isinstance(val, str) and not (':' in val):
         if len(val) < ethernetaddr.LEN:
             return None
_______________________________________________
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev

Reply via email to