Hi,
I am having trouble applying a kernel patch that gives me 3 hunk failures. This is slightly difficult because the code in the patch is not under the GPL

So I have "masked" the code in the best way possible. If anyone could help me apply this patch i'd greatly appreciate it.
- George
I get the following output trying to apply the patch:
Code:
monster linux # patch -p0 < endhost-2.4.patch
patching file include/net/sock.h
Hunk #1 FAILED at 429.
1 out of 1 hunk FAILED -- saving rejects to file include/net/sock.h.rej
patching file include/net/tcp.h
Hunk #1 succeeded at 424 (offset 18 lines).
Hunk #2 succeeded at 435 (offset 18 lines).
Hunk #3 succeeded at 1560 (offset 108 lines).
patching file include/linux/tcp.h
patching file net/ipv4/tcp.c
Hunk #1 succeeded at 2401 (offset 8 lines).
patching file net/ipv4/tcp_input.c
Hunk #1 succeeded at 130 (offset 20 lines).
Hunk #2 succeeded at 276 (offset 20 lines).
Hunk #3 succeeded at 391 with fuzz 2 (offset -94 lines).
Hunk #4 succeeded at 909 (offset 204 lines).
Hunk #5 succeeded at 1270 (offset 204 lines).
Hunk #6 succeeded at 1318 (offset 208 lines).
Hunk #7 succeeded at 1619 (offset 208 lines).
Hunk #8 succeeded at 1649 (offset 221 lines).
Hunk #9 succeeded at 1694 (offset 224 lines).
Hunk #10 succeeded at 1796 with fuzz 2 (offset 225 lines).
Hunk #11 succeeded at 1936 (offset 225 lines).
Hunk #12 succeeded at 1988 (offset 225 lines).
Hunk #13 succeeded at 2138 with fuzz 1 (offset 288 lines).
Hunk #14 succeeded at 2572 (offset 523 lines).
Hunk #15 succeeded at 2875 with fuzz 2 (offset 752 lines).
Hunk #16 succeeded at 2931 (offset 754 lines).
Hunk #17 succeeded at 3037 (offset 754 lines).
Hunk #18 succeeded at 3966 (offset 754 lines).
patching file net/ipv4/tcp_output.c
Hunk #1 succeeded at 116 (offset 3 lines).
Hunk #2 FAILED at 227.
Hunk #3 succeeded at 574 (offset 16 lines).
1 out of 3 hunks FAILED -- saving rejects to file net/ipv4/tcp_output.c.rej
patching file net/ipv4/fp16.c
socket.h reject file:
Code:
monster linux # cat include/net/sock.h.rej
***************
*** 429,434 ****
__u32 frto_highmark; /* snd_nxt when RTO occurred */
unsigned long last_synq_overflow;
};
--- 429,452 ----
__u32 frto_highmark; /* snd_nxt when RTO occurred */
unsigned long last_synq_overflow;
+
+ #ifdef SOME_DEFINE
+ int blahblah;
+ struct a_structure {
+ int a_declaration;
+ ...........
+ .............
+
+ #define ANOTHER_DEFINE (0x7fff)
+ int some_more_declarations;
+ ................
+ ...............
+
+ ..........
+ .............
+ } a_struct;
+ #endif
+
};
net/ipv4/tcp_output.c reject file:
Code:
monster linux # cat net/ipv4/tcp_output.c.rej
***************
*** 226,231 ****
tcp_header_size += (TCPOLEN_SACK_BASE_ALIGNED +
(tp->eff_sacks * TCPOLEN_SACK_PERBLOCK));
}
th = (struct tcphdr *) skb_push(skb, tcp_header_size);
skb->h.th = th;
skb_set_owner_w(skb, sk);
--- 227,264 ----
tcp_header_size += (TCPOLEN_SACK_BASE_ALIGNED +
(tp->eff_sacks * TCPOLEN_SACK_PERBLOCK));
}
+ #ifdef A_DEFINE
+ if ((tp->blah_blah) && !(tcb->flags &
+ (TCPCB_FLAG_SYN | TCPCB_FLAG_FIN | TCPCB_FLAG_RST))) {
+ ......
+ ............
+ ............
+ ............
+ ............
+ ............
+ ............
+ ............
+ ............
+ }
+
+ /*
+ *............
+ * ............
+ * ............
+ * ............
+ *............
+ */
+ if (something_is_true &&
+ (more_is_true)) {
+ ............
+ ............
+ }
+ /* ............
+ * ............
+ * ............
+ */
+ }
+ #endif
th = (struct tcphdr *) skb_push(skb, tcp_header_size);
skb->h.th = th;
skb_set_owner_w(skb, sk);
Sorry, that really sucked, bless the GPL :P