summary refs log tree commit diff
path: root/pkgs/os-specific/linux/iproute/1000-ubuntu-poc-fan-driver.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/os-specific/linux/iproute/1000-ubuntu-poc-fan-driver.patch')
-rw-r--r--pkgs/os-specific/linux/iproute/1000-ubuntu-poc-fan-driver.patch65
1 files changed, 65 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/iproute/1000-ubuntu-poc-fan-driver.patch b/pkgs/os-specific/linux/iproute/1000-ubuntu-poc-fan-driver.patch
new file mode 100644
index 00000000000..e0c8278d488
--- /dev/null
+++ b/pkgs/os-specific/linux/iproute/1000-ubuntu-poc-fan-driver.patch
@@ -0,0 +1,65 @@
+Description: POC fan driver support
+ POC Fan driver support
+Author: Jay Vosburgh <jay.vosburgh@canonical.com>
+
+Index: iproute2-4.1.1/include/linux/if_tunnel.h
+===================================================================
+--- iproute2-4.1.1.orig/include/linux/if_tunnel.h
++++ iproute2-4.1.1/include/linux/if_tunnel.h
+@@ -57,6 +57,9 @@ enum {
+ 	IFLA_IPTUN_ENCAP_FLAGS,
+ 	IFLA_IPTUN_ENCAP_SPORT,
+ 	IFLA_IPTUN_ENCAP_DPORT,
++
++	IFLA_IPTUN_FAN_UNDERLAY = 32,
++
+ 	__IFLA_IPTUN_MAX,
+ };
+ #define IFLA_IPTUN_MAX	(__IFLA_IPTUN_MAX - 1)
+Index: iproute2-4.1.1/ip/link_iptnl.c
+===================================================================
+--- iproute2-4.1.1.orig/ip/link_iptnl.c
++++ iproute2-4.1.1/ip/link_iptnl.c
+@@ -66,6 +66,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;
+@@ -174,6 +175,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"))
+@@ -318,6 +322,9 @@ get_failed:
+ 		}
+ 	}
+ 
++	if (underlay)
++		addattr32(n, 1024, IFLA_IPTUN_FAN_UNDERLAY, underlay);
++
+ 	return 0;
+ }
+ 
+@@ -349,6 +356,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_r(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);