interface: Prevent bad inner-dot1q any exact-match configuration 63/28263/2
authorJon Loeliger <[email protected]>
Thu, 19 Dec 2019 15:03:52 +0000 (09:03 -0600)
committerDave Wallace <[email protected]>
Wed, 12 Aug 2020 14:33:06 +0000 (14:33 +0000)
commit62c6e93d1095ddbc6d86efbd4db18d51cc1fd9bb
tree94c554f504546bc55a073836e83476081ef72f2f
parent74331c935fd68d01757ff3af34c03cc8ca87faa0
interface: Prevent bad inner-dot1q any exact-match configuration

Someone much more knowledgeable than I wrote:

    For L3 IP forwarding, any VLAN tags on a packet must be exact
    match to a sub-interface which means both outer and inner VLAN
    tag IDs must be exact-matched to specific values defined of that
    sub-interface.  Without exact match on a L3 sub-interface, VPP
    has no mechanism to know what VLAN tags to use for packet output,
    such as ARP request packets or IP packets, on that sub-interface.

    Thus, sub-interface with "inner-dot1q any" is not an exact match
    sub-interface by definition since no match is present on inner
    tag.

While in the area, fix a memory leak that would ensue on poorly
configured interfaces.

Change-Id: I8d17a96dbca3e3724c297ecc935ca61764e6ce2e
Type: fix
Signed-off-by: Jon Loeliger <[email protected]>
(cherry picked from commit b22e1f06bbebc48ec72ce8effa529e69ffbb12ca)
src/vnet/interface.c
src/vnet/interface_cli.c