1. 03 8月, 2013 1 次提交
  2. 01 8月, 2013 2 次提交
    • H
      ipv6: fib6_rules should return exact return value · 46b3a421
      Hannes Frederic Sowa 提交于
      With the addition of the suppress operation
      (7764a45a ("fib_rules: add .suppress
      operation") we rely on accurate error reporting of the fib_rules.actions.
      
      fib6_rule_action always returned -EAGAIN in case we could not find a
      matching route and 0 if a rule was matched. This also included a match
      for blackhole or prohibited rule actions which could get suppressed by
      the new logic.
      
      So adapt fib6_rule_action to always return the correct error code as
      its counterpart fib4_rule_action does. This also fixes a possiblity of
      nullptr-deref where we don't find a table, thus rt == NULL. Because
      the condition rt != ip6_null_entry still holdes it seems we could later
      get a nullptr bug on dereference rt->dst.
      
      v2:
      a) Fixed a brain fart in the commit msg (the rule => a table, etc). No
         changes to the patch.
      
      Cc: Stefan Tomanek <stefan.tomanek@wertarbyte.de>
      Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
      Signed-off-by: NHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      46b3a421
    • S
      fib_rules: add .suppress operation · 7764a45a
      Stefan Tomanek 提交于
      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: NStefan Tomanek <stefan.tomanek@wertarbyte.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7764a45a
  3. 04 11月, 2012 1 次提交
  4. 06 10月, 2012 1 次提交
  5. 02 4月, 2012 2 次提交
  6. 23 11月, 2011 1 次提交
  7. 01 11月, 2011 1 次提交
  8. 13 3月, 2011 1 次提交
  9. 17 10月, 2010 1 次提交
  10. 11 6月, 2010 1 次提交
  11. 26 4月, 2010 2 次提交
    • P
      net: rtnetlink: decouple rtnetlink address families from real address families · 25239cee
      Patrick McHardy 提交于
      Decouple rtnetlink address families from real address families in socket.h to
      be able to add rtnetlink interfaces to code that is not a real address family
      without increasing AF_MAX/NPROTO.
      
      This will be used to add support for multicast route dumping from all tables
      as the proc interface can't be extended to support anything but the main table
      without breaking compatibility.
      
      This partialy undoes the patch to introduce independant families for routing
      rules and converts ipmr routing rules to a new rtnetlink family. Similar to
      that patch, values up to 127 are reserved for real address families, values
      above that may be used arbitrarily.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      25239cee
    • P
      net: fib_rules: mark arguments to fib_rules_register const and __net_initdata · 3d0c9c4e
      Patrick McHardy 提交于
      fib_rules_register() duplicates the template passed to it without modification,
      mark the argument as const. Additionally the templates are only needed when
      instantiating a new namespace, so mark them as __net_initdata, which means
      they can be discarded when CONFIG_NET_NS=n.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      3d0c9c4e
  12. 14 4月, 2010 2 次提交
  13. 08 3月, 2010 1 次提交
  14. 18 1月, 2010 1 次提交
  15. 04 12月, 2009 2 次提交
    • E
      net: Allow fib_rule_unregister to batch · e9c5158a
      Eric W. Biederman 提交于
      Refactor the code so fib_rules_register always takes a template instead
      of the actual fib_rules_ops structure that will be used.  This is
      required for network namespace support so 2 out of the 3 callers already
      do this, it allows the error handling to be made common, and it allows
      fib_rules_unregister to free the template for hte caller.
      
      Modify fib_rules_unregister to use call_rcu instead of syncrhonize_rcu
      to allw multiple namespaces to be cleaned up in the same rcu grace
      period.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e9c5158a
    • P
      net 04/05: fib_rules: allow to delete local rule · 5adef180
      Patrick McHardy 提交于
      commit d124356ce314fff22a047ea334379d5105b2d834
      Author: Patrick McHardy <kaber@trash.net>
      Date:   Thu Dec 3 12:16:35 2009 +0100
      
          net: fib_rules: allow to delete local rule
      
          Allow to delete the local rule and recreate it with a higher priority. This
          can be used to force packets with a local destination out on the wire instead
          of routing them to loopback. Additionally this patch allows to recreate rules
          with a priority of 0.
      
          Combined with the previous patch to allow oif classification, a socket can
          be bound to the desired interface and packets routed to the wire like this:
      
          # move local rule to lower priority
          ip rule add pref 1000 lookup local
          ip rule del pref 0
      
          # route packets of sockets bound to eth0 to the wire independant
          # of the destination address
          ip rule add pref 100 oif eth0 lookup 100
          ip route add default dev eth0 table 100
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5adef180
  16. 21 5月, 2009 1 次提交
  17. 18 5月, 2009 1 次提交
  18. 15 8月, 2008 1 次提交
  19. 11 4月, 2008 1 次提交
  20. 26 3月, 2008 1 次提交
  21. 25 3月, 2008 1 次提交
  22. 05 3月, 2008 2 次提交
  23. 04 3月, 2008 4 次提交
  24. 29 1月, 2008 5 次提交
  25. 11 11月, 2007 1 次提交
  26. 11 10月, 2007 1 次提交
  27. 08 6月, 2007 1 次提交