1. 25 Jun, 2015 9 commits
    • Mazhar Rana's avatar
      mroute: "ip mroute show" not working when "to" and/or "from" is given · 45b01c46
      Mazhar Rana authored
      The command "ip mroute show" is not showing routes when "to" and/or "from"
      filter is applied.
      
      root@mazhar:~# ip mroute show
      (10.202.30.101, 235.1.2.3)       Iif: eth0       Oifs: eth1
      
      But When I applied filter, it does not show anything.
      
      root@mazhar:~# ip mroute show 235.1.2.3 from 10.202.30.101
      root@mazhar:~#
      Signed-off-by: default avatarMazhar Rana <ranamazharp@gmail.com>
      45b01c46
    • Thadeu Lima de Souza Cascardo's avatar
      Fix changing tunnel remote and local address to any · 4e4b7832
      Thadeu Lima de Souza Cascardo authored
      If a tunnel is created with a local address, you can't change it to any.
      
       # ip tunnel add tunl1 mode ipip remote 10.16.42.37 local 10.16.42.214 ttl 64
       # ip tunnel show tunl1
       tunl1: ip/ip  remote 10.16.42.37  local 10.16.42.214  ttl 64
       # ip tunnel change tunl1 local any
       # echo $?
       0
       # ip tunnel show tunl1
       tunl1: ip/ip  remote 10.16.42.37  local 10.16.42.214  ttl 64
      
      It happens that parse_args zeroes ip_tunnel_parm, and when creating the
      tunnel, it is OK to leave it as is if the address is any. However, when
      changing the tunnel, the current parameters will be read from
      ip_tunnel_parm, and local and remote address won't be zeroes anymore, so
      it needs to be explicitly set to any.
      Signed-off-by: default avatarThadeu Lima de Souza Cascardo <cascardo@redhat.com>
      Acked-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      4e4b7832
    • Vadim Kochan's avatar
      tests: Add output testing · 30383b07
      Vadim Kochan authored
      Added possibility to check command output by grep from the testing
      script.
      
      Now TMP_OUT & TMP_ERR are passed from Makefile and changed to
      STD_ERR & STD_OUT.
      
      Also changed some existing tests to make output testing.
      Signed-off-by: default avatarVadim Kochan <vadim4j@gmail.com>
      30383b07
    • Daniel Borkmann's avatar
      tc: util: fix print_rate for ludicrous speeds · ad1fe0d8
      Daniel Borkmann authored
      The for loop should only probe up to G[i]bit rates, so that we
      end up with T[i]bit as the last max units[] slot for snprintf(3),
      and not possibly an invalid pointer in case rate is multiple of
      kilo.
      
      Fixes: 8cecdc28 ("tc: more user friendly rates")
      Reported-by: default avatarJose R. Guzman Mosqueda <jose.r.guzman.mosqueda@intel.com>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      ad1fe0d8
    • Eric Dumazet's avatar
      ss: do not bindly dump two families · 518af1e0
      Eric Dumazet authored
      ss currently dumps IPv4 sockets, then IPv6 sockets from the kernel,
      even if -4 or -6 option was given. Filtering in user space then has to
      drop all sockets of wrong family. Such a waste of time...
      
      Before :
      
      $ time ss -tn -4 | wc -l
      251659
      
      real	0m1.241s
      user	0m0.423s
      sys	0m0.806s
      
      After:
      
      $ time ss -tn -4 | wc -l
      251672
      
      real	0m0.779s
      user	0m0.412s
      sys	0m0.386s
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      518af1e0
    • Eric Dumazet's avatar
      ss: speedup resolve_service() · 22588a0e
      Eric Dumazet authored
      Lets implement a full cache with proper hash table, memory got cheaper
      these days.
      
      Before :
      
      $ time ss -t | wc -l
      529678
      
      real	0m22.708s
      user	0m19.591s
      sys	0m2.969s
      
      After :
      
      $ time ss -t | wc -l
      528291
      
      real	0m5.078s
      user	0m4.099s
      sys	0m0.985s
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      22588a0e
    • Eric Dumazet's avatar
      ss: Fix allocation of cong control alg name · d2055ea5
      Eric Dumazet authored
      On Fri, 2015-05-29 at 13:30 +0300, Vadim Kochan wrote:
      > From: Vadim Kochan <vadim4j@gmail.com>
      >
      > Use strdup instead of malloc, and get rid of bad strcpy.
      >
      > Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
      > ---
      >  misc/ss.c | 3 +--
      >  1 file changed, 1 insertion(+), 2 deletions(-)
      >
      > diff --git a/misc/ss.c b/misc/ss.c
      > index 347e3a1..a719466 100644
      > --- a/misc/ss.c
      > +++ b/misc/ss.c
      > @@ -1908,8 +1908,7 @@ static void tcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r,
      >
      >  		if (tb[INET_DIAG_CONG]) {
      >  			const char *cong_attr = rta_getattr_str(tb[INET_DIAG_CONG]);
      > -			s.cong_alg = malloc(strlen(cong_attr + 1));
      > -			strcpy(s.cong_alg, cong_attr);
      > +			s.cong_alg = strdup(cong_attr);
      >  		}
      >
      >  		if (TCPI_HAS_OPT(info, TCPI_OPT_WSCALE)) {
      
      I doubt TCP_CA_NAME_MAX will ever change in the kernel : 16 bytes.
      
      Its typically "cubic" and less than 8 bytes.
      
      Using 8 bytes to point to a malloc(8) is a waste.
      
      Please remove the memory allocation, or store the pointer, since
      tcp_show_info() does the malloc()/free() before return.
      d2055ea5
    • Vadim Kochan's avatar
      configure: Check for libmnl · b6907403
      Vadim Kochan authored
      Indicate existence of libmnl which is required by tipc.
      Signed-off-by: default avatarVadim Kochan <vadim4j@gmail.com>
      b6907403
    • Mike Frysinger's avatar
      enable transparent LFS · 232aaf4f
      Mike Frysinger authored
      Make sure we use 64-bit filesystem functions everywhere.  This applies not
      only to being able to read large files (which generally doesn't apply to
      us), but also being able to simply stat them (as they might be using large
      inodes).
      Signed-off-by: default avatarMike Frysinger <vapier@chromium.org>
      232aaf4f
  2. 28 May, 2015 2 commits
  3. 27 May, 2015 2 commits
  4. 21 May, 2015 14 commits
  5. 14 May, 2015 1 commit
  6. 11 May, 2015 7 commits
  7. 07 May, 2015 4 commits
    • Stephen Hemminger's avatar
      ip: fix exit code for addrlabel · 906cafe3
      Stephen Hemminger authored
      The exit code for ip label was not correct.
      The return from the command function is negated and turned into
      the exit code on failure.
      906cafe3
    • Stephen Hemminger's avatar
      ip: fix exit code for rule failures · 076ae708
      Stephen Hemminger authored
      If ip rule command fails talking to kernel, exit code should be 2.
      The sub-command is called by cmd loop and the exit code is negative
      of return value from the command callback.
      076ae708
    • Stephen Hemminger's avatar
      ip: return correct exit code on route failure · d58ba4ba
      Stephen Hemminger authored
      If kernel complains about ip route request, exit status should be
      2 not 1.
      
      This fixes regression introduced by:
      commit 42ecedd4
      Author: Roopa Prabhu <roopa@cumulusnetworks.com>
      Date:   Tue Mar 17 19:26:32 2015 -0700
      
          fix ip -force -batch to continue on errors
      d58ba4ba
    • Stephen Hemminger's avatar
      ip: document exit code · ce743da1
      Stephen Hemminger authored
      The ip command has always had a consistent exit status
      document it so that developers see it.
      ce743da1
  8. 04 May, 2015 1 commit
    • Vlad Zolotarov's avatar
      ip link set vf: Added "query_rss" command · 6c55c8c4
      Vlad Zolotarov authored
      Add a new option to toggle the ability of querying the RSS configuration of a specific VF.
      
      VF RSS information like RSS hash key may be considered sensitive on some devices where
      this information is shared between VF and PF and thus its querying may be prohibited by default.
      
      This new option allows a system administrator with privileges to modify a PF state
      to control if the above VF querying is allowed or not.
      
      For example:
       To enable RSS querying of VF[0] of ethX:
       >> ip link set dev ethX vf 0 query_rss on
      Signed-off-by: default avatarVlad Zolotarov <vladz@cloudius-systems.com>
      6c55c8c4