1. 15 Feb, 2017 2 commits
  2. 14 Feb, 2017 3 commits
  3. 13 Jan, 2017 2 commits
  4. 11 Jan, 2017 1 commit
  5. 07 Jan, 2017 1 commit
  6. 06 Jan, 2017 1 commit
  7. 04 Jan, 2017 1 commit
  8. 03 Jan, 2017 9 commits
  9. 23 Dec, 2016 1 commit
  10. 15 Dec, 2016 2 commits
  11. 14 Dec, 2016 1 commit
  12. 11 Dec, 2016 1 commit
    • Chris Luke's avatar
      Add support for GRE over IPv6 (#320) · e8ee4a29
      Chris Luke authored
      'ip6gre' is implemented in the kernel using the same IFLA_GRE_XXX
      fields as GRE over IPv4, but with IPv6 instead of IPv4 addresses
      in the 'local' and 'remote' slots.
      This patch adds an NLA map for ip6gre with the appropriate support.
      Since the field names would conflict with the existing IFLA_GRE
      ones, these new items are prefixed IFLA_IP6GRE instead.
      I did experiment with using the same, existing, NLA map for both
      address families. Unfortunately the 'target' type requires the address
      family to be specified in both directions; to and from the kernel.
      This can be achieved when creating GRE links; however the only way
      I see of reconstructing the addresses from the kernel is to add a
      heuristic to the 'target' type to guess the family; this did not
      feel like the correct approach.
      In the end, the approach in this patch using new IFLA_IP6GRE NLA
      entries appears the cleaner of the two.
  13. 10 Dec, 2016 1 commit
  14. 09 Dec, 2016 2 commits
  15. 24 Nov, 2016 2 commits
  16. 18 Nov, 2016 2 commits
  17. 15 Nov, 2016 2 commits
  18. 10 Nov, 2016 1 commit
  19. 08 Nov, 2016 1 commit
    • MXAmin's avatar
      tc: fix HTB QDisc generation with default arguments · f32baf46
      MXAmin authored
      When we call `tc` function for creating the HTB QDisc with NO kwargs,
      the kernel will return error 22 (invalid argument)::
      	 ip.tc("add", "htb", eth0, 0x10000)
      	 pyroute2.netlink.exceptions.NetlinkError: (22, 'Invalid argument')
      As you can see by calling the `tc` function without any additional
      arguments (we only defined `command`, `kind`, `index` and `handle`
      arguments) the module will raise `NetlinkError`; reason: according to
      'net/sched/sch_htb.c' of linux kernel source code, to create a HTB
      QDisc we also need to define `direct_pkts`, `rate2quantum` and
      `defcls` which is not defined by default (the function `get_parameters`
      is responsible for providing these default arguments which WON'T be
      called unless we have at least ONE argument in kwargs.
      Bug-Url: https://github.com/svinota/pyroute2/pull/308
  20. 06 Nov, 2016 4 commits
    • Italo Cunha's avatar
      Add unit test for IPaddrSet ordering · 62de83cd
      Italo Cunha authored
      Test IP addresses are added to the kernel in the order in which they
      were added to an interface.  Also checks whether addresses are stored
      in the same order as they are retrieved from the kernel.
    • Italo Cunha's avatar
      Add sort_addresses option to IPDB · 91ecc783
      Italo Cunha authored
      This commit adds a sort_addresses parameter to IPDB.  If set to
      True, then IPDB will use SortedIPaddrSet instead of IPaddrSet to
      keep addresses sorted.  Sorting IP addresses is optional because
      SortedIPaddrSet incurs CPU overhead as its iterators are not
    • Italo Cunha's avatar
      Add function to reload interface addresses · 7727cc9e
      Italo Cunha authored
      IPDB caches addresses on interfaces.  This function reloads all
      addresses from the kernel.  This also lets `pyroute2` reload the
      order primary and secondary addresses on interfaces.
    • Italo Cunha's avatar
      Sort addresses in IPaddrSet · 39080516
      Italo Cunha authored
      Primary and secondary addresses depend on the order in which they
      are added to an interface [1] .  This commit makes pyroute2 add IP
      addresses in the same order Interface.add_ip is called.
      This is achieved by changing LinkedSet.raw from a plain dict to an
      OrderedDict and by reimplementing the set operators to preserve
       [1] iproute2 docs: http://baturin.org/docs/iproute2/#Notes