netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: joe@perches.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 08/15] ipv4: Kill routes during PMTU/redirect updates.
Date: Wed, 18 Jul 2012 12:30:15 -0700 (PDT)	[thread overview]
Message-ID: <20120718.123015.476222169838022819.davem@davemloft.net> (raw)
In-Reply-To: <1342638944.2013.10.camel@joe2Laptop>

From: Joe Perches <joe@perches.com>
Date: Wed, 18 Jul 2012 12:15:44 -0700

> On Wed, 2012-07-18 at 11:23 -0700, David Miller wrote:
>> Mark them obsolete so there will be a re-lookup to fetch the
>> FIB nexthop exception info.
> []
>> diff --git a/net/ipv4/route.c b/net/ipv4/route.c
> []
>> @@ -716,8 +717,8 @@ static void __ip_do_redirect(struct rtable *rt, struct sk_buff *skb, struct flow
>>  					fnhe->fnhe_gw = new_gw;
>>  				spin_unlock_bh(&fnhe_lock);
>>  			}
>> -			rt->rt_gateway = new_gw;
>> -			rt->rt_flags |= RTCF_REDIRECTED;
>> +			if (kill_route)
>> +				rt->dst.obsolete = -2;
> 
> Perhaps -2 should be a #define?
> 
> Perhaps struct dst_entry.obsolete could be a char instead of
> a short and a pad byte could added for some future use.

First thing, char is not signed by default on all systems :-)

But yes, this should be cleaned up.  Also with a big fat comment above
the struct member detailing it's usage.

I'll put this on my TODO list, thanks a lot Joe.

  reply	other threads:[~2012-07-18 19:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-18 18:23 [PATCH 08/15] ipv4: Kill routes during PMTU/redirect updates David Miller
2012-07-18 19:15 ` Joe Perches
2012-07-18 19:30   ` David Miller [this message]
2012-07-18 19:51     ` Joe Perches

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=20120718.123015.476222169838022819.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=joe@perches.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).