kernel: bump to 3.18.84
[15.05/openwrt.git] / target / linux / generic / patches-3.18 / 666-Add-support-for-MAP-E-FMRs-mesh-mode.patch
index 70e96ce..43bdbe4 100644 (file)
@@ -43,6 +43,32 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
  
        __be16                  i_flags;
        __be16                  o_flags;
+--- a/include/uapi/linux/if_tunnel.h
++++ b/include/uapi/linux/if_tunnel.h
+@@ -57,10 +57,23 @@ enum {
+       IFLA_IPTUN_ENCAP_FLAGS,
+       IFLA_IPTUN_ENCAP_SPORT,
+       IFLA_IPTUN_ENCAP_DPORT,
++      IFLA_IPTUN_FMRS,
+       __IFLA_IPTUN_MAX,
+ };
+ #define IFLA_IPTUN_MAX        (__IFLA_IPTUN_MAX - 1)
++enum {
++      IFLA_IPTUN_FMR_UNSPEC,
++      IFLA_IPTUN_FMR_IP6_PREFIX,
++      IFLA_IPTUN_FMR_IP4_PREFIX,
++      IFLA_IPTUN_FMR_IP6_PREFIX_LEN,
++      IFLA_IPTUN_FMR_IP4_PREFIX_LEN,
++      IFLA_IPTUN_FMR_EA_LEN,
++      IFLA_IPTUN_FMR_OFFSET,
++      __IFLA_IPTUN_FMR_MAX,
++};
++#define IFLA_IPTUN_FMR_MAX (__IFLA_IPTUN_FMR_MAX - 1)
++
+ enum tunnel_encap_types {
+       TUNNEL_ENCAP_NONE,
+       TUNNEL_ENCAP_FOU,
 --- a/net/ipv6/ip6_tunnel.c
 +++ b/net/ipv6/ip6_tunnel.c
 @@ -16,6 +16,8 @@
@@ -106,7 +132,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
        }
        return &ip6n->tnls[prio][h];
  }
-@@ -391,6 +400,12 @@ ip6_tnl_dev_uninit(struct net_device *de
+@@ -388,6 +397,12 @@ ip6_tnl_dev_uninit(struct net_device *de
        struct net *net = t->net;
        struct ip6_tnl_net *ip6n = net_generic(net, ip6_tnl_net_id);
  
@@ -119,7 +145,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
        if (dev == ip6n->fb_tnl_dev)
                RCU_INIT_POINTER(ip6n->tnls_wc[0], NULL);
        else
-@@ -774,6 +789,108 @@ int ip6_tnl_rcv_ctl(struct ip6_tnl *t,
+@@ -781,6 +796,108 @@ int ip6_tnl_rcv_ctl(struct ip6_tnl *t,
  }
  EXPORT_SYMBOL_GPL(ip6_tnl_rcv_ctl);
  
@@ -228,7 +254,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
  /**
   * ip6_tnl_rcv - decapsulate IPv6 packet and retransmit it locally
   *   @skb: received socket buffer
-@@ -818,6 +935,26 @@ static int ip6_tnl_rcv(struct sk_buff *s
+@@ -825,6 +942,26 @@ static int ip6_tnl_rcv(struct sk_buff *s
                skb_reset_network_header(skb);
                skb->protocol = htons(protocol);
                memset(skb->cb, 0, sizeof(struct inet6_skb_parm));
@@ -255,7 +281,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
  
                __skb_tunnel_rx(skb, t->dev, t->net);
  
-@@ -1079,6 +1216,7 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, str
+@@ -1086,6 +1223,7 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, str
        __u8 dsfield;
        __u32 mtu;
        int err;
@@ -263,7 +289,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
  
        if ((t->parms.proto != IPPROTO_IPIP && t->parms.proto != 0) ||
            !ip6_tnl_xmit_ctl(t))
-@@ -1098,6 +1236,18 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, str
+@@ -1105,6 +1243,18 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, str
        if (t->parms.flags & IP6_TNL_F_USE_ORIG_FWMARK)
                fl6.flowi6_mark = skb->mark;
  
@@ -282,7 +308,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
        err = ip6_tnl_xmit2(skb, dev, dsfield, &fl6, encap_limit, &mtu);
        if (err != 0) {
                /* XXX: send ICMP error even if DF is not set. */
-@@ -1266,6 +1416,14 @@ ip6_tnl_change(struct ip6_tnl *t, const
+@@ -1273,6 +1423,14 @@ ip6_tnl_change(struct ip6_tnl *t, const
        t->parms.flowinfo = p->flowinfo;
        t->parms.link = p->link;
        t->parms.proto = p->proto;
@@ -297,7 +323,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
        ip6_tnl_dst_reset(t);
        ip6_tnl_link_config(t);
        return 0;
-@@ -1296,6 +1454,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_
+@@ -1303,6 +1461,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_
        p->flowinfo = u->flowinfo;
        p->link = u->link;
        p->proto = u->proto;
@@ -305,7 +331,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
        memcpy(p->name, u->name, sizeof(u->name));
  }
  
-@@ -1576,6 +1735,15 @@ static int ip6_tnl_validate(struct nlatt
+@@ -1578,6 +1737,15 @@ static int ip6_tnl_validate(struct nlatt
        return 0;
  }
  
@@ -321,7 +347,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
  static void ip6_tnl_netlink_parms(struct nlattr *data[],
                                  struct __ip6_tnl_parm *parms)
  {
-@@ -1609,6 +1777,46 @@ static void ip6_tnl_netlink_parms(struct
+@@ -1611,6 +1779,46 @@ static void ip6_tnl_netlink_parms(struct
  
        if (data[IFLA_IPTUN_PROTO])
                parms->proto = nla_get_u8(data[IFLA_IPTUN_PROTO]);
@@ -368,7 +394,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
  }
  
  static int ip6_tnl_newlink(struct net *src_net, struct net_device *dev,
-@@ -1661,6 +1869,12 @@ static void ip6_tnl_dellink(struct net_d
+@@ -1663,6 +1871,12 @@ static void ip6_tnl_dellink(struct net_d
  
  static size_t ip6_tnl_get_size(const struct net_device *dev)
  {
@@ -381,7 +407,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
        return
                /* IFLA_IPTUN_LINK */
                nla_total_size(4) +
-@@ -1678,6 +1892,24 @@ static size_t ip6_tnl_get_size(const str
+@@ -1680,6 +1894,24 @@ static size_t ip6_tnl_get_size(const str
                nla_total_size(4) +
                /* IFLA_IPTUN_PROTO */
                nla_total_size(1) +
@@ -406,7 +432,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
                0;
  }
  
-@@ -1685,6 +1917,9 @@ static int ip6_tnl_fill_info(struct sk_b
+@@ -1687,6 +1919,9 @@ static int ip6_tnl_fill_info(struct sk_b
  {
        struct ip6_tnl *tunnel = netdev_priv(dev);
        struct __ip6_tnl_parm *parm = &tunnel->parms;
@@ -416,7 +442,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
  
        if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) ||
            nla_put(skb, IFLA_IPTUN_LOCAL, sizeof(struct in6_addr),
-@@ -1695,8 +1930,27 @@ static int ip6_tnl_fill_info(struct sk_b
+@@ -1697,8 +1932,27 @@ static int ip6_tnl_fill_info(struct sk_b
            nla_put_u8(skb, IFLA_IPTUN_ENCAP_LIMIT, parm->encap_limit) ||
            nla_put_be32(skb, IFLA_IPTUN_FLOWINFO, parm->flowinfo) ||
            nla_put_u32(skb, IFLA_IPTUN_FLAGS, parm->flags) ||
@@ -445,7 +471,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
        return 0;
  
  nla_put_failure:
-@@ -1712,6 +1966,7 @@ static const struct nla_policy ip6_tnl_p
+@@ -1714,6 +1968,7 @@ static const struct nla_policy ip6_tnl_p
        [IFLA_IPTUN_FLOWINFO]           = { .type = NLA_U32 },
        [IFLA_IPTUN_FLAGS]              = { .type = NLA_U32 },
        [IFLA_IPTUN_PROTO]              = { .type = NLA_U8 },