summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorGeorge McCollister <george.mccollister@gmail.com>2021-06-15 12:50:37 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-07-19 10:01:00 +0200
commitca9080b726b02dc199346eabc51259b7151653b5 (patch)
tree267f71a6a5746bb5f16b8de421ea7ef50f88aa4d /net
parent0cbc4900ea0c0ac3055f868cecf81a640aa19a65 (diff)
downloadlinux-ca9080b726b02dc199346eabc51259b7151653b5.tar.gz
linux-ca9080b726b02dc199346eabc51259b7151653b5.tar.bz2
linux-ca9080b726b02dc199346eabc51259b7151653b5.zip
net: hsr: don't check sequence number if tag removal is offloaded
[ Upstream commit c2ae34a7deaff463ecafb7db627b77faaca8e159 ] Don't check the sequence number when deciding when to update time_in in the node table if tag removal is offloaded since the sequence number is part of the tag. This fixes a problem where the times in the node table wouldn't update when 0 appeared to be before or equal to seq_out when tag removal was offloaded. Signed-off-by: George McCollister <george.mccollister@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net')
-rw-r--r--net/hsr/hsr_framereg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/hsr/hsr_framereg.c b/net/hsr/hsr_framereg.c
index bb1351c38397..e31949479305 100644
--- a/net/hsr/hsr_framereg.c
+++ b/net/hsr/hsr_framereg.c
@@ -397,7 +397,8 @@ void hsr_register_frame_in(struct hsr_node *node, struct hsr_port *port,
* ensures entries of restarted nodes gets pruned so that they can
* re-register and resume communications.
*/
- if (seq_nr_before(sequence_nr, node->seq_out[port->type]))
+ if (!(port->dev->features & NETIF_F_HW_HSR_TAG_RM) &&
+ seq_nr_before(sequence_nr, node->seq_out[port->type]))
return;
node->time_in[port->type] = jiffies;