unparsed->vx_flags &= ~VXLAN_GBP_USED_BITS;
 }
 
-static bool vxlan_set_mac(struct vxlan_dev *vxlan,
-                         struct vxlan_sock *vs,
-                         struct sk_buff *skb, __be32 vni)
+static enum skb_drop_reason vxlan_set_mac(struct vxlan_dev *vxlan,
+                                         struct vxlan_sock *vs,
+                                         struct sk_buff *skb, __be32 vni)
 {
        union vxlan_addr saddr;
        u32 ifindex = skb->dev->ifindex;
 
        /* Ignore packet loops (and multicast echo) */
        if (ether_addr_equal(eth_hdr(skb)->h_source, vxlan->dev->dev_addr))
-               return false;
+               return SKB_DROP_REASON_LOCAL_MAC;
 
        /* Get address from the outer IP header */
        if (vxlan_get_sk_family(vs) == AF_INET) {
 #endif
        }
 
-       if ((vxlan->cfg.flags & VXLAN_F_LEARN) &&
-           vxlan_snoop(skb->dev, &saddr, eth_hdr(skb)->h_source, ifindex, vni))
-               return false;
+       if (!(vxlan->cfg.flags & VXLAN_F_LEARN))
+               return SKB_NOT_DROPPED_YET;
 
-       return true;
+       return vxlan_snoop(skb->dev, &saddr, eth_hdr(skb)->h_source,
+                          ifindex, vni);
 }
 
 static bool vxlan_ecn_decapsulate(struct vxlan_sock *vs, void *oiph,
        }
 
        if (!raw_proto) {
-               if (!vxlan_set_mac(vxlan, vs, skb, vni))
+               reason = vxlan_set_mac(vxlan, vs, skb, vni);
+               if (reason)
                        goto drop;
        } else {
                skb_reset_mac_header(skb);
 
        FN(MAC_INVALID_SOURCE)          \
        FN(VXLAN_ENTRY_EXISTS)          \
        FN(IP_TUNNEL_ECN)               \
+       FN(LOCAL_MAC)                   \
        FNe(MAX)
 
 /**
         * RFC 6040 4.2, see __INET_ECN_decapsulate() for detail.
         */
        SKB_DROP_REASON_IP_TUNNEL_ECN,
+       /**
+        * @SKB_DROP_REASON_LOCAL_MAC: the source MAC address is equal to
+        * the MAC address of the local netdev.
+        */
+       SKB_DROP_REASON_LOCAL_MAC,
        /**
         * @SKB_DROP_REASON_MAX: the maximum of core drop reasons, which
         * shouldn't be used as a real 'reason' - only for tracing code gen