diff -Nru iproute2-3.12.0/debian/changelog iproute2-3.12.0/debian/changelog --- iproute2-3.12.0/debian/changelog 2014-02-12 21:18:54.000000000 +0000 +++ iproute2-3.12.0/debian/changelog 2015-07-23 16:01:47.000000000 +0000 @@ -1,3 +1,9 @@ +iproute2 (3.12.0-2ubuntu1) trusty; urgency=low + + * Add Ubuntu FAN support V3. (LP: #1470091) + + -- Andy Whitcroft Mon, 29 Jun 2015 17:05:40 +0100 + iproute2 (3.12.0-2) unstable; urgency=medium * Add build-dependency on texlive-fonts-recommended (Closes: #738397) diff -Nru iproute2-3.12.0/debian/patches/1000-ubuntu-poc-fan-driver.patch iproute2-3.12.0/debian/patches/1000-ubuntu-poc-fan-driver.patch --- iproute2-3.12.0/debian/patches/1000-ubuntu-poc-fan-driver.patch 1970-01-01 00:00:00.000000000 +0000 +++ iproute2-3.12.0/debian/patches/1000-ubuntu-poc-fan-driver.patch 2015-06-29 16:03:37.000000000 +0000 @@ -0,0 +1,65 @@ +Description: POC fan driver support + POC Fan driver support +Author: Jay Vosburgh + +Index: iproute2-3.12.0/include/linux/if_tunnel.h +=================================================================== +--- iproute2-3.12.0.orig/include/linux/if_tunnel.h ++++ iproute2-3.12.0/include/linux/if_tunnel.h +@@ -53,6 +53,9 @@ enum { + IFLA_IPTUN_6RD_RELAY_PREFIX, + IFLA_IPTUN_6RD_PREFIXLEN, + IFLA_IPTUN_6RD_RELAY_PREFIXLEN, ++ ++ IFLA_IPTUN_FAN_UNDERLAY = 32, ++ + __IFLA_IPTUN_MAX, + }; + #define IFLA_IPTUN_MAX (__IFLA_IPTUN_MAX - 1) +Index: iproute2-3.12.0/ip/link_iptnl.c +=================================================================== +--- iproute2-3.12.0.orig/ip/link_iptnl.c ++++ iproute2-3.12.0/ip/link_iptnl.c +@@ -58,6 +58,7 @@ static int iptunnel_parse_opt(struct lin + __u32 link = 0; + __u32 laddr = 0; + __u32 raddr = 0; ++ __u32 underlay = 0; + __u8 ttl = 0; + __u8 tos = 0; + __u8 pmtudisc = 1; +@@ -154,6 +155,9 @@ get_failed: + raddr = get_addr32(*argv); + else + raddr = 0; ++ } else if (strcmp(*argv, "underlay") == 0) { ++ NEXT_ARG(); ++ underlay = get_addr32(*argv); + } else if (strcmp(*argv, "local") == 0) { + NEXT_ARG(); + if (strcmp(*argv, "any")) +@@ -258,6 +262,9 @@ get_failed: + } + } + ++ if (underlay) ++ addattr32(n, 1024, IFLA_IPTUN_FAN_UNDERLAY, underlay); ++ + return 0; + } + +@@ -289,6 +296,14 @@ static void iptunnel_print_opt(struct li + + fprintf(f, "local %s ", local); + ++ if (tb[IFLA_IPTUN_FAN_UNDERLAY]) { ++ unsigned addr = rta_getattr_u32(tb[IFLA_IPTUN_FAN_UNDERLAY]); ++ ++ if (addr) ++ fprintf(f, "underlay %s ", ++ format_host(AF_INET, 4, &addr, s1, sizeof(s1))); ++ } ++ + if (tb[IFLA_IPTUN_LINK] && rta_getattr_u32(tb[IFLA_IPTUN_LINK])) { + unsigned link = rta_getattr_u32(tb[IFLA_IPTUN_LINK]); + const char *n = if_indextoname(link, s2); diff -Nru iproute2-3.12.0/debian/patches/1001-ubuntu-poc-fan-driver-v3.patch iproute2-3.12.0/debian/patches/1001-ubuntu-poc-fan-driver-v3.patch --- iproute2-3.12.0/debian/patches/1001-ubuntu-poc-fan-driver-v3.patch 1970-01-01 00:00:00.000000000 +0000 +++ iproute2-3.12.0/debian/patches/1001-ubuntu-poc-fan-driver-v3.patch 2015-07-23 12:02:49.000000000 +0000 @@ -0,0 +1,134 @@ +Description: Fan driver support v3 + Fan driver support v3 +Author: Jay Vosburgh + +Index: iproute2-3.12.0/include/linux/if_tunnel.h +=================================================================== +--- iproute2-3.12.0.orig/include/linux/if_tunnel.h ++++ iproute2-3.12.0/include/linux/if_tunnel.h +@@ -55,6 +55,7 @@ enum { + IFLA_IPTUN_6RD_RELAY_PREFIXLEN, + + IFLA_IPTUN_FAN_UNDERLAY = 32, ++ IFLA_IPTUN_FAN_MAP = 33, + + __IFLA_IPTUN_MAX, + }; +@@ -116,4 +117,20 @@ enum { + }; + + #define IFLA_VTI_MAX (__IFLA_VTI_MAX - 1) ++ ++enum { ++ IFLA_FAN_UNSPEC, ++ IFLA_FAN_MAPPING, ++ __IFLA_FAN_MAX, ++}; ++ ++#define IFLA_FAN_MAX (__IFLA_FAN_MAX - 1) ++ ++struct ip_tunnel_fan_map { ++ __be32 underlay; ++ __be32 overlay; ++ __u16 underlay_prefix; ++ __u16 overlay_prefix; ++}; ++ + #endif /* _IF_TUNNEL_H_ */ +Index: iproute2-3.12.0/ip/link_iptnl.c +=================================================================== +--- iproute2-3.12.0.orig/ip/link_iptnl.c ++++ iproute2-3.12.0/ip/link_iptnl.c +@@ -41,6 +41,42 @@ static void usage(int sit) + fprintf(stderr, " TTL := { 1..255 | inherit }\n"); + exit(-1); + } ++static int fan_parse_map(int *argcp, char ***argvp, struct nlmsghdr *n) ++{ ++ inet_prefix underlay, overlay; ++ struct ip_tunnel_fan_map map; ++ struct rtattr *nest; ++ char **argv = *argvp; ++ int argc = *argcp; ++ ++ nest = addattr_nest(n, 1024, IFLA_IPTUN_FAN_MAP); ++ while (argc > 0) { ++ char *colon = strchr(*argv, ':'); ++ ++ if (!colon) ++ break; ++ *colon = '\0'; ++ ++ if (get_prefix(&overlay, *argv, AF_INET)) ++ invarg("invalid fan-map overlay", *argv); ++ if (get_prefix(&underlay, colon + 1, AF_INET)) ++ invarg("invalid fan-map underlay", colon + 1); ++ ++ memcpy(&map.underlay, underlay.data, 4); ++ map.underlay_prefix = underlay.bitlen; ++ memcpy(&map.overlay, overlay.data, 4); ++ map.overlay_prefix = overlay.bitlen; ++ ++ argc--, argv++; ++ ++ addattr_l(n, 1024, IFLA_FAN_MAPPING, &map, sizeof(map)); ++ } ++ addattr_nest_end(n, nest); ++ ++ *argcp = argc; ++ *argvp = argv; ++ return 0; ++} + + static int iptunnel_parse_opt(struct link_util *lu, int argc, char **argv, + struct nlmsghdr *n) +@@ -158,6 +194,10 @@ get_failed: + } else if (strcmp(*argv, "underlay") == 0) { + NEXT_ARG(); + underlay = get_addr32(*argv); ++ } else if (strcmp(*argv, "fan-map") == 0) { ++ NEXT_ARG(); ++ if (fan_parse_map(&argc, &argv, n)) ++ invarg("invalid fan-map", *argv); + } else if (strcmp(*argv, "local") == 0) { + NEXT_ARG(); + if (strcmp(*argv, "any")) +@@ -268,6 +308,28 @@ get_failed: + return 0; + } + ++static void fan_print_map(FILE *f, struct rtattr *attr) ++{ ++ char b1[INET_ADDRSTRLEN], b2[INET_ADDRSTRLEN]; ++ struct ip_tunnel_fan_map *m; ++ struct rtattr *i; ++ int rem; ++ int p; ++ ++ fprintf(f, "fan-map "); ++ ++ rem = RTA_PAYLOAD(attr); ++ for (i = RTA_DATA(attr); RTA_OK(i, rem); i = RTA_NEXT(i, rem)) { ++ p = RTA_PAYLOAD(i); ++ m = RTA_DATA(i); ++ fprintf(f, "%s/%d:%s/%d ", ++ rt_addr_n2a(AF_INET, p, &m->overlay, b1, INET_ADDRSTRLEN), ++ m->overlay_prefix, ++ rt_addr_n2a(AF_INET, p, &m->underlay, b2, INET_ADDRSTRLEN), ++ m->underlay_prefix); ++ } ++} ++ + static void iptunnel_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[]) + { + char s1[1024]; +@@ -304,6 +366,9 @@ static void iptunnel_print_opt(struct li + format_host(AF_INET, 4, &addr, s1, sizeof(s1))); + } + ++ if (tb[IFLA_IPTUN_FAN_MAP]) ++ fan_print_map(f, tb[IFLA_IPTUN_FAN_MAP]); ++ + if (tb[IFLA_IPTUN_LINK] && rta_getattr_u32(tb[IFLA_IPTUN_LINK])) { + unsigned link = rta_getattr_u32(tb[IFLA_IPTUN_LINK]); + const char *n = if_indextoname(link, s2); diff -Nru iproute2-3.12.0/debian/patches/series iproute2-3.12.0/debian/patches/series --- iproute2-3.12.0/debian/patches/series 2014-02-12 21:09:06.000000000 +0000 +++ iproute2-3.12.0/debian/patches/series 2015-06-29 16:03:58.000000000 +0000 @@ -1,2 +1,4 @@ 0001-Add-moo-feature.patch 0002-txtdocs.patch +1000-ubuntu-poc-fan-driver.patch +1001-ubuntu-poc-fan-driver-v3.patch