Generalize the existing IsolatedMacVlan class to support creating namespaces with multiple ports
Provide a Two-Port MAC Relay (TPMR) as an example implementation, which by default just relays frames between two ports, but can dynamically be set to block frames from passing through it. This is useful to test fail-over behavior of various protocols
Add a test of BFD fail-over in combination with OSPF, using the new TPMR device
In order for the TPMR to act as a bridge, the mode of the MACVLANs has been changed to passthru, which allows it to receive all packets from its lower interface, and also lets it transmit unicast packets with any SA without triggering the kernel's spoof protection logic. This also enables us to use the parent interface's promiscuity value as an indicator for when a MACVLAN has been fully removed in the kernel, which should be more reliable than the old time.sleep(.5).
Close #261
Checklist
Tick relevant boxes, this PR is-a or has-a:
[ ] Bugfix
[ ] Regression tests
[ ] ChangeLog updates (for next release)
[ ] Feature
[ ] YANG model change => revision updated?
[ ] Regression tests added?
[ ] ChangeLog updates (for next release)
[ ] Documentation added?
[x] Test changes
[x] Checked in changed Readme.adoc (make test-spec)
[x] Added new test to group Readme.adoc and yaml file
[ ] Code style update (formatting, renaming)
[ ] Refactoring (please detail in commit messages)
Description
IsolatedMacVlan
class to support creating namespaces with multiple portsIn order for the TPMR to act as a bridge, the mode of the MACVLANs has been changed to
passthru
, which allows it to receive all packets from its lower interface, and also lets it transmit unicast packets with any SA without triggering the kernel's spoof protection logic. This also enables us to use the parent interface'spromiscuity
value as an indicator for when a MACVLAN has been fully removed in the kernel, which should be more reliable than the oldtime.sleep(.5)
.Close #261
Checklist
Tick relevant boxes, this PR is-a or has-a: