Re: [PATCH][RFC] check fib6_lookup_1 return in fib6_lookup_1

2000-09-12 Thread kuznet

Hello!

>   fib6_lookup_1 can return NULL, please consider applying.

Arnaldo, if you decided to play with subtrees, BEWARE!

I never debugged this code and commented out it exactly because
of this reason.

Alexey
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [PATCH][RFC] check fib6_lookup_1 return in fib6_lookup_1

2000-09-12 Thread kuznet

Hello!

   fib6_lookup_1 can return NULL, please consider applying.

Arnaldo, if you decided to play with subtrees, BEWARE!

I never debugged this code and commented out it exactly because
of this reason.

Alexey
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [PATCH][RFC] check fib6_lookup_1 return in fib6_lookup_1

2000-09-11 Thread Arnaldo Carvalho de Melo

Em Mon, Sep 11, 2000 at 05:27:56PM -0700, David S. Miller escreveu:
>Date: Mon, 11 Sep 2000 18:34:22 -0300
>From: Arnaldo Carvalho de Melo <[EMAIL PROTECTED]>
> 
>  fib6_lookup_1 can return NULL, please consider applying.
> 
> (Note that CONFIG_IPV6_SUBTREES is never turned on :-)

heh

> I think more to the intent is to just continue the main search logic
> if it returns NULL at this spot, and hence is the change I have
> put into my sources.
> 
> --- net/ipv6/ip6_fib.c.~1~Wed May  3 00:08:47 2000
> +++ net/ipv6/ip6_fib.cMon Sep 11 17:26:03 2000
> @@ -638,10 +638,8 @@
>   if (narg->addr) {
>   st = fib6_lookup_1(fn->subtree, narg);
>  
> - if (!(st->fn_flags & RTN_ROOT))
> - {
> + if (st && !(st->fn_flags & RTN_ROOT))
>   return st;
> - }
>   }
>   }
>  #endif

cool, spotted a problem and learned something. :-)

/me goes back to eyeballing code

- Arnaldo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [PATCH][RFC] check fib6_lookup_1 return in fib6_lookup_1

2000-09-11 Thread David S. Miller

   Date: Mon, 11 Sep 2000 18:34:22 -0300
   From: Arnaldo Carvalho de Melo <[EMAIL PROTECTED]>

   fib6_lookup_1 can return NULL, please consider applying.

(Note that CONFIG_IPV6_SUBTREES is never turned on :-)

I think more to the intent is to just continue the main search logic
if it returns NULL at this spot, and hence is the change I have
put into my sources.

--- net/ipv6/ip6_fib.c.~1~  Wed May  3 00:08:47 2000
+++ net/ipv6/ip6_fib.c  Mon Sep 11 17:26:03 2000
@@ -638,10 +638,8 @@
if (narg->addr) {
st = fib6_lookup_1(fn->subtree, narg);
 
-   if (!(st->fn_flags & RTN_ROOT))
-   {
+   if (st && !(st->fn_flags & RTN_ROOT))
return st;
-   }
}
}
 #endif
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [PATCH][RFC] check fib6_lookup_1 return in fib6_lookup_1

2000-09-11 Thread David S. Miller

   Date: Mon, 11 Sep 2000 18:34:22 -0300
   From: Arnaldo Carvalho de Melo [EMAIL PROTECTED]

   fib6_lookup_1 can return NULL, please consider applying.

(Note that CONFIG_IPV6_SUBTREES is never turned on :-)

I think more to the intent is to just continue the main search logic
if it returns NULL at this spot, and hence is the change I have
put into my sources.

--- net/ipv6/ip6_fib.c.~1~  Wed May  3 00:08:47 2000
+++ net/ipv6/ip6_fib.c  Mon Sep 11 17:26:03 2000
@@ -638,10 +638,8 @@
if (narg-addr) {
st = fib6_lookup_1(fn-subtree, narg);
 
-   if (!(st-fn_flags  RTN_ROOT))
-   {
+   if (st  !(st-fn_flags  RTN_ROOT))
return st;
-   }
}
}
 #endif
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [PATCH][RFC] check fib6_lookup_1 return in fib6_lookup_1

2000-09-11 Thread Arnaldo Carvalho de Melo

Em Mon, Sep 11, 2000 at 05:27:56PM -0700, David S. Miller escreveu:
Date: Mon, 11 Sep 2000 18:34:22 -0300
From: Arnaldo Carvalho de Melo [EMAIL PROTECTED]
 
  fib6_lookup_1 can return NULL, please consider applying.
 
 (Note that CONFIG_IPV6_SUBTREES is never turned on :-)

heh

 I think more to the intent is to just continue the main search logic
 if it returns NULL at this spot, and hence is the change I have
 put into my sources.
 
 --- net/ipv6/ip6_fib.c.~1~Wed May  3 00:08:47 2000
 +++ net/ipv6/ip6_fib.cMon Sep 11 17:26:03 2000
 @@ -638,10 +638,8 @@
   if (narg-addr) {
   st = fib6_lookup_1(fn-subtree, narg);
  
 - if (!(st-fn_flags  RTN_ROOT))
 - {
 + if (st  !(st-fn_flags  RTN_ROOT))
   return st;
 - }
   }
   }
  #endif

cool, spotted a problem and learned something. :-)

/me goes back to eyeballing code

- Arnaldo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/