@@ -532,6 +532,10 @@ static int ipvlan_xmit_mode_l2(struct sk_buff *skb, struct net_device *dev)
return dev_forward_skb(ipvlan->phy_dev, skb);
} else if (is_multicast_ether_addr(eth->h_dest)) {
+ skb = ip_check_defrag(skb, IP_DEFRAG_IPVLAN);
+ if (!skb)
+ return RX_HANDLER_CONSUMED;
+
ipvlan_multicast_enqueue(ipvlan->port, skb);
return NET_XMIT_SUCCESS;
}
@@ -617,6 +621,10 @@ static rx_handler_result_t ipvlan_handle_mode_l2(struct sk_buff **pskb,
int addr_type;
if (is_multicast_ether_addr(eth->h_dest)) {
+ skb = ip_check_defrag(skb, IP_DEFRAG_IPVLAN);
+ if (!skb)
+ return RX_HANDLER_CONSUMED;
+
if (ipvlan_external_frame(skb, port)) {
ipvlan_multicast_enqueue(port, skb);
return RX_HANDLER_CONSUMED;
@@ -476,6 +476,7 @@ enum ip_defrag_users {
IP_DEFRAG_VS_FWD,
IP_DEFRAG_AF_PACKET,
IP_DEFRAG_MACVLAN,
+ IP_DEFRAG_IPVLAN,
};
int ip_defrag(struct sk_buff *skb, u32 user);
Multicast processing in IPvlan was faulty as is. Eric Dumazet pointed out that fragmented packets wont be processed correctly unless defrag step is introduced. This patch adds the defrag step before driver attempts to process multicast frame(s). Signed-off-by: Mahesh Bandewar <maheshb@google.com> --- drivers/net/ipvlan/ipvlan_core.c | 8 ++++++++ include/net/ip.h | 1 + 2 files changed, 9 insertions(+)