--- zzzz-none-000/linux-4.4.60/net/ipv4/ip_gre.c 2017-04-08 07:53:53.000000000 +0000 +++ scorpion-7490-727/linux-4.4.60/net/ipv4/ip_gre.c 2021-02-04 17:41:59.000000000 +0000 @@ -633,6 +633,8 @@ if (IS_ERR(skb)) goto out; + skb->skb_iif = dev->ifindex; + __gre_xmit(skb, dev, tnl_params, skb->protocol); return NETDEV_TX_OK; @@ -660,6 +662,8 @@ if (skb_cow_head(skb, dev->needed_headroom)) goto free_skb; + skb->skb_iif = dev->ifindex; + __gre_xmit(skb, dev, &tunnel->parms.iph, htons(ETH_P_TEB)); return NETDEV_TX_OK; @@ -703,7 +707,6 @@ It allows to construct virtual multiprotocol broadcast "LAN" over the Internet, provided multicast routing is tuned. - I have no idea was this bicycle invented before me, so that I had to set ARPHRD_IPGRE to a random value. I have an impression, that Cisco could make something similar, @@ -1062,7 +1065,7 @@ { ether_setup(dev); dev->netdev_ops = &gre_tap_netdev_ops; - dev->priv_flags |= IFF_LIVE_ADDR_CHANGE; + dev->priv_flags |= IFF_LIVE_ADDR_CHANGE | IFF_GRE_V4_TAP; ip_tunnel_setup(dev, gre_tap_net_id); }