Ticket #157 (closed defect: fixed)

Opened 2 months ago

Last modified 2 weeks ago

route6.py on linux without IPv6 support

Reported by: antonio.bardazzi@gmail.com Assigned to: pbi
Priority: low Milestone:
Component: Scapy Version: 2.0.0.x
Keywords: Cc:

Description

Scapy 2.0.0.10 beta. Linux 2.6.24-gentoo-r3 without IPv6 support.

I use ~/.scapy_prestart.py to remove inet6 and dhcp6 but route6 is imported by all.py.

On my system read_routes6() raise socket.error: can't use AF_INET6, IPv6 is disabled

Attached the whole traceback.

I patch route6.py function resync: try: self.routes = read_routes6() except socket.error: self.routes = []

Attachments

scapy_linux_woutipv6_traceback.txt (1.1 kB) - added by antonio.bardazzi@gmail.com on 11/11/08 17:30:23.
traceback

Change History

11/11/08 17:30:23 changed by antonio.bardazzi@gmail.com

  • attachment scapy_linux_woutipv6_traceback.txt added.

traceback

11/11/08 18:27:11 changed by antonio.bardazzi@gmail.com

I patch also layers/inet6 function init: try: self.net = inet_pton(socket.AF_INET6, tmp[0]) except socket.error: self.net = False

11/11/08 18:54:14 changed by antonio.bardazzi@gmail.com

I prefer to use socket.has_ipv6:

layers/inet6.py

        self.net = False                                                                                                                                      
        if socket.has_ipv6:                                                                                                                                   
            self.net = inet_pton(socket.AF_INET6, tmp[0])                                                                                                     

route6.py

    self.routes = []                                                                                                                                          
    if socket.has_ipv6:                                                                                                                                       
        self.routes = read_routes6()                                                                                                                          

12/22/08 10:24:15 changed by pbi

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

Fixed in [1187384cfa85]


Add/Change #157 (route6.py on linux without IPv6 support)




Change Properties
Action