- 05 Feb, 2015 16 commits
-
-
Stephen Hemminger authored
-
Thomas Graf authored
Signed-off-by: Thomas Graf <tgraf@suug.ch>
-
Andreas Henriksson authored
"ip addr show up" would exclude the interface (link), but include the addresses of down interfaces (which looked like they where indented under a different interface). This fixes the filtering. For a full example see the original bug report at: http://bugs.debian.org/776040Reported-by: Paul Slootman <paul@debian.org> CC: 776040@bugs.debian.org Signed-off-by: Andreas Henriksson <andreas@fatal.se>
-
Vadim Kochan authored
Allow delete all namespace names by: $ ip -all netns del Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
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: Vadim Kochan <vadim4j@gmail.com>
-
Vadim Kochan authored
Added possibility to run some func on each netns. Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
Stephen Hemminger authored
Pull in headers from later tree
-
Stephen Hemminger authored
-
Stephen Hemminger authored
Sanitized header from upstream 3.20-rc kernel
-
Vadim Kochan authored
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
Vadim Kochan authored
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
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: Vadim Kochan <vadim4j@gmail.com>
-
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: Vadim Kochan <vadim4j@gmail.com>
-
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: Nicolas Dichtel <nicolas.dichtel@6wind.com>
-
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: Nicolas Dichtel <nicolas.dichtel@6wind.com>
-
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: Reese Moore <ram@vt.edu>
-
- 14 Jan, 2015 12 commits
-
-
Stephen Hemminger authored
Need to check for invalid address and buffer overrun in ip neigh command with invalid paramters.
-
Stephen Hemminger authored
-
Daniel Borkmann authored
This patch adds configuration and dumping of congestion control metric for ip route, for example: ip route add <dst> dev foo congctl [lock] dctcp Reference: http://thread.gmane.org/gmane.linux.network/344733Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
-
Stephen Hemminger authored
-
Vadim Kochan authored
Renamed get_netns_fd -> netns_get_fd and moved to lib/namespace.c Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
Vadim Kochan authored
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
Vadim Kochan authored
Add #define for nlmsg_type = 15 Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
Vadim Kochan authored
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
Vadim Kochan authored
When 'ss' prints UDP sockets info together with RAW sockets e.g.: $ ss -a then UDP sockets are resolved as "ipproto-xxx". It was caused that dg_proto was set after printing UDP socket info from netlink. So fixed issue by moving setting dg_proto before printing info from Netlink. Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
Vadim Kochan authored
The issue was caused that ifla_vf_rate does not exist on older kernels and should be checked if it exists as nested attr. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Reported-by: William Dauchy <william@gandi.net> Tested-by: William Dauchy <william@gandi.net>
-
Jamal Hadi Salim authored
When specified in a graph such as: action vlan ... action foobar the vlan action chewed more than it can swallow Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
-
Jiri Pirko authored
addrgenmode is currently write only by ip. So display this information if provided by kernel as well. Signed-off-by: Jiri Pirko <jiri@resnulli.us>
-
- 07 Jan, 2015 4 commits
-
-
Vadim Kochan authored
This patch fixes some filtering combinations issues which does not work on the 'master' version: $ ss -4 shows inet & unix sockets, instead of only inet sockets $ ss -u needs to specify 'state closed' $ ss src unix:*X11* needs to specify '-x' shortcut for UNIX family $ ss -A all shows only sockets with established states There might some other issues which was not observed. Also changed logic for calculating families, socket types and states filtering. I think that this version is a little simpler one. Now there are 2 predefined default tables which describes the following maping: family -> (states, dbs) db -> (states, families) Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
Vadim Kochan authored
Refactored to use one func for output packet stats info from both /proc and netlink. Added possibility to get packet stats info from /proc by setting environment variable PROC_ROOT or PROC_NET_PACKET. Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
Vadim Kochan authored
Refactored to use one func for output unix stats info from both /proc and netlink. Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
Jiri Pirko authored
Sometimes, it is more convenient to get only one specific nested attribute by type. For example for IFLA_AF_SPEC where type is address family (AF_INET6). So add this helper for this purpose. Signed-off-by: Jiri Pirko <jiri@resnulli.us>
-
- 03 Jan, 2015 1 commit
-
-
Stephen Hemminger authored
Suggested by Vadim Kochan
-
- 01 Jan, 2015 4 commits
-
-
Scott Feldman authored
v2: Resending now that the dust has cleared in 3.18 on "self" vs. hwmode debate for brport settings. learning_sync is now set/cleared using "self" qualifier on brport. v1: Add 'learned_sync' flag to turn on/off syncing of learned MAC addresses from offload device to bridge's FDB. Flag is be set/cleared on offload device port using "self" qualifier: $ sudo bridge link set dev swp1 learning_sync on self $ bridge -d link show dev swp1 2: swp1 state UNKNOWN : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br0 state forwarding priority 32 cost 2 hairpin off guard off root_block off fastleave off learning off flood off 2: swp1 state UNKNOWN : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br0 learning on learning_sync on Adds new IFLA_BRPORT_LEARNED_SYNCED attribute for IFLA_PROTINFO on the SELF brport. Signed-off-by: Scott Feldman <sfeldma@gmail.com>
-
Vadim Kochan authored
Stolen from generated doc/ss.html Also added reference to RFC 793 for TCP states. Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
Vadim Kochan authored
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
Vadim Kochan authored
Fixed -t[short] to -ts[hort] as '-t' is related to -timestamp option. Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
- 27 Dec, 2014 3 commits
-
-
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: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
-
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: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
-
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: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
-