This is not a bug report, but a feature request. routing policy database management is supported since linux 2.2, but it lacks u32 selector (matching by IP protocols, transport ports). fwmark is a workaround for this missing feature, but source ip address selection will not work anyway: the mark value can't be used for source address selection because at the time source address selection is performed, there is no packet yet and thus no mark value.
Reply-To: akpm@linux-foundation.org On Thu, 17 Jan 2008 00:30:49 -0800 (PST) bugme-daemon@bugzilla.kernel.org wrote: > http://bugzilla.kernel.org/show_bug.cgi?id=9767 > > Summary: missing native u32 classifier for routing policy > Product: Networking > Version: 2.5 > KernelVersion: all since 2.2 > Platform: All > OS/Version: Linux > Tree: Mainline > Status: NEW > Severity: low > Priority: P1 > Component: IPV4 > AssignedTo: shemminger@linux-foundation.org > ReportedBy: pupilla@hotmail.com > > > This is not a bug report, but a feature request. > routing policy database management is supported since linux 2.2, but it lacks > u32 selector (matching by IP protocols, transport ports). > fwmark is a workaround for this missing feature, but source ip address > selection will not work anyway: the mark value can't be used for source > address > selection because at the time source address selection is performed, there is > no packet yet and thus no mark value. >
This can not be done since routes are cached and the cache needs to use the same keys as the routing rules for the lookup.
I was talking with Jamal about this and he suggested to move this stuff to tc action level. Something like: tc filter add dev lo parent ffff: protocol ip prio 10 u32 \ match ip dport 80 0xffff flowid 1:10 \ action reroute|policyroute to table http-routing-table
This is not a bug. Pls discuss enhancements on mailing list instead <netdev@vger.kernel.org>