diff options
author | Jon Loeliger <jdl@netgate.com> | 2019-11-08 15:05:23 -0600 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2019-11-12 20:37:55 +0000 |
commit | 9485d99bd3941b13abf7e47fc7e1d56f7b4fee55 (patch) | |
tree | d3f4e90f5cdd5966300d61c89c4bfea81ce5dab9 /src/vnet/l2 | |
parent | 592a909a302262cf4088a5468b8e427f577725e8 (diff) |
interface: Allow VLAN tag-rewrite on non-sub-interfaces too.
This fix was first made in
commit fdea5c6a00b74971dbb1b7ec4e25839a871006ca
but was subsequently lost in
commit 053204ab039d34a990ff0e14c32ce3b294fcce0e
Added unit test for setting VTR on a non-sub-interface to
help ensure no future regressions of this ability.
Type: fix
Change-Id: I71ce2684fb72383741455829ae2d397ea2e95eae
Signed-off-by: Jon Loeliger <jdl@netgate.com>
Diffstat (limited to 'src/vnet/l2')
-rw-r--r-- | src/vnet/l2/l2_bd.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/vnet/l2/l2_bd.c b/src/vnet/l2/l2_bd.c index 207ef4d6601..e54d437f0ea 100644 --- a/src/vnet/l2/l2_bd.c +++ b/src/vnet/l2/l2_bd.c @@ -995,41 +995,6 @@ VLIB_CLI_COMMAND (bd_arp_entry_cli, static) = { /* *INDENT-ON* */ static u8 * -format_vtr (u8 * s, va_list * args) -{ - u32 vtr_op = va_arg (*args, u32); - u32 dot1q = va_arg (*args, u32); - u32 tag1 = va_arg (*args, u32); - u32 tag2 = va_arg (*args, u32); - switch (vtr_op) - { - case L2_VTR_DISABLED: - return format (s, "none"); - case L2_VTR_PUSH_1: - return format (s, "push-1 %s %d", dot1q ? "dot1q" : "dot1ad", tag1); - case L2_VTR_PUSH_2: - return format (s, "push-2 %s %d %d", dot1q ? "dot1q" : "dot1ad", tag1, - tag2); - case L2_VTR_POP_1: - return format (s, "pop-1"); - case L2_VTR_POP_2: - return format (s, "pop-2"); - case L2_VTR_TRANSLATE_1_1: - return format (s, "trans-1-1 %s %d", dot1q ? "dot1q" : "dot1ad", tag1); - case L2_VTR_TRANSLATE_1_2: - return format (s, "trans-1-2 %s %d %d", dot1q ? "dot1q" : "dot1ad", - tag1, tag2); - case L2_VTR_TRANSLATE_2_1: - return format (s, "trans-2-1 %s %d", dot1q ? "dot1q" : "dot1ad", tag1); - case L2_VTR_TRANSLATE_2_2: - return format (s, "trans-2-2 %s %d %d", dot1q ? "dot1q" : "dot1ad", - tag1, tag2); - default: - return format (s, "none"); - } -} - -static u8 * format_uu_cfg (u8 * s, va_list * args) { l2_bridge_domain_t *bd_config = va_arg (*args, l2_bridge_domain_t *); |