Commit Graph

7 Commits

Author SHA1 Message Date
Evgeny Vereshchagin 79974f22ee
tests: filter out non-ICMP packets in the tun test (#4543)
When systemd-resolved with its LLMNR/mDNS responders enabled is run it
starts sending its probes as soon as the tun interface pops up:
```
00:36:36.643708 IP c > igmp.mcast.net: igmp v3 report, 2 group record(s)
00:36:36.644530 IP c.mdns > mdns.mcast.net.mdns: 0 [1n] ANY (QM)? c.local. (44)
00:36:36.645307 IP c.llmnr > 224.0.0.252.llmnr: UDP, length 22
```
and that interferes with the test. Since the test is interested in
ICMP packets only it can safely skip everything else.

Fixes:
```
 #(006)=[failed] Send ping packets from Linux into Scapy
 ...
 assert len(icmp4_sequences) == 3
 AssertionError
```
2024-10-01 10:06:54 +02:00
gpotter2 528626a02c
Rewrite arch/bpf (#4497)
* Rewrite arch/bpf

* Adapt for NetBSD

* Adapt for Darwin

* Cleanup VEthPair test

* Cleanup get_if_raw_hwaddr where not useful

* Test on all BSDs

* Some tests only work on Little endian machines
2024-09-02 21:36:04 +02:00
gpotter2 ee6bd918e4 Casual reminder that needs_root!=netaccess 2021-09-11 22:42:00 +02:00
gpotter2 1de3e84968 Support NetworkInterface for tuntap 2021-08-24 11:36:07 +02:00
gpotter2 11832deee0
Travis cleanup / TunTap fixes / Mypy 3.9 (#3182)
* Use 3.9 for Mypy

* Improve tuntap tests - Fix
2021-04-24 14:23:39 +02:00
Nils Weiss 99a1af8521
Cleanup some automaton tests (timeouts in join, wait...) (#3082) 2021-02-08 17:08:41 +01:00
Michael Farrell e2e0fdf4a0 Migrate tuntap into own module, and fix bugs: (v6)
* Adds ICMPEcho_am for responding for pings (simple test program)

* BitField size param may be callable

* Fixed tun on non-Linux platforms

* Tested on Linux and macOS 10.14 (though Travis CI doesn't work well with
  loading your own kexts -- so it's disabled in tests)

* Added documentation and tests for TunTap

* Tag tests as `tap` or `tun` rather than `linux`, and don't run them on
  Windows or Solaris for now

* Optionally expose Linux-specific TUN headers (disabled by default)

* Should work on big-endian Linux now too (not tested)
2020-11-14 01:07:23 +01:00