Commit Graph

4 Commits

Author SHA1 Message Date
Alex Richardson
6f30d1c851 ng_macfilter_test: Skip rather than fail if there is no network
This should bring the number of Jenkins failures from 4 down to 3.
Locally kyua now prints `skipped: could not find a valid interface  [0.115s]`
when I run it in QEMU without a network device.

Reviewed By:	lwhsu
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D29414
2021-03-25 11:16:12 +00:00
Alex Richardson
7dd1f932c1 tests/sys/netgraph: Further CI fixes
I was trying to debug why this test is working locally but failing in CI.
While doing so I made some small changes to allow running it with set -e.

It turns out the problem is that find_iface does not return anything in
Jenkins, so all following tests fail with obscure error messages.
To handle this case exit early if $eth is empty.

Reviewed By:	lwhsu
Differential Revision: https://reviews.freebsd.org/D29340
2021-03-19 18:34:30 +00:00
Alex Richardson
65f4ff4e68 tests/sys/netgraph/ng_macfilter_test: Fix invalid TAP output
This should allow the test to pass in Jenkins. Testing it locally now
reports "passed" instead of "invalid TAP data".

While touching this file also fix some shellcheck warnings that were
pointed out by my IDE.

Reviewed By:	lwhsu, afedorov
Differential Revision: https://reviews.freebsd.org/D29054
2021-03-12 17:35:26 +00:00
Nick Hibma
e8db04c389 New Netgraph module ng_macfilter:
Macfilter to route packets through different hooks based on sender MAC address.

Based on ng_macfilter written by Pekka Nikander

Sponsered by Retina b.v.

Reviewed by:	afedorov
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D27268
2020-12-08 15:09:42 +00:00