1. 01 4月, 2015 2 次提交
  2. 30 3月, 2015 1 次提交
  3. 21 3月, 2015 1 次提交
  4. 16 1月, 2014 1 次提交
  5. 11 12月, 2013 1 次提交
  6. 12 9月, 2013 1 次提交
  7. 04 8月, 2013 1 次提交
    • S
      fib_rules: fix suppressor names and default values · 73f5698e
      Stefan Tomanek 提交于
      This change brings the suppressor attribute names into line; it also changes
      the data types to provide a more consistent interface.
      
      While -1 indicates that the suppressor is not enabled, values >= 0 for
      suppress_prefixlen or suppress_ifgroup  reject routing decisions violating the
      constraint.
      
      This changes the previously presented behaviour of suppress_prefixlen, where a
      prefix length _less_ than the attribute value was rejected. After this change,
      a prefix length less than *or* equal to the value is considered a violation of
      the rule constraint.
      
      It also changes the default values for default and newly added rules (disabling
      any suppression for those).
      Signed-off-by: NStefan Tomanek <stefan.tomanek@wertarbyte.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      73f5698e
  8. 03 8月, 2013 1 次提交
  9. 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
  10. 04 11月, 2012 1 次提交
  11. 06 10月, 2012 1 次提交
  12. 02 4月, 2012 2 次提交
  13. 23 11月, 2011 1 次提交
  14. 01 11月, 2011 1 次提交
  15. 13 3月, 2011 1 次提交
  16. 17 10月, 2010 1 次提交
  17. 11 6月, 2010 1 次提交
  18. 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
  19. 14 4月, 2010 2 次提交
  20. 08 3月, 2010 1 次提交
  21. 18 1月, 2010 1 次提交
  22. 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
  23. 21 5月, 2009 1 次提交
  24. 18 5月, 2009 1 次提交
  25. 15 8月, 2008 1 次提交
  26. 11 4月, 2008 1 次提交
  27. 26 3月, 2008 1 次提交
  28. 25 3月, 2008 1 次提交
  29. 05 3月, 2008 2 次提交
  30. 04 3月, 2008 4 次提交