scapy icon indicating copy to clipboard operation
scapy copied to clipboard

Reading IPv6 routes is broken on OpenBSD

Open gpotter2 opened this issue 1 year ago • 0 comments

Scapy sees:

>>> conf.route6
Destination  Next Hop  Iface  Src candidates  Metric
::1/128      ::        lo0    ::1             1
fe80::1/128  ::        lo0    ::1             1

when in reality:

host# netstat -f inet6 -rn
Routing tables

Internet6:
Destination                                 Gateway                                 Flags   Refs      Use   Mtu  Prio Iface
::/96                                       ::1                                     UGRS       0        0 32768     8 lo0
::1                                         ::1                                     UHhl      10       20 32768     1 lo0
::ffff:0.0.0.0/96                           ::1                                     UGRS       0        0 32768     8 lo0
2002::/24                                   ::1                                     UGRS       0        0 32768     8 lo0
2002:7f00::/24                              ::1                                     UGRS       0        0 32768     8 lo0
2002:e000::/20                              ::1                                     UGRS       0        0 32768     8 lo0
2002:ff00::/24                              ::1                                     UGRS       0        0 32768     8 lo0
fe80::/10                                   ::1                                     UGRS       0        4 32768     8 lo0
fec0::/10                                   ::1                                     UGRS       0        0 32768     8 lo0
fe80::1%lo0                                 fe80::1%lo0                             UHl        0        0 32768     1 lo0
ff01::/16                                   ::1                                     UGRS       0        0 32768     8 lo0
ff01::%lo0/32                               fe80::1%lo0                             Um         0        1 32768     4 lo0
ff02::/16                                   ::1                                     UGRS       0        0 32768     8 lo0
ff02::%lo0/32                               fe80::1%lo0                             Um         0        1 32768     4 lo0

We wrongly parse the output of ifconfig on OpenBSD. I hate this crap calling 'subprocess' and hoping the output of ifconfig doesn't change. See https://github.com/secdev/scapy/pull/4497

gpotter2 avatar Aug 10 '24 12:08 gpotter2