return false;
 }
 
-static void *ipvlan_get_L3_hdr(struct sk_buff *skb, int *type)
+static void *ipvlan_get_L3_hdr(struct ipvl_port *port, struct sk_buff *skb, int *type)
 {
        void *lyr3h = NULL;
 
        case htons(ETH_P_ARP): {
                struct arphdr *arph;
 
-               if (unlikely(!pskb_may_pull(skb, sizeof(*arph))))
+               if (unlikely(!pskb_may_pull(skb, arp_hdr_len(port->dev))))
                        return NULL;
 
                arph = arp_hdr(skb);
        struct ipvl_addr *addr;
        int addr_type;
 
-       lyr3h = ipvlan_get_L3_hdr(skb, &addr_type);
+       lyr3h = ipvlan_get_L3_hdr(ipvlan->port, skb, &addr_type);
        if (!lyr3h)
                goto out;
 
 
        if (!ipvlan_is_vepa(ipvlan->port) &&
            ether_addr_equal(eth->h_dest, eth->h_source)) {
-               lyr3h = ipvlan_get_L3_hdr(skb, &addr_type);
+               lyr3h = ipvlan_get_L3_hdr(ipvlan->port, skb, &addr_type);
                if (lyr3h) {
                        addr = ipvlan_addr_lookup(ipvlan->port, lyr3h, addr_type, true);
                        if (addr) {
        int addr_type;
 
        if (ether_addr_equal(eth->h_source, skb->dev->dev_addr)) {
-               lyr3h = ipvlan_get_L3_hdr(skb, &addr_type);
+               lyr3h = ipvlan_get_L3_hdr(port, skb, &addr_type);
                if (!lyr3h)
                        return true;
 
        struct sk_buff *skb = *pskb;
        rx_handler_result_t ret = RX_HANDLER_PASS;
 
-       lyr3h = ipvlan_get_L3_hdr(skb, &addr_type);
+       lyr3h = ipvlan_get_L3_hdr(port, skb, &addr_type);
        if (!lyr3h)
                goto out;
 
        } else {
                struct ipvl_addr *addr;
 
-               lyr3h = ipvlan_get_L3_hdr(skb, &addr_type);
+               lyr3h = ipvlan_get_L3_hdr(port, skb, &addr_type);
                if (!lyr3h)
                        return ret;
 
        if (!port || port->mode != IPVLAN_MODE_L3S)
                goto out;
 
-       lyr3h = ipvlan_get_L3_hdr(skb, &addr_type);
+       lyr3h = ipvlan_get_L3_hdr(port, skb, &addr_type);
        if (!lyr3h)
                goto out;