⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 policy-sleep-2.6.13.1-v3.patch

📁 Host Identity Protocol on Linux is an implemetation of the Host Identity Protocol (HIP) and the rela
💻 PATCH
字号:
diff -urN linux-2.6.13.1/include/linux/xfrm.h linux-2.6.13.1-sleep/include/linux/xfrm.h--- linux-2.6.13.1/include/linux/xfrm.h	2005-09-10 05:42:58.000000000 +0300+++ linux-2.6.13.1-sleep/include/linux/xfrm.h	2006-01-26 11:03:18.000000000 +0200@@ -263,4 +263,10 @@ #define XFRMGRP_SA		4 #define XFRMGRP_POLICY		8 +/* Transport layer flag  passed to xfrm_lookup. If set, the userspace+   process sleeps in a waitqueue until key management daemon has +   finished setting up security associations. This workaround exists +   until we have queues for outgoing IPsec packets. */+#define XFRM_LOOKUP_DEFAULT_FLAGS 1+ #endif /* _LINUX_XFRM_H */diff -urN linux-2.6.13.1/net/ipv4/route.c linux-2.6.13.1-sleep/net/ipv4/route.c--- linux-2.6.13.1/net/ipv4/route.c	2005-09-10 05:42:58.000000000 +0300+++ linux-2.6.13.1-sleep/net/ipv4/route.c	2006-01-26 11:03:18.000000000 +0200@@ -2620,7 +2620,7 @@  int ip_route_output_key(struct rtable **rp, struct flowi *flp) {-	return ip_route_output_flow(rp, flp, NULL, 0);+	return ip_route_output_flow(rp, flp, NULL, XFRM_LOOKUP_DEFAULT_FLAGS); }  static int rt_fill_info(struct sk_buff *skb, u32 pid, u32 seq, int event,diff -urN linux-2.6.13.1/net/ipv4/tcp_ipv4.c linux-2.6.13.1-sleep/net/ipv4/tcp_ipv4.c--- linux-2.6.13.1/net/ipv4/tcp_ipv4.c	2005-09-10 05:42:58.000000000 +0300+++ linux-2.6.13.1-sleep/net/ipv4/tcp_ipv4.c	2006-01-26 11:03:18.000000000 +0200@@ -1277,7 +1277,7 @@ 				       { .sport = inet_sk(sk)->sport, 					 .dport = ireq->rmt_port } } }; -	if (ip_route_output_flow(&rt, &fl, sk, 0)) {+	if (ip_route_output_flow(&rt, &fl, sk, XFRM_LOOKUP_DEFAULT_FLAGS)) { 		IP_INC_STATS_BH(IPSTATS_MIB_OUTNOROUTES); 		return NULL; 	}@@ -1920,7 +1920,7 @@ 					       { .sport = inet->sport, 						 .dport = inet->dport } } }; 						-		err = ip_route_output_flow(&rt, &fl, sk, 0);+		err = ip_route_output_flow(&rt, &fl, sk, XFRM_LOOKUP_DEFAULT_FLAGS); 	} 	if (!err) { 		__sk_dst_set(sk, &rt->u.dst);diff -urN linux-2.6.13.1/net/ipv6/datagram.c linux-2.6.13.1-sleep/net/ipv6/datagram.c--- linux-2.6.13.1/net/ipv6/datagram.c	2005-09-10 05:42:58.000000000 +0300+++ linux-2.6.13.1-sleep/net/ipv6/datagram.c	2006-01-26 11:04:04.000000000 +0200@@ -23,6 +23,7 @@ #include <linux/in6.h> #include <linux/ipv6.h> #include <linux/route.h>+#include <linux/xfrm.h>  #include <net/ipv6.h> #include <net/ndisc.h>@@ -174,7 +175,7 @@ 	if (final_p) 		ipv6_addr_copy(&fl.fl6_dst, final_p); -	if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) {+	if ((err = xfrm_lookup(&dst, &fl, sk, XFRM_LOOKUP_DEFAULT_FLAGS)) < 0) { 		dst_release(dst); 		goto out; 	}diff -urN linux-2.6.13.1/net/ipv6/icmp.c linux-2.6.13.1-sleep/net/ipv6/icmp.c--- linux-2.6.13.1/net/ipv6/icmp.c	2005-09-10 05:42:58.000000000 +0300+++ linux-2.6.13.1-sleep/net/ipv6/icmp.c	2006-01-26 11:03:42.000000000 +0200@@ -50,6 +50,7 @@ #include <linux/inet.h> #include <linux/netdevice.h> #include <linux/icmpv6.h>+#include <linux/xfrm.h>  #include <net/ip.h> #include <net/sock.h>@@ -375,7 +376,7 @@ 	err = ip6_dst_lookup(sk, &dst, &fl); 	if (err) 		goto out;-	if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0)+	if ((err = xfrm_lookup(&dst, &fl, sk, XFRM_LOOKUP_DEFAULT_FLAGS)) < 0) 		goto out_dst_release;  	if (ipv6_addr_is_multicast(&fl.fl6_dst))@@ -466,7 +467,7 @@ 	err = ip6_dst_lookup(sk, &dst, &fl); 	if (err) 		goto out;-	if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0)+	if ((err = xfrm_lookup(&dst, &fl, sk, XFRM_LOOKUP_DEFAULT_FLAGS)) < 0) 		goto out_dst_release;  	if (ipv6_addr_is_multicast(&fl.fl6_dst))diff -urN linux-2.6.13.1/net/ipv6/tcp_ipv6.c linux-2.6.13.1-sleep/net/ipv6/tcp_ipv6.c--- linux-2.6.13.1/net/ipv6/tcp_ipv6.c	2005-09-10 05:42:58.000000000 +0300+++ linux-2.6.13.1-sleep/net/ipv6/tcp_ipv6.c	2006-01-26 11:04:45.000000000 +0200@@ -771,7 +771,7 @@ 	if (final_p) 		ipv6_addr_copy(&fl.fl6_dst, final_p); -	if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) {+	if ((err = xfrm_lookup(&dst, &fl, sk, XFRM_LOOKUP_DEFAULT_FLAGS)) < 0) { 		dst_release(dst); 		goto failure; 	}@@ -895,7 +895,7 @@ 				goto out; 			} -			if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) {+			if ((err = xfrm_lookup(&dst, &fl, sk, XFRM_LOOKUP_DEFAULT_FLAGS)) < 0) { 				sk->sk_err_soft = -err; 				goto out; 			}@@ -1007,7 +1007,7 @@ 			goto done; 		if (final_p) 			ipv6_addr_copy(&fl.fl6_dst, final_p);-		if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0)+		if ((err = xfrm_lookup(&dst, &fl, sk, XFRM_LOOKUP_DEFAULT_FLAGS)) < 0) 			goto done; 	} @@ -1139,7 +1139,7 @@ 	/* sk = NULL, but it is safe for now. RST socket required. */ 	if (!ip6_dst_lookup(NULL, &buff->dst, &fl)) { -		if ((xfrm_lookup(&buff->dst, &fl, NULL, 0)) < 0) {+		if ((xfrm_lookup(&buff->dst, &fl, NULL, XFRM_LOOKUP_DEFAULT_FLAGS)) < 0) { 			dst_release(buff->dst); 			return; 		}@@ -1206,7 +1206,7 @@ 	fl.fl_ip_sport = t1->source;  	if (!ip6_dst_lookup(NULL, &buff->dst, &fl)) {-		if ((xfrm_lookup(&buff->dst, &fl, NULL, 0)) < 0) {+		if ((xfrm_lookup(&buff->dst, &fl, NULL, XFRM_LOOKUP_DEFAULT_FLAGS)) < 0) { 			dst_release(buff->dst); 			return; 		}@@ -1459,7 +1459,7 @@ 		if (final_p) 			ipv6_addr_copy(&fl.fl6_dst, final_p); -		if ((xfrm_lookup(&dst, &fl, sk, 0)) < 0)+		if ((xfrm_lookup(&dst, &fl, sk, XFRM_LOOKUP_DEFAULT_FLAGS)) < 0) 			goto out; 	}  @@ -1867,7 +1867,7 @@ 		if (final_p) 			ipv6_addr_copy(&fl.fl6_dst, final_p); -		if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) {+		if ((err = xfrm_lookup(&dst, &fl, sk, XFRM_LOOKUP_DEFAULT_FLAGS)) < 0) { 			sk->sk_err_soft = -err; 			dst_release(dst); 			return err;@@ -1920,7 +1920,7 @@ 		if (final_p) 			ipv6_addr_copy(&fl.fl6_dst, final_p); -		if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) {+		if ((err = xfrm_lookup(&dst, &fl, sk, XFRM_LOOKUP_DEFAULT_FLAGS)) < 0) { 			sk->sk_route_caps = 0; 			dst_release(dst); 			return err;diff -urN linux-2.6.13.1/net/ipv6/udp.c linux-2.6.13.1-sleep/net/ipv6/udp.c--- linux-2.6.13.1/net/ipv6/udp.c	2005-09-10 05:42:58.000000000 +0300+++ linux-2.6.13.1-sleep/net/ipv6/udp.c	2006-01-26 11:03:18.000000000 +0200@@ -799,7 +799,7 @@ 	if (final_p) 		ipv6_addr_copy(&fl->fl6_dst, final_p); -	if ((err = xfrm_lookup(&dst, fl, sk, 0)) < 0) {+	if ((err = xfrm_lookup(&dst, fl, sk, XFRM_LOOKUP_DEFAULT_FLAGS)) < 0) { 		dst_release(dst); 		goto out; 	}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -