aboutsummaryrefslogtreecommitdiffstats
path: root/net/hsr/hsr_forward.c
diff options
context:
space:
mode:
authorMurali Karicheri <m-karicheri2@ti.com>2020-07-22 10:40:19 -0400
committerDavid S. Miller <davem@davemloft.net>2020-07-27 12:20:40 -0700
commitc643ff0383c858b9af09f582ed2947810e4cf407 (patch)
tree9ab15e6534298ca5908422c9b4ed33724d6c7b1d /net/hsr/hsr_forward.c
parentnet: hsr: introduce protocol specific function pointers (diff)
downloadlinux-dev-c643ff0383c858b9af09f582ed2947810e4cf407.tar.xz
linux-dev-c643ff0383c858b9af09f582ed2947810e4cf407.zip
net: prp: add supervision frame generation utility function
Add support for generation of PRP supervision frames. For PRP, supervision frame format is similar to HSR version 0, but have a PRP Redundancy Control Trailer (RCT) added and uses a different message type, PRP_TLV_LIFE_CHECK_DD. Also update is_supervision_frame() to include the new message type used for PRP supervision frame. Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/hsr/hsr_forward.c')
-rw-r--r--net/hsr/hsr_forward.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/hsr/hsr_forward.c b/net/hsr/hsr_forward.c
index 55adb4dbd235..dedf8ac6f992 100644
--- a/net/hsr/hsr_forward.c
+++ b/net/hsr/hsr_forward.c
@@ -76,7 +76,9 @@ static bool is_supervision_frame(struct hsr_priv *hsr, struct sk_buff *skb)
}
if (hsr_sup_tag->HSR_TLV_type != HSR_TLV_ANNOUNCE &&
- hsr_sup_tag->HSR_TLV_type != HSR_TLV_LIFE_CHECK)
+ hsr_sup_tag->HSR_TLV_type != HSR_TLV_LIFE_CHECK &&
+ hsr_sup_tag->HSR_TLV_type != PRP_TLV_LIFE_CHECK_DD &&
+ hsr_sup_tag->HSR_TLV_type != PRP_TLV_LIFE_CHECK_DA)
return false;
if (hsr_sup_tag->HSR_TLV_length != 12 &&
hsr_sup_tag->HSR_TLV_length != sizeof(struct hsr_sup_payload))