A list bound to a VLAN interface is evaluated, in both directions (#1517) #1612
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!1612
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/1116-0540"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
interface Gi0/0.10+encapsulation dot1q 10is this console's VLAN interface: the interface the box terminates and routes VLAN 10 at.ip access-group 101 inwas accepted there,running-configprinted the binding back inside the subinterface's block, and the forwarding path only ever asked the physical port for a policy - so the list was respected by every surface an operator reads and evaluated by nothing.It failed open: a lab that binds a policy to a VLAN interface and then checks that the VLAN is isolated passes while the isolation does nothing. Same for
out.What changed
engine/simulator.js_aclBound(dev, iface, dir)- is there a policy here at all, asked before evaluating so a caller can decide which interface to consult without paying for a lookup that always permits._vlanIfaceName(dev, ifaceName, vid)- the VLAN interface a frame arriving invidonifaceNameis handled by, i.e. the subinterface whoseencapVidis that VLAN._processFrame): the port'sinlist is still asked first, then the VLAN interface'sinlist. A denial is attributed to the interface that denied it._emitFrame): theoutlist is looked up on the subinterface when one is bound, otherwise on the physical port - so a port-level binding keeps working exactly as before, and a frame routed out of a VLAN interface passes through that interface's policy.Reproduction, before the fix
Router-on-a-stick: PC1 in VLAN 10, PC2 in VLAN 20,
Gi0/0.10/Gi0/0.20, ACL 101deny ip any any.After:
Tests
test/acl-vlan-interface.test.js- 25 assertions: the lab itself (two VLAN interfaces, a clean baseline),indeny (ping, reason, one event, attributed to the subinterface, list number), a flow refused withE_ACL_DENYnaming the interface,outdeny, scope (VLAN 20 talking to its own VLAN interface is untouched while VLAN 10 is refused), a permit list permitting, counters + running-config agreement, and no regression for a list on the physical port.Against the previous
engine/simulator.jsthe same file gives 13 failures; with the fix 25/25.Full suite: 268 suites, 9686 assertions passed, 1 failed -
test/property-validator.test.js(random link seed 30:unknown code E_PROTOCOL_MISMATCH), which fails identically on unmodifiedorigin/main(3/3 runs with this change stashed), so it is pre-existing and unrelated. Syntax check: 338 files, all OK.Not covered here: an ACL on a VLAN interface is still only as good as the routing model - the box has no SVIs, so
interface Gi0/0.10is the VLAN interface this fix speaks about.Fixes #1517