1. 05 Feb, 2015 10 commits
    • Vadim Kochan's avatar
      ip netns: Allow exec on each netns · b13ba03f
      Vadim Kochan authored
      This change allows to exec some cmd on each
      named netns (except default) by specifying '-all' option:
      
          # ip -all netns exec ip link
      
      Each command executes synchronously.
      
      Exit status is not considered, so there might be a case
      that some CMD can fail on some netns but success on the other.
      
      EXAMPLES:
      
      1) Show link info on all netns:
      
      $ ip -all netns exec ip link
      
      netns: test_net
      1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN mode DEFAULT group default
          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
      4: tap0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 500
          link/ether 1a:19:6f:25:eb:85 brd ff:ff:ff:ff:ff:ff
      
      netns: home0
      1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN mode DEFAULT group default
          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
      4: tap0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 500
          link/ether ea:1a:59:40:d3:29 brd ff:ff:ff:ff:ff:ff
      
      netns: lan0
      1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN mode DEFAULT group default
          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
      4: tap0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 500
          link/ether ce:49:d5:46:81:ea brd ff:ff:ff:ff:ff:ff
      
      2) Set UP tap0 device for the all netns:
      
      $ ip -all netns exec ip link set dev tap0 up
      
      netns: test_net
      
      netns: home0
      
      netns: lan0
      Signed-off-by: default avatarVadim Kochan <vadim4j@gmail.com>
      b13ba03f
    • Vadim Kochan's avatar
      lib: Exec func on each netns · e998e118
      Vadim Kochan authored
      Added possibility to run some func on each netns.
      Signed-off-by: default avatarVadim Kochan <vadim4j@gmail.com>
      e998e118
    • Stephen Hemminger's avatar
      can: update kernel header · 4c7d75de
      Stephen Hemminger authored
      Sanitized header from upstream 3.20-rc kernel
      4c7d75de
    • Vadim Kochan's avatar
      ss: Unify inet sockets output · 8250bc9f
      Vadim Kochan authored
      Signed-off-by: default avatarVadim Kochan <vadim4j@gmail.com>
      8250bc9f
    • Vadim Kochan's avatar
      ss: Unify meminfo output · db08bdb8
      Vadim Kochan authored
      Signed-off-by: default avatarVadim Kochan <vadim4j@gmail.com>
      db08bdb8
    • Vadim Kochan's avatar
      tests: Add few 'ip link' related tests · 4cec9db0
      Vadim Kochan authored
      Added two tests which checks the following fixed issues:
      
          1) Bug when not possible add new virtual interface via:
      
              $ ip link add dev XXX type
      
             It was fixed a few releases ago.
      
          2) Crash on older kernels when VF rate info does not exist:
      
              $ ip link show
      
             Used dump file from William Dauchy <william@gandi.net>:
                 testsuite/tests/ip/link/dev_wo_vf_rate.nl
      
             So 'ip link show' replaced by 'ip -d monitor file ...' which does
             the same thing.
      
      Also added new func in testsuite/lib/generic.sh to gen new random dev name.
      
      Added 'clean' dependency on running all tests.
      Signed-off-by: default avatarVadim Kochan <vadim4j@gmail.com>
      4cec9db0
    • Vadim Kochan's avatar
      ss: Filter inet dgram sockets with established state by default · f42a4574
      Vadim Kochan authored
      As inet dgram sockets (udp, raw) can call connect(...)  - they
      might be set in ESTABLISHED state. So keep the original behaviour of
      'ss' which filtered them by ESTABLISHED state by default. So:
      
          $ ss -u
      
          or
      
          $ ss -w
      
      Will show only ESTABLISHED UDP sockets by default.
      Signed-off-by: default avatarVadim Kochan <vadim4j@gmail.com>
      f42a4574
    • Nicolas Dichtel's avatar
      lib: fix setns() function when !HAVE_SETNS · 1ff6b16e
      Nicolas Dichtel authored
      When HAVE_SETNS is not set, iproute2 provides a local implementation of this
      function based on __NR_setns.
      This macro is defined in sys/syscall.h, which was not included, thus the local
      implementation always returned -1.
      
      CC: Vadim Kochan <vadim4j@gmail.com>
      Fixes: eb67e449 ("lib: Add netns_switch func for change network namespace")
      Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      1ff6b16e
    • Nicolas Dichtel's avatar
      lib: fix warning in namespace.h · ffff6931
      Nicolas Dichtel authored
      Warning was:
      In file included from bridge.c:16:0:
      ../include/namespace.h:33:12: warning: ‘setns’ defined but not used [-Wunused-function]
      
      CC: Vadim Kochan <vadim4j@gmail.com>
      Fixes: eb67e449 ("lib: Add netns_switch func for change network namespace")
      Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      ffff6931
    • Reese Moore's avatar
      iproute2: ip-link.8.in: Spelling fixes · d36d9d41
      Reese Moore authored
      In the ip-link(8) man page, for the gretap, ip6gre, and ip6gretap types, the
      word tunnel was incorrectly spelled 'tuunel'.
      Signed-off-by: default avatarReese Moore <ram@vt.edu>
      d36d9d41
  2. 14 Jan, 2015 9 commits
  3. 07 Jan, 2015 4 commits
  4. 03 Jan, 2015 1 commit
  5. 01 Jan, 2015 4 commits
  6. 27 Dec, 2014 8 commits
    • Vadim Kochan's avatar
      tc: Allow to easy change network namespace · 67e1d73b
      Vadim Kochan authored
      Added new '-netns' option to simplify executing following cmd:
      
          ip netns exec NETNS tc OPTIONS COMMAND OBJECT
      
          to
      
          tc -n[etns] NETNS OPTIONS COMMAND OBJECT
      
      e.g.:
      
          tc -net vnet0 qdisc
      Signed-off-by: default avatarVadim Kochan <vadim4j@gmail.com>
      Signed-off-by: default avatarJiri Pirko <jiri@resnulli.us>
      67e1d73b
    • Vadim Kochan's avatar
      bridge: Allow to easy change network namespace · 527910c8
      Vadim Kochan authored
      Added new '-netns' option to simplify executing following cmd:
      
          ip netns exec NETNS bridge OPTIONS COMMAND OBJECT
      
          to
      
          bridge -n[etns] NETNS OPTIONS COMMAND OBJECT
      
      e.g.:
      
          bridge -net vnet0 fdb
      Signed-off-by: default avatarVadim Kochan <vadim4j@gmail.com>
      Signed-off-by: default avatarJiri Pirko <jiri@resnulli.us>
      527910c8
    • Vadim Kochan's avatar
      ip: Allow to easy change network namespace · 52700d40
      Vadim Kochan authored
      Added new '-netns' option to simplify executing following cmd:
      
          ip netns exec NETNS ip OPTIONS COMMAND OBJECT
      
          to
      
          ip -n[etns] NETNS OPTIONS COMMAND OBJECT
      
      e.g.:
      
          ip -net vnet0 link add br0 type bridge
          ip -n vnet0 link
      Signed-off-by: default avatarVadim Kochan <vadim4j@gmail.com>
      Signed-off-by: default avatarJiri Pirko <jiri@resnulli.us>
      52700d40
    • Vadim Kochan's avatar
      lib: Add netns_switch func for change network namespace · eb67e449
      Vadim Kochan authored
      New netns_switch func moved to the lib/namespace.c from ip/ipnetns.c
      so it can be used from the other tools for fast switching
      network namespace.
      Signed-off-by: default avatarVadim Kochan <vadim4j@gmail.com>
      Signed-off-by: default avatarJiri Pirko <jiri@resnulli.us>
      eb67e449
    • Vadim Kochan's avatar
      ss: Use rtnl_dump_filter for inet_show_netlink · 486ccd99
      Vadim Kochan authored
      Just another refactoring for ss to use rtnl API from lib
      Signed-off-by: default avatarVadim Kochan <vadim4j@gmail.com>
      486ccd99
    • Vadim Kochan's avatar
      417b2180
    • Vadim Kochan's avatar
      tc class: Show classes as ASCII graph · d954b34a
      Vadim Kochan authored
      Added new '-g[raph]' option which shows classes in the graph view.
      
      Meanwhile only generic stats info output is supported.
      
      e.g.:
      
      $ tc/tc -g class show dev tap0
      +---(1:2) htb rate 6Mbit ceil 6Mbit burst 15Kb cburst 1599b
      |    +---(1:40) htb prio 0 rate 5Mbit ceil 5Mbit burst 15Kb cburst 1600b
      |    +---(1:50) htb rate 3Mbit ceil 6Mbit burst 15Kb cburst 1599b
      |    |    +---(1:51) htb prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
      |    |
      |    +---(1:60) htb prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
      |
      +---(1:1) htb rate 6Mbit ceil 6Mbit burst 15Kb cburst 1599b
           +---(1:10) htb prio 0 rate 5Mbit ceil 5Mbit burst 15Kb cburst 1600b
           +---(1:20) htb prio 0 rate 3Mbit ceil 6Mbit burst 15Kb cburst 1599b
           +---(1:30) htb prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
      
      $ tc/tc -g -s class show dev tap0
      +---(1:2) htb rate 6Mbit ceil 6Mbit burst 15Kb cburst 1599b
      |    |    Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
      |    |    rate 0bit 0pps backlog 0b 0p requeues 0
      |    |
      |    +---(1:40) htb prio 0 rate 5Mbit ceil 5Mbit burst 15Kb cburst 1600b
      |    |          Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
      |    |          rate 0bit 0pps backlog 0b 0p requeues 0
      |    |
      |    +---(1:50) htb rate 3Mbit ceil 6Mbit burst 15Kb cburst 1599b
      |    |    |     Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
      |    |    |     rate 0bit 0pps backlog 0b 0p requeues 0
      |    |    |
      |    |    +---(1:51) htb prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
      |    |               Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
      |    |               rate 0bit 0pps backlog 0b 0p requeues 0
      |    |
      |    +---(1:60) htb prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
      |               Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
      |               rate 0bit 0pps backlog 0b 0p requeues 0
      |
      +---(1:1) htb rate 6Mbit ceil 6Mbit burst 15Kb cburst 1599b
           |    Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
           |    rate 0bit 0pps backlog 0b 0p requeues 0
           |
           +---(1:10) htb prio 0 rate 5Mbit ceil 5Mbit burst 15Kb cburst 1600b
           |          Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
           |          rate 0bit 0pps backlog 0b 0p requeues 0
           |
           +---(1:20) htb prio 0 rate 3Mbit ceil 6Mbit burst 15Kb cburst 1599b
           |          Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
           |          rate 0bit 0pps backlog 0b 0p requeues 0
           |
           +---(1:30) htb prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
                      Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
                      rate 0bit 0pps backlog 0b 0p requeues 0
      Signed-off-by: default avatarVadim Kochan <vadim4j@gmail.com>
      d954b34a
    • Heiner Kallweit's avatar
      ip: extend "ip-address" man page to reflect the recent flag extensions · 18c8bbe3
      Heiner Kallweit authored
      Extend "ip-address" man page to reflect the recent extension of
      allowing to list addresses with flags tentative, deprecated, dadfailed
      not being set.
      Signed-off-by: default avatarHeiner Kallweit <heiner.kallweit@web.de>
      18c8bbe3
  7. 24 Dec, 2014 4 commits