Trivial: Clean up some typos.
[vpp.git] / src / vnet / l2 / l2_input.c
index fd6f9eb..1c9ddaa 100644 (file)
@@ -539,6 +539,27 @@ l2input_set_bridge_features (u32 bd_index, u32 feat_mask, u32 feat_value)
   return bd_config->feature_bitmap;
 }
 
+void
+l2input_interface_mac_change (u32 sw_if_index,
+                             const u8 * old_address, const u8 * new_address)
+{
+  /* check if the sw_if_index passed is a BVI in a BD */
+  l2_input_config_t *intf_config;
+
+  intf_config = l2input_intf_config (sw_if_index);
+
+  if (intf_config->bridge && intf_config->bvi)
+    {
+      /* delete and re-add l2fib entry for the bvi interface */
+      l2fib_del_entry (old_address, intf_config->bd_index, sw_if_index);
+      l2fib_add_entry (new_address,
+                      intf_config->bd_index,
+                      sw_if_index,
+                      L2FIB_ENTRY_RESULT_FLAG_BVI |
+                      L2FIB_ENTRY_RESULT_FLAG_STATIC);
+    }
+}
+
 /**
  * Set the subinterface to run in l2 or l3 mode.
  * For L3 mode, just the sw_if_index is specified.
@@ -948,7 +969,7 @@ done:
 
 /*?
  * Use this command put an interface into Layer 2 cross-connect mode.
- * Both interfaces must be in this mode for bi-directioal traffic. All
+ * Both interfaces must be in this mode for bi-directional traffic. All
  * packets received on one interface will be transmitted to the other.
  * To remove the Layer 2 cross-connect, put the interface in a different
  * mode, for example Layer 3 mode.
@@ -1101,11 +1122,11 @@ done:
 }
 
 /*?
- * Show the packet processing mode (Layer2 xcross-onnect, Layer 2 bridge,
+ * Show the packet processing mode (Layer2 cross-connect, Layer 2 bridge,
  * Layer 3 routed) of all interfaces and sub-interfaces, or limit the
  * output to just the provided list of interfaces and sub-interfaces.
  * The output shows the mode, the interface, and if the interface is
- * a member of a bridge, the bridge-domain-id and the split horizen group (shg).
+ * a member of a bridge, the bridge-domain-id and the split horizon group (shg).
  *
  * @cliexpar
  * Example of displaying the mode of all interfaces:
@@ -1120,7 +1141,7 @@ done:
  * l2 xconnect GigabitEthernet0/8/0.300 GigabitEthernet0/9/0.300
  * l2 xconnect GigabitEthernet0/9/0.300 GigabitEthernet0/8/0.300
  * @cliexend
- * Example of displaying the mode of a seleted list of interfaces:
+ * Example of displaying the mode of a selected list of interfaces:
  * @cliexstart{show mode GigabitEthernet0/8/0 GigabitEthernet0/8/0.200}
  * l3 GigabitEthernet0/8/0
  * l2 bridge GigabitEthernet0/8/0.200 bd_id 200 shg 0