Ticket #136 (closed defect: fixed)

Opened 4 months ago

Last modified 4 months ago

scapy 2.0.0.9 doesn't work on freebsd

Reported by: antoine Assigned to: pbi
Priority: major Milestone:
Component: Scapy Version: 2.0.0.x
Keywords: Cc:

Description

# scapy
INFO: Can't import python gnuplot wrapper . Won't be able to plot.
INFO: Can't import PyX. Won't be able to use psdump() or pdfdump().
Traceback (most recent call last):
  File "/usr/local/bin/scapy", line 25, in <module>
    interact()
  File "/usr/local/lib/python2.5/site-packages/scapy/main.py", line 245, in interact
    scapy_builtins = __import__("all",globals(),locals(),".").__dict__
  File "/usr/local/lib/python2.5/site-packages/scapy/all.py", line 24, in <module>
    from route6 import *
  File "/usr/local/lib/python2.5/site-packages/scapy/route6.py", line 264, in <module>
    conf.route6 = Route6()
  File "/usr/local/lib/python2.5/site-packages/scapy/route6.py", line 26, in __init__
    self.resync()
  File "/usr/local/lib/python2.5/site-packages/scapy/route6.py", line 39, in resync
    self.routes = read_routes6()
  File "/usr/local/lib/python2.5/site-packages/scapy/arch/unix.py", line 155, in read_routes6
    if NETBSD or OPENBSD:
NameError: global name 'NETBSD' is not defined

Patch:

diff -r aa1057c6339a scapy/arch/unix.py
--- a/scapy/arch/unix.py        Fri Sep 12 18:24:40 2008 +0200
+++ b/scapy/arch/unix.py        Sat Sep 13 13:09:18 2008 +0200
@@ -152,7 +152,7 @@
             ok = l.find('Destination')
             continue
         # gv 12/12/06: under debugging      
-        if NETBSD or OPENBSD:
+        if scapy.arch.NETBSD or scapy.arch.OPENBSD:
             d,nh,fl,_,_,_,dev = l.split()[:7]
         else:       # FREEBSD or DARWIN 
             d,nh,fl,dev = l.split()[:4]

Attachments

Change History

09/13/08 13:53:01 changed by pbi

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in [206506ed34db]


Add/Change #136 (scapy 2.0.0.9 doesn't work on freebsd)




Change Properties
Action