Skip to content

Commit e882827

Browse files
TaeheeYooPaolo Abeni
authored andcommitted
amt: drop unexpected multicast data
AMT gateway interface should not receive unexpected multicast data. Multicast data message type should be received after sending an update message, which means all establishment between gateway and relay is finished. So, amt_multicast_data_handler() checks amt->status. Fixes: cbc21dc ("amt: add data plane of amt interface") Signed-off-by: Taehee Yoo <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent 239d886 commit e882827

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/net/amt.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2282,6 +2282,9 @@ static bool amt_multicast_data_handler(struct amt_dev *amt, struct sk_buff *skb)
22822282
struct ethhdr *eth;
22832283
struct iphdr *iph;
22842284

2285+
if (READ_ONCE(amt->status) != AMT_STATUS_SENT_UPDATE)
2286+
return true;
2287+
22852288
hdr_size = sizeof(*amtmd) + sizeof(struct udphdr);
22862289
if (!pskb_may_pull(skb, hdr_size))
22872290
return true;

0 commit comments

Comments
 (0)