1
0
Fork 0
alistair23-linux/net/core
Stefan Tomanek 7764a45a8f fib_rules: add .suppress operation
This change adds a new operation to the fib_rules_ops struct; it allows the
suppression of routing decisions if certain criteria are not met by its
results.

The first implemented constraint is a minimum prefix length added to the
structures of routing rules. If a rule is added with a minimum prefix length
>0, only routes meeting this threshold will be considered. Any other (more
general) routing table entries will be ignored.

When configuring a system with multiple network uplinks and default routes, it
is often convinient to reference the main routing table multiple times - but
omitting the default route. Using this patch and a modified "ip" utility, this
can be achieved by using the following command sequence:

  $ ip route add table secuplink default via 10.42.23.1

  $ ip rule add pref 100            table main prefixlength 1
  $ ip rule add pref 150 fwmark 0xA table secuplink

With this setup, packets marked 0xA will be processed by the additional routing
table "secuplink", but only if no suitable route in the main routing table can
be found. By using a minimal prefixlength of 1, the default route (/0) of the
table "main" is hidden to packets processed by rule 100; packets traveling to
destinations with more specific routing entries are processed as usual.

Signed-off-by: Stefan Tomanek <stefan.tomanek@wertarbyte.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-07-31 17:27:17 -07:00
..
Makefile net: move procfs code to net/core/net-procfs.c 2013-02-19 00:51:10 -05:00
datagram.c net: rename include/net/ll_poll.h to include/net/busy_poll.h 2013-07-10 17:08:27 -07:00
dev.c net: add ndo to get id of physical port of the device 2013-07-30 17:31:24 -07:00
dev_addr_lists.c net/core: dev_mc_sync_multiple calls wrong helper 2013-05-31 16:56:56 -07:00
dev_ioctl.c net: fix kernel deadlock with interface rename and netdev name retrieval. 2013-06-26 13:42:54 -07:00
drop_monitor.c net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
dst.c net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
ethtool.c ethtool: fixed trailing statements in ethtool 2013-07-16 12:14:51 -07:00
fib_rules.c fib_rules: add .suppress operation 2013-07-31 17:27:17 -07:00
filter.c sock_diag: fix filter code sent to userspace 2013-06-10 22:23:32 -07:00
flow.c net: delete __cpuinit usage from all net files 2013-07-14 19:36:58 -04:00
flow_dissector.c flow_dissector: add support for IPPROTO_IPV6 2013-07-30 19:16:52 -07:00
gen_estimator.c net_sched: add 64bit rate estimators 2013-06-11 02:51:03 -07:00
gen_stats.c net_sched: add 64bit rate estimators 2013-06-11 02:51:03 -07:00
iovec.c Hoist memcpy_fromiovec/memcpy_toiovec into lib/ 2013-05-20 10:24:22 +09:30
link_watch.c net: make all team port device link events urgent 2013-06-13 02:31:41 -07:00
neighbour.c neighbour: fix a race in neigh_destroy() 2013-07-01 13:35:32 -07:00
net-procfs.c rps: selective flow shedding during softnet overflow 2013-05-20 13:48:04 -07:00
net-sysfs.c net: export physical port id via sysfs 2013-07-30 17:31:25 -07:00
net-sysfs.h xps: Add CONFIG_XPS 2010-11-28 18:24:14 -08:00
net-traces.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
net_namespace.c proc: Split the namespace stuff out into linux/proc_ns.h 2013-05-01 17:29:39 -04:00
netevent.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
netpoll.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-07-09 18:24:39 -07:00
netprio_cgroup.c net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
pktgen.c pktgen: add needed include file 2013-07-29 00:47:14 -07:00
request_sock.c tcp: fix a panic on UP machines in reqsk_fastopen_remove 2013-01-14 18:10:05 -05:00
rtnetlink.c rtnl: export physical port id via RT netlink 2013-07-30 17:31:24 -07:00
scm.c netprio_cgroup: remove task_struct parameter from sock_update_netprio() 2013-04-09 13:19:37 -04:00
secure_seq.c net: defer net_secret[] initialization 2013-04-29 15:14:02 -04:00
skbuff.c net: access page->private by using page_private 2013-07-12 16:10:34 -07:00
sock.c netem: Introduce skb_orphan_partial() helper 2013-07-31 14:59:49 -07:00
sock_diag.c sock_diag: fix filter code sent to userspace 2013-06-10 22:23:32 -07:00
stream.c net: add sk_stream_is_writeable() helper 2013-07-24 17:54:48 -07:00
sysctl_net_core.c net: rename busy poll socket op and globals 2013-07-10 17:08:27 -07:00
timestamping.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
user_dma.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
utils.c net: core: move mac_pton() to lib/net_utils.c 2013-06-05 12:00:27 -07:00