Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interface names must start with tun or tap on BSD and Darwin #4049

Open
mbUSC opened this issue Jun 28, 2023 · 3 comments · May be fixed by #4100
Open

Interface names must start with tun or tap on BSD and Darwin #4049

mbUSC opened this issue Jun 28, 2023 · 3 comments · May be fixed by #4100
Labels

Comments

@mbUSC
Copy link

mbUSC commented Jun 28, 2023

Brief description

The tun interfaces on my Mac are all named "utun0", "utun1", etc.
How can I make scapy work with that?

Scapy version

2.5

Python version

3.10

Operating system

MacOS Ventura

Additional environment information

No response

How to reproduce

from scapy.layers.tuntap import TunTapInterface

if __name__ == "__main__":
    t = TunTapInterface("utun3", mode_tun=True)

Actual result

ValueError: Interface names must start with tun or tap on BSD and Darwin

Expected result

No error

Related resources

No response

@guedou
Copy link
Member

guedou commented Jun 28, 2023 via email

@mbUSC
Copy link
Author

mbUSC commented Jun 29, 2023

@guedou I looked at the code today. Unfortunately it's not just a naming issue; the socket type and ioctl are different. I'll give it a try later this summer. Any suggestions are welcome :)

@gpotter2 gpotter2 added the bug label Jul 7, 2023
@mbUSC mbUSC linked a pull request Aug 21, 2023 that will close this issue
@mbUSC
Copy link
Author

mbUSC commented Aug 21, 2023

Hi @guedou,

Sorry about the radio silence.
I got it to work a month ago, but then had a bunch of stuff come up, so I forgot about it.

I opened a draft pull request with the changes that I made.

There is still a lot of work to be done before it can be merged (adding tests, refactoring, etc.).
Unfortunately, I have zero time at the moment; I hope that someone can take it over 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants