pppoe: make pppoe plugin work with dot1q subinterfaces
[vpp.git] / src / plugins / pppoe / pppoe_cp_node.c
index bf9018e..1a44b5d 100644 (file)
@@ -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);
             }