From: Petr Machata <pe...@mellanox.com>

When a bound device of an IP-in-IP tunnel changes, such as through
'ip tunnel change name $name dev $dev', the loopback backing the tunnel
needs to be recreated.

Signed-off-by: Petr Machata <pe...@mellanox.com>
Reviewed-by: Ido Schimmel <ido...@mellanox.com>
Signed-off-by: Jiri Pirko <j...@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.c 
b/drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.c
index 5f78fc5..7502e53 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.c
@@ -326,8 +326,9 @@ mlxsw_sp_ipip_ol_netdev_change_gre4(struct mlxsw_sp 
*mlxsw_sp,
                }
 
                update_tunnel = true;
-       } else if (mlxsw_sp_ipip_parms_okey(ipip_entry->parms) !=
-                  mlxsw_sp_ipip_parms_okey(new_parms)) {
+       } else if ((mlxsw_sp_ipip_parms_okey(ipip_entry->parms) !=
+                   mlxsw_sp_ipip_parms_okey(new_parms)) ||
+                  ipip_entry->parms.link != new_parms.link) {
                update_tunnel = true;
        } else if (!mlxsw_sp_l3addr_eq(&new_daddr, &old_daddr)) {
                update_nhs = true;
-- 
2.9.5

Reply via email to