lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 09 Jun 2011 12:27:43 -0400
From:	Joe Buehler <aspam@....net>
To:	Ben Greear <greearb@...delatech.com>
CC:	Chris Friesen <chris.friesen@...band.com>, netdev@...r.kernel.org
Subject: Re: source route ignored in favor of local interface

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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ