From 340b10a38ed84600ed3336657ef3a104d9ebe877 Mon Sep 17 00:00:00 2001 From: zstas Date: Sat, 9 May 2020 16:57:23 +0000 Subject: pppoe: make pppoe plugin work with dot1q subinterfaces - Enabling arc "device-input" with the next node "pppoe-input" on the pppoe cp interface: to get rid of L3_MAC_MISMATCH error - Parsing in the "pppoe-input" node fixed to parse all headers from the scratch - Getting mac address directly from encap interface when filling up DPO adjacency. Anyway, in the case of the dot1q subinterface, we need to get vlan tags to fill the DPO adjacency. Type: improvement Change-Id: I5405931b0f58bef7b852c079a7e66e0da8b5de0f Signed-off-by: Stanislav Zaikin --- src/plugins/pppoe/pppoe_cp_node.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/plugins/pppoe/pppoe_cp_node.c') diff --git a/src/plugins/pppoe/pppoe_cp_node.c b/src/plugins/pppoe/pppoe_cp_node.c index bf9018e8c90..1a44b5d3853 100644 --- a/src/plugins/pppoe/pppoe_cp_node.c +++ b/src/plugins/pppoe/pppoe_cp_node.c @@ -153,6 +153,9 @@ VLIB_NODE_FN (pppoe_cp_dispatch_node) (vlib_main_t * vm, /* set src mac address */ si = vnet_get_sw_interface(vnm, tx_sw_if_index0); + if( si->type == VNET_SW_INTERFACE_TYPE_SUB ) { + si = vnet_get_sw_interface(vnm, si->sup_sw_if_index); + } hi = vnet_get_hw_interface (vnm, si->hw_if_index); clib_memcpy_fast (vlib_buffer_get_current (b0)+6, hi->hw_address, 6); } -- cgit 1.2.3-korg