From: Joe Buehler <aspam@cox•net>
To: Ben Greear <greearb@candelatech•com>
Cc: Chris Friesen <chris.friesen@genband•com>, netdev@vger•kernel.org
Subject: Re: source route ignored in favor of local interface
Date: Thu, 09 Jun 2011 12:27:43 -0400 [thread overview]
Message-ID: <4DF0F47F.1080502@cox.net> (raw)
In-Reply-To: <4D6E928D.6030806@candelatech.com>
Ben Greear wrote:
> You can do this on more modern kernels (2.6.36 and later definately
> works..not sure
> about earlier).
>
> ip rule add pref 512 lookup local
> ip rule del pref 0 lookup local
>
The kernel change for this in later kernels was simple enough -- there
is a flag that prevents deletion of the "local" table rule, just remove
the flag. Here is a patch for 2.6.24.7. The patch for 2.6.27.7 (I am
using both versions) is almost the same.
--- old/net/ipv4/fib_rules.c 2008-01-24 17:58:37.000000000 -0500
+++ new/net/ipv4/fib_rules.c 2011-06-08 14:01:19.000000000 -0400
@@ -297,7 +297,7 @@
int err;
err = fib_default_rule_add(&fib4_rules_ops, 0,
- RT_TABLE_LOCAL, FIB_RULE_PERMANENT);
+ RT_TABLE_LOCAL, 0);
if (err < 0)
return err;
err = fib_default_rule_add(&fib4_rules_ops, 0x7FFE,
--- old/net/ipv6/fib6_rules.c 2008-01-24 17:58:37.000000000 -0500
+++ new/net/ipv6/fib6_rules.c 2011-06-08 14:01:34.000000000 -0400
@@ -256,7 +256,7 @@
int err;
err = fib_default_rule_add(&fib6_rules_ops, 0,
- RT6_TABLE_LOCAL, FIB_RULE_PERMANENT);
+ RT6_TABLE_LOCAL, 0);
if (err < 0)
return err;
err = fib_default_rule_add(&fib6_rules_ops, 0x7FFE, RT6_TABLE_MAIN, 0);
Joe Buehler
prev parent reply other threads:[~2011-06-09 16:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-01 14:57 source route ignored in favor of local interface Joe Buehler
2011-03-01 19:05 ` Chris Friesen
2011-03-01 19:31 ` Joe Buehler
2011-03-02 18:55 ` Ben Greear
2011-06-09 16:27 ` Joe Buehler [this message]
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=4DF0F47F.1080502@cox.net \
--to=aspam@cox$(echo .)net \
--cc=chris.friesen@genband$(echo .)com \
--cc=greearb@candelatech$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
/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