1. 21 May, 2015 8 commits
  2. 14 May, 2015 1 commit
  3. 11 May, 2015 7 commits
  4. 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
  5. 04 May, 2015 6 commits
  6. 29 Apr, 2015 1 commit
  7. 27 Apr, 2015 5 commits
    • Daniel Borkmann's avatar
      examples: bpf: fix ld offs to have same prog loaded on ingress/egress · 279d6a8b
      Daniel Borkmann authored
      Fix up the eBPF example program to match our kernel fix in a166151cbe33 ("bpf:
      fix bpf helpers to use skb->mac_header relative offsets"). Tested on ingress
      and egress paths.
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Cc: Alexei Starovoitov <ast@plumgrid.com>
      Acked-by: default avatarAlexei Starovoitov <ast@plumgrid.com>
      279d6a8b
    • Daniel Borkmann's avatar
      tc: built-in eBPF exec proxy · 4bd62446
      Daniel Borkmann authored
      This work follows upon commit 6256f8c9 ("tc, bpf: finalize eBPF
      support for cls and act front-end") and takes up the idea proposed by
      Hannes Frederic Sowa to spawn a shell (or any other command) that holds
      generated eBPF map file descriptors.
      
      File descriptors, based on their id, are being fetched from the same
      unix domain socket as demonstrated in the bpf_agent, the shell spawned
      via execvpe(2) and the map fds passed over the environment, and thus
      are made available to applications in the fashion of std{in,out,err}
      for read/write access, for example in case of iproute2's examples/bpf/:
      
        # env | grep BPF
        BPF_NUM_MAPS=3
        BPF_MAP1=6        <- BPF_MAP_ID_QUEUE (id 1)
        BPF_MAP0=5        <- BPF_MAP_ID_PROTO (id 0)
        BPF_MAP2=7        <- BPF_MAP_ID_DROPS (id 2)
      
        # ls -la /proc/self/fd
        [...]
        lrwx------. 1 root root 64 Apr 14 16:46 0 -> /dev/pts/4
        lrwx------. 1 root root 64 Apr 14 16:46 1 -> /dev/pts/4
        lrwx------. 1 root root 64 Apr 14 16:46 2 -> /dev/pts/4
        [...]
        lrwx------. 1 root root 64 Apr 14 16:46 5 -> anon_inode:bpf-map
        lrwx------. 1 root root 64 Apr 14 16:46 6 -> anon_inode:bpf-map
        lrwx------. 1 root root 64 Apr 14 16:46 7 -> anon_inode:bpf-map
      
      The advantage (as opposed to the direct/native usage) is that now the
      shell is map fd owner and applications can terminate and easily reattach
      to descriptors w/o any kernel changes. Moreover, multiple applications
      can easily read/write eBPF maps simultaneously.
      
      To further allow users for experimenting with that, next step is to add
      a small helper that can get along with simple data types, so that also
      shell scripts can make use of bpf syscall, f.e to read/write into maps.
      
      Generally, this allows for prepopulating maps, or any runtime altering
      which could influence eBPF program behaviour (f.e. different run-time
      classifications, skb modifications, ...), dumping of statistics, etc.
      
      Reference: http://thread.gmane.org/gmane.linux.network/357471/focus=357860Suggested-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Reviewed-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
      Acked-by: default avatarAlexei Starovoitov <ast@plumgrid.com>
      4bd62446
    • Nicolas Dichtel's avatar
      mroute: remove invalid check against NLM_F_MULTI · 505f9186
      Nicolas Dichtel authored
      This flag is only for the netlink protocol (multi-part messages), no reason
      to reject messages without it.
      
      Note that this flag was removed by the following kernel patches (v3.14)
      65886f439ab0 ipmr: fix mfc notification flags
      f518338b1603 ip6mr: fix mfc notification flags
      Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      505f9186
    • Nicolas Dichtel's avatar
      libnamespaces: fix warning about syscall() · b765eda9
      Nicolas Dichtel authored
      The warning was:
      In file included from namespace.c:14:0:
      ../include/namespace.h: In function ‘setns’:
      ../include/namespace.h:37:2: warning: implicit declaration of function ‘syscall’ [-Wimplicit-function-declaration]
      Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      b765eda9
    • Nicolas Dichtel's avatar
      tc: fix compilation warning on 32bits arch · afa5158f
      Nicolas Dichtel authored
      The warning was:
      m_simple.c: In function ‘parse_simple’:
      m_simple.c:142:4: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘size_t’ [-Wformat]
      
      Useful to be able to compile with -Werror.
      Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      afa5158f
  8. 20 Apr, 2015 8 commits