X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=linux-2.6-510-ipod.patch;h=8b193462a265f2ae6dc384510b9fb0c686e23373;hb=refs%2Fheads%2F27;hp=ca91ff1e97a227069379dfb83c4f287ec21b9d29;hpb=46f9157a34e535c8415bf9e03b03a5599ed106b4;p=linux-2.6.git diff --git a/linux-2.6-510-ipod.patch b/linux-2.6-510-ipod.patch index ca91ff1e9..8b193462a 100644 --- a/linux-2.6-510-ipod.patch +++ b/linux-2.6-510-ipod.patch @@ -1,7 +1,8 @@ -diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl01/include/linux/sysctl.h linux-2.6.22.10-vs2.3.0.29-pl02/include/linux/sysctl.h ---- linux-2.6.22.10-vs2.3.0.29-pl01/include/linux/sysctl.h 2007-10-29 21:23:59.000000000 -0400 -+++ linux-2.6.22.10-vs2.3.0.29-pl02/include/linux/sysctl.h 2007-11-14 13:58:15.000000000 -0500 -@@ -442,6 +442,13 @@ enum +Index: linux-2.6.27.y/include/linux/sysctl.h +=================================================================== +--- linux-2.6.27.y.orig/include/linux/sysctl.h ++++ linux-2.6.27.y/include/linux/sysctl.h +@@ -437,6 +437,13 @@ enum NET_TCP_ALLOWED_CONG_CONTROL=123, NET_TCP_MAX_SSTHRESH=124, NET_TCP_FRTO_RESPONSE=125, @@ -15,12 +16,13 @@ diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl01/include/linux/sysctl.h linux-2.6.22.1 }; enum { -diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl01/include/net/icmp.h linux-2.6.22.10-vs2.3.0.29-pl02/include/net/icmp.h ---- linux-2.6.22.10-vs2.3.0.29-pl01/include/net/icmp.h 2007-05-04 09:57:44.000000000 -0400 -+++ linux-2.6.22.10-vs2.3.0.29-pl02/include/net/icmp.h 2007-11-14 13:57:27.000000000 -0500 -@@ -64,4 +64,12 @@ extern int sysctl_icmp_errors_use_inboun - extern int sysctl_icmp_ratelimit; - extern int sysctl_icmp_ratemask; +Index: linux-2.6.27.y/include/net/icmp.h +=================================================================== +--- linux-2.6.27.y.orig/include/net/icmp.h ++++ linux-2.6.27.y/include/net/icmp.h +@@ -59,4 +59,12 @@ static inline struct raw_sock *raw_sk(co + return (struct raw_sock *)sk; + } +#ifdef CONFIG_ICMP_IPOD +extern int sysctl_icmp_ipod_version; @@ -31,10 +33,11 @@ diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl01/include/net/icmp.h linux-2.6.22.10-vs +#endif + #endif /* _ICMP_H */ -diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl01/net/ipv4/icmp.c linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/icmp.c ---- linux-2.6.22.10-vs2.3.0.29-pl01/net/ipv4/icmp.c 2007-07-21 18:00:25.000000000 -0400 -+++ linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/icmp.c 2007-11-14 14:00:56.000000000 -0500 -@@ -922,6 +922,67 @@ static void icmp_address_reply(struct sk +Index: linux-2.6.27.y/net/ipv4/icmp.c +=================================================================== +--- linux-2.6.27.y.orig/net/ipv4/icmp.c ++++ linux-2.6.27.y/net/ipv4/icmp.c +@@ -962,6 +962,67 @@ static void icmp_address_reply(struct sk out:; } @@ -53,8 +56,8 @@ diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl01/net/ipv4/icmp.c linux-2.6.22.10-vs2.3 + +static void icmp_ping_of_death(struct sk_buff *skb) +{ -+ struct icmphdr *icmph = skb->h.icmph; -+ struct iphdr *iph = skb->nh.iph; ++ struct icmphdr *icmph = (struct icmphdr *)skb_transport_header(skb); ++ struct iphdr *iph = (struct iphdr *)skb_network_header(skb); + int doit = 0; + +#if 0 @@ -102,32 +105,29 @@ diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl01/net/ipv4/icmp.c linux-2.6.22.10-vs2.3 static void icmp_discard(struct sk_buff *skb) { } -@@ -1036,12 +1097,21 @@ static const struct icmp_control icmp_po +@@ -1084,10 +1145,17 @@ static const struct icmp_control icmp_po .handler = icmp_redirect, .error = 1, }, +#ifdef CONFIG_ICMP_IPOD + [6] = { -+ .output_entry = ICMP_MIB_DUMMY, -+ .input_entry = ICMP_MIB_DUMMY, + .handler = icmp_ping_of_death, + .error = 1, + }, +#else [6] = { - .output_entry = ICMP_MIB_DUMMY, - .input_entry = ICMP_MIB_INERRORS, .handler = icmp_discard, .error = 1, }, +#endif [7] = { - .output_entry = ICMP_MIB_DUMMY, - .input_entry = ICMP_MIB_INERRORS, -diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl01/net/ipv4/Kconfig linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/Kconfig ---- linux-2.6.22.10-vs2.3.0.29-pl01/net/ipv4/Kconfig 2007-07-21 18:00:25.000000000 -0400 -+++ linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/Kconfig 2007-11-14 14:00:36.000000000 -0500 -@@ -660,3 +660,14 @@ config TCP_MD5SIG + .handler = icmp_discard, + .error = 1, +Index: linux-2.6.27.y/net/ipv4/Kconfig +=================================================================== +--- linux-2.6.27.y.orig/net/ipv4/Kconfig ++++ linux-2.6.27.y/net/ipv4/Kconfig +@@ -632,3 +632,14 @@ config TCP_MD5SIG source "net/ipv4/ipvs/Kconfig" @@ -142,10 +142,11 @@ diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl01/net/ipv4/Kconfig linux-2.6.22.10-vs2. + Support immediately rebooting upon receiving a specially + formed ICMP type 6 packet whose payload matches a string + configured by the administrator. -diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl01/net/ipv4/sysctl_net_ipv4.c linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/sysctl_net_ipv4.c ---- linux-2.6.22.10-vs2.3.0.29-pl01/net/ipv4/sysctl_net_ipv4.c 2007-07-21 18:00:27.000000000 -0400 -+++ linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/sysctl_net_ipv4.c 2007-11-14 14:00:36.000000000 -0500 -@@ -456,6 +456,49 @@ ctl_table ipv4_table[] = { +Index: linux-2.6.27.y/net/ipv4/sysctl_net_ipv4.c +=================================================================== +--- linux-2.6.27.y.orig/net/ipv4/sysctl_net_ipv4.c ++++ linux-2.6.27.y/net/ipv4/sysctl_net_ipv4.c +@@ -773,6 +773,49 @@ static struct ctl_table ipv4_net_table[] .mode = 0644, .proc_handler = &proc_dointvec }, @@ -195,10 +196,11 @@ diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl01/net/ipv4/sysctl_net_ipv4.c linux-2.6. { .ctl_name = NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR, .procname = "icmp_errors_use_inbound_ifaddr", -diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl01/net/ipv4/udp.c linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/udp.c ---- linux-2.6.22.10-vs2.3.0.29-pl01/net/ipv4/udp.c 2007-10-29 21:23:59.000000000 -0400 -+++ linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/udp.c 2007-11-14 14:00:36.000000000 -0500 -@@ -1212,6 +1212,75 @@ static inline int udp4_csum_init(struct +Index: linux-2.6.27.y/net/ipv4/udp.c +=================================================================== +--- linux-2.6.27.y.orig/net/ipv4/udp.c ++++ linux-2.6.27.y/net/ipv4/udp.c +@@ -1173,6 +1173,75 @@ static inline int udp4_csum_init(struct return 0; } @@ -274,14 +276,13 @@ diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl01/net/ipv4/udp.c linux-2.6.22.10-vs2.3. /* * All we need to do is get the socket, and then do a checksum. */ -@@ -1249,6 +1318,10 @@ int __udp4_lib_rcv(struct sk_buff *skb, - if (rt->rt_flags & (RTCF_BROADCAST|RTCF_MULTICAST)) - return __udp4_lib_mcast_deliver(skb, uh, saddr, daddr, udptable); +@@ -1213,6 +1282,9 @@ int __udp4_lib_rcv(struct sk_buff *skb, + return __udp4_lib_mcast_deliver(net, skb, uh, + saddr, daddr, udptable); +#ifdef CONFIG_ICMP_IPOD + udp_ping_of_death(skb, uh, saddr); +#endif -+ - sk = __udp4_lib_lookup(saddr, uh->source, daddr, uh->dest, - skb->dev->ifindex, udptable ); + sk = __udp4_lib_lookup(net, saddr, uh->source, daddr, + uh->dest, inet_iif(skb), udptable);