public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Ville Nuorvala <vnuorval@tcs•hut.fi>
To: David Miller <davem@davemloft•net>
Cc: tgraf@suug•ch, netdev@vger•kernel.org
Subject: Re: [PATCH][IPV6]: Make sure fib6_rule_lookup doesn't return NULL
Date: Wed, 09 Aug 2006 09:31:15 +0300	[thread overview]
Message-ID: <44D98133.8040707@tcs.hut.fi> (raw)
In-Reply-To: <20060808.164345.91207648.davem@davemloft.net>

David Miller wrote:
> From: Thomas Graf <tgraf@suug•ch>
> Date: Wed, 9 Aug 2006 00:16:51 +0200
> 
>> * Ville Nuorvala <vnuorval@tcs•hut.fi> 2006-08-09 01:05
>>>     [IPV6]: Make sure fib6_rule_lookup doesn't return NULL
>>>     
>>>     The callers of fib6_rule_lookup don't expect it to return NULL,
>>>     therefore it must return ip6_null_entry whenever fib_rule_lookup fails.
>>>     
>>>     Signed-off-by: Ville Nuorvala <vnuorval@tcs•hut.fi>
>> I think it would be a lot cleaner to return an error code
>> like fib_lookup() and save the atomic operations. We only
>> destroy the dst again anyway in case of a failure.
> 
> Yes, the current scheme is a poor substitute for IS_ERR/PTR_ERR.

But the ip6_null_entry not always discarded after a failed route lookup!
On a forwarding router it triggers the ICMPv6 Destination Unreachable
message to the sender.

Regards,
Ville

  reply	other threads:[~2006-08-09  6:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-08 22:05 [PATCH][IPV6]: Make sure fib6_rule_lookup doesn't return NULL Ville Nuorvala
2006-08-08 22:16 ` Thomas Graf
2006-08-08 23:43   ` David Miller
2006-08-09  6:31     ` Ville Nuorvala [this message]
2006-08-09  6:34       ` David Miller
2006-08-09  8:36         ` Ville Nuorvala
2006-08-09  9:23           ` Thomas Graf
2006-08-09  9:42             ` Ville Nuorvala
2006-08-09  9:48               ` Thomas Graf
2006-08-09 10:45                 ` Ville Nuorvala

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44D98133.8040707@tcs.hut.fi \
    --to=vnuorval@tcs$(echo .)hut.fi \
    --cc=davem@davemloft$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=tgraf@suug$(echo .)ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox