Commit Graph

11 Commits

Author SHA1 Message Date
06046cd51a Allow TAP instances to be interfaces
- Cannot have LCP, Address or Sub-Interface
- Cannot be PHY
- Cannot be Bond member
- Can be target of L2XC
- Can be member of Bridge
- interface.mtu must be the same as tap.host.mtu

Add YAML tests for common mistakes. This unblocks taps becoming members
of a bridgedomain, and allowing a very cool feature: slowpath networking!
2022-04-10 16:10:19 +00:00
5fc3b4c42b Correct the returnvalue of get_parent_by_name() if ifname==None, add tests for that 2022-04-10 15:48:34 +00:00
be36cc0ede Allow BondEthernet to set MAC, and disallow interfaces to set their MAC if they are a bond member 2022-04-09 21:18:26 +00:00
92a20d0755 Add a few MAC checks
Notably mac.is_multicast() which is needed for TAPs / LCPs and
interfaces.

Add a test for interface MAC addresses being non-multicast.
2022-04-09 15:15:00 +00:00
b461ef49bb Add 'state' field to interfaces and sub-interfaces
Assert that children cannot be 'up' of their parent is 'down'. Add tests. Update user-guide.
2022-04-05 11:06:33 +00:00
2642e94dea Assert that sub-ints with addresses must have exact-match set 2022-04-03 12:48:09 +00:00
d30f2d8965 Relax the LCP requirements - it is OK to have an address without an LCP 2022-04-03 09:04:11 +00:00
850b982f2a First part of a BVI refactor
The handling of BVI is awkward, with the autoderived interface name
"bviXX" based on the bridgedomain bd_id. Lots of special casing happens
on account of this decision, and to make matters worse there is poor
interaction (leading to VPP crashes) when BVIs and Loopbacks are used
at the same time: https://lists.fd.io/g/vpp-dev/message/21116

This is step one of a refactor of the logic. In this commit, I'm
removing all of the BVI logic from the codebase, rendering bridgedomains
unable to have IP interfaces. In the next commit, I will introduce new
behavior in the schema, allowing for 'bvi' to be a loopback
interfacename which will be used as BVI for a bridgedomain, restoring
the ability to use bridgedomains with IP interfaces (using a loop).
2022-03-27 20:09:22 +00:00
7bb9fa5ac8 Assert that a QinX cannot have higher MTU than its intermediate interface 2022-03-26 17:18:10 +00:00
de9ed1730d Add get_by_lcp_name() plus tests. Correct behavior of sub-ints without explicit encap: they are exact-match 2022-03-24 20:14:06 +00:00
672dd65f11 Rename validator/ to config/ 2022-03-24 13:56:04 +00:00