From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH] auto-t: update scapy imports for newer version
Date: Thu, 6 Mar 2025 10:20:21 -0800 [thread overview]
Message-ID: <20250306182021.328131-1-prestwoj@gmail.com> (raw)
Something changed between scapy versions and now the modules
being imported don't exist.
---
autotests/testFrameFuzzing/fake_ap.py | 3 ++-
autotests/util/hwsim.py | 9 +++++----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/autotests/testFrameFuzzing/fake_ap.py b/autotests/testFrameFuzzing/fake_ap.py
index 8ee369de..ddfe2afa 100644
--- a/autotests/testFrameFuzzing/fake_ap.py
+++ b/autotests/testFrameFuzzing/fake_ap.py
@@ -3,7 +3,8 @@ import sys
import sys
import os
from scapy.layers.dot11 import *
-from scapy.arch import str2mac, get_if_raw_hwaddr
+from scapy.arch import str2mac
+from scapy.arch.unix import get_if_raw_hwaddr
from time import time, sleep
from threading import Thread
diff --git a/autotests/util/hwsim.py b/autotests/util/hwsim.py
index 5456d30b..8da01311 100755
--- a/autotests/util/hwsim.py
+++ b/autotests/util/hwsim.py
@@ -7,7 +7,7 @@ from weakref import WeakValueDictionary
from abc import ABCMeta, abstractmethod
from enum import Enum
from scapy.all import *
-from scapy.contrib.wpa_eapol import WPA_key
+from scapy.layers.eap import EAPOL_KEY
import iwd
from config import ctx
@@ -444,9 +444,10 @@ class Hwsim(iwd.AsyncOpAbstract):
# NOTE: Expected key_info is 0x008a, with the install flag
# this becomes 0x00ca.
- eapol = WPA_key( descriptor_type = 2,
- key_info = 0x00ca, # Includes an invalid install flag!
- replay_counter = struct.pack(">Q", 100))
+ eapol = EAPOL_KEY( key_descriptor_type = 2,
+ install = 1,
+ key_ack = 1,
+ key_replay_counter = 1)
frame /= LLC()/SNAP()/EAPOL(version="802.1X-2004", type="EAPOL-Key")
frame /= eapol
--
2.34.1
reply other threads:[~2025-03-06 18:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250306182021.328131-1-prestwoj@gmail.com \
--to=prestwoj@gmail.com \
--cc=iwd@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox