]> git.proxmox.com Git - ovs.git/commitdiff
ip_gre: Remove even more unused code
authorGreg Rose <gvrose8192@gmail.com>
Thu, 31 Oct 2019 22:46:04 +0000 (15:46 -0700)
committerBen Pfaff <blp@ovn.org>
Thu, 31 Oct 2019 22:57:34 +0000 (15:57 -0700)
There is a confusing mix of ipgre and gretap functions with some
needed for gretap still having ipgre_ prefixes.  This time though
I think I got the rest of the unused ipgre code.

Fixes: d5822f428814 ("gre: Remove dead ipgre code")
Signed-off-by: Greg Rose <gvrose8192@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
datapath/linux/compat/ip_gre.c

index 3b7e607d597cfd70f7da0c9b3168c326a4effe51..8536241146e6718a97f1cff175ed444ff891163e 100644 (file)
@@ -922,44 +922,6 @@ static int erspan_tunnel_init(struct net_device *dev)
        return ip_tunnel_init(dev);
 }
 
-static int ipgre_header(struct sk_buff *skb, struct net_device *dev,
-                       unsigned short type,
-                       const void *daddr, const void *saddr, unsigned int len)
-{
-       struct ip_tunnel *t = netdev_priv(dev);
-       struct iphdr *iph;
-       struct gre_base_hdr *greh;
-
-       iph = (struct iphdr *)__skb_push(skb, t->hlen + sizeof(*iph));
-       greh = (struct gre_base_hdr *)(iph+1);
-       greh->flags = gre_tnl_flags_to_gre_flags(t->parms.o_flags);
-       greh->protocol = htons(type);
-
-       memcpy(iph, &t->parms.iph, sizeof(struct iphdr));
-
-       /* Set the source hardware address. */
-       if (saddr)
-               memcpy(&iph->saddr, saddr, 4);
-       if (daddr)
-               memcpy(&iph->daddr, daddr, 4);
-       if (iph->daddr)
-               return t->hlen + sizeof(*iph);
-
-       return -(t->hlen + sizeof(*iph));
-}
-
-static int ipgre_header_parse(const struct sk_buff *skb, unsigned char *haddr)
-{
-       const struct iphdr *iph = (const struct iphdr *) skb_mac_header(skb);
-       memcpy(haddr, &iph->saddr, 4);
-       return 4;
-}
-
-static const struct header_ops ipgre_header_ops = {
-       .create = ipgre_header,
-       .parse  = ipgre_header_parse,
-};
-
 static int ipgre_tunnel_init(struct net_device *dev)
 {
        struct ip_tunnel *tunnel = netdev_priv(dev);