Commit graph

6 commits

Author SHA1 Message Date
Lutz Donnerhacke
053937ce6e tests/netgraph: Tests for ng_vlan_rotate
Test functionality of ng_vlan_rotate(4):
 - Rotate 1 to 9 stagged vlans in any possible direction and length
 - Rotate random combinations of ethertypes (8100, 88a8, 9100)
 - Automatic reverse rotating for backward data flow
 - Test too many and too few vlans

Reviewed by:	kp (earlier version)
Differential Revision: https://reviews.freebsd.org/D30670

(cherry picked from commit 6b08e68be1)
2021-06-16 13:25:04 +02:00
Lutz Donnerhacke
7d243608d5 tests/netgraph: Tests for ng_hub
Test functionality of ng_hub(4):
 - replicting traffic to anything but the sending hook
 - persistence
 - an unrestricted loop
 - implementation limits with many hooks.

Reviewed by:	kp
Differential Revision: https://reviews.freebsd.org/D30633

(cherry picked from commit 7863faa78a)
2021-06-16 13:25:01 +02:00
Lutz Donnerhacke
1b379f5858 tests/netgraph: Tests for ng_bridge
Test functionality of ng_bridge(4):
 - replicating traffic to anything but the sending hook
 - persistence
 - detect loops
 - unicast to only one link of many
 - stretch to implementation limits on broadcast

Reviewed by:	kp
Differential Revision: https://reviews.freebsd.org/D30647
Differential Revision: https://reviews.freebsd.org/D30699

(cherry picked from commit 6181470239)
(cherry picked from commit 5554abd9cc)
2021-06-15 14:38:49 +02:00
Lutz Donnerhacke
36c7408818 tests/netgraph: Inital framework for testing libnetgraph
Provide a framework of functions to test various netgraph modules.
Tests contain:
 - creating, renaming, and destroying nodes
 - connecting and removing hooks
 - sending and receiving data
 - sending ASCII messages and receiving binary responses
 - errors can be passed for indiviual inspection or fail the test

Reviewed by:	kp
Differential Revision: https://reviews.freebsd.org/D30629
Differential Revision: https://reviews.freebsd.org/D30657
Differential Revision: https://reviews.freebsd.org/D30671
Differential Revision: https://reviews.freebsd.org/D30699

(cherry picked from commit 24ea1dbf25)
(cherry picked from commit 09307dbfb8)
(cherry picked from commit 9021c46603)
(cherry picked from commit 5554abd9cc)

Also contains some fixups:
 - indent all files correctly
 - finish factoring out
 - remove debugging code
 - check for renaming issues reported in PR241954

PR:	241954
Differential Revision: https://reviews.freebsd.org/D30692
Differential Revision: https://reviews.freebsd.org/D30714
Differential Revision: https://reviews.freebsd.org/D30713

(cherry picked from commit a664ade939)
(cherry picked from commit 0afa9be039)
(cherry picked from commit 43e4821315)
2021-06-15 14:31:32 +02:00
Alex Richardson
760cf46f3e tests/sys/netgraph: Tell kyua that perl is required
Otherwise these tests fail with incomprehensible error messages.

Reviewed By:	kp
Differential Revision: https://reviews.freebsd.org/D28894

(cherry picked from commit 3775ddcf5a)
2021-03-17 22:22:49 +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