About this list Date view Thread view Subject view Author view Attachment view

From: John P. Eisenmenger (jpe_at_eisenmenger.org)
Date: Tue 25 Feb 2003 - 15:59:09 GMT


On Tue, 25 Feb 2003, Sam Vilain wrote:

> The attached patch is against the latest Alan Cox kernel (2.4.21-pre4-ac6;
> I needed it to get DMA working on my KT400 motherboard) + jacque's ctx16
> patch. It also applies against 2.4.20-ac2 + jacque's ctx16 patch; the
> three failed hunks and one instance of fuzz seem upon first inspection to
> be OK - and so the result will probably work, but I didn't test that.

It didn't patch cleanly when I attempted it. Looking at the rejects it
appears that some of them were attempts to patch defects that weren't
there. That is, the original file appeared to match the intent of the
patch. However the rejected patch for net/ipv4/udp.c just does not appear
to fit. Here is what I see:

REJECTED PATCH --------------------------------------------------------

root_at_john linux-2.4.20 # cat net/ipv4/udp.c.rej
***************
*** 233,249 ****
        struct sock *sk, *result = NULL;
        unsigned short hnum = ntohs(dport);
        int badness = -1;

        for(sk = udp_hash[hnum & (UDP_HTABLE_SIZE - 1)]; sk != NULL; sk =
sk->next) {
                if(sk->num == hnum && !ipv6_only_sock(sk)) {
- int score;
  #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
                        score = sk->family == PF_INET ? 1 : 0;
  #else
                        score = 1;
                        }else if (sk->ip_info != NULL){
                                if (udp_in_list (sk->ip_info,daddr)){
- score++;
                                }else{
                                        continue;
                                }
--- 233,249 ----
        struct sock *sk, *result = NULL;
        unsigned short hnum = ntohs(dport);
        int badness = -1;
+ int score;

        for(sk = udp_hash[hnum & (UDP_HTABLE_SIZE - 1)]; sk != NULL; sk =
sk->next) {
                if(sk->num == hnum && !ipv6_only_sock(sk)) {
  #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
                        score = sk->family == PF_INET ? 1 : 0;
  #else
                        score = 1;
                        }else if (sk->ip_info != NULL){
                                if (udp_in_list (sk->ip_info,daddr)){
+ score+=2;
                                }else{
                                        continue;
                                }

THAT PART OF net/ipv4/udp.c ----------------------------------------

        struct sock *sk, *result = NULL;
        unsigned short hnum = ntohs(dport);
        int badness = -1;

        for(sk = udp_hash[hnum & (UDP_HTABLE_SIZE - 1)]; sk != NULL; sk =
sk->next) {
                if(sk->num == hnum && !ipv6_only_sock(sk)) {
                        int score;
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
                        score = sk->family == PF_INET ? 1 : 0;
#else
                        score = 1;
#endif
                        if(sk->rcv_saddr) {

---------------------------------------------------------------------

Looking at the patch, it looks like a hunk of the file is missing, but
that doesn't make sense. All I know is "udp_in_list()" is only used once
around line 558 in my copy of net/ipv4/udp.c...

Weird.

Would it be possible for you to provide a complete set of diffs from
2.4.21-pre4-ac6 to ...+ctx16+your_patch? I think my runs of patch may be
failing in different ways that yours. That could explain the differences
I am seeing. I am using patch version patch-2.5.4-r4 under Gentoo Linux
(sys-devel/patch-2.5.4-r4 in emerge-ese).

-John

-- 
John P. Eisenmenger
jpe_at_eisenmenger.org


About this list Date view Thread view Subject view Author view Attachment view
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Tue 25 Feb 2003 - 16:25:06 GMT by hypermail 2.1.3