Commit Graph

286 Commits

Author SHA1 Message Date
Stefan Tomanek c4fdf75d3d ip link: fix display of interface groups
This change adds the interface group to the output of "ip link show".

It also makes "ip link" print _all_ devices if no group filter is specified;
previously, only interfaces of the default group (0) were shown.

Signed-off-by: Stefan Tomanek <stefan.tomanek@wertarbyte.de>
2013-08-04 11:50:38 -07:00
Stephen Hemminger ecefa08c10 Update to 3.11-rc1 kernel headers
Sanitized headers from upstream
2013-07-16 10:19:56 -07:00
Stephen Hemminger 63c9e8555d v3.10.0 2013-07-16 10:06:36 -07:00
Stephen Hemminger a3aa47a559 Make tc and ip batch mode consistent
Change the code for tc and ip so that batch mode is handled
the same.
2013-07-16 10:04:05 -07:00
Andrey Vagin ecb928c876 ss: Get netlink sockets info via sock-diag (v2)
v2: update netlink_diag.h

Cc: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2013-06-05 08:54:35 -07:00
Stephen Hemminger 5cf35d6ad7 add BPF header files
For later ss change.
2013-05-17 08:36:52 -07:00
Eric Dumazet 9cb1eccf69 ss: add fastopen support
ss -i can output "fastopen" attribute if socket used Fast Open

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2013-05-03 20:48:30 -07:00
Stephen Hemminger 79e9a1db11 Update headers to 3.10
Merge in kernel sanitized headers from upstream
2013-05-03 13:15:36 -07:00
Stephen Hemminger 74c2f602f6 v3.9.0 2013-04-30 07:47:54 -07:00
Stephen Hemminger 2f9e88f3c9 Revert "add linux/fs.h"
This reverts commit 5abe4685b6.
2013-04-17 13:30:17 -07:00
Stephen Hemminger 5abe4685b6 add linux/fs.h
The ipnetns nees MS_SLAVE, MS_SHARED etc definitions which
are in include/linux/fs.h.
2013-04-17 13:26:47 -07:00
Stephen Hemminger a6d55bf0a0 Update kernel headers to 3.9-rc5 2013-04-01 11:56:36 -07:00
Stephen Hemminger 0025e5d63d ll_map: add name and index hash
Make ll_ functions faster by having a name hash, and allow
for deletion. Also, allow them to work without calling ll_init_map.
2013-03-28 14:57:28 -07:00
Stephen Hemminger 3e26112a02 ll_map: remove unused address fields
The address was being stored but not used by current code.
2013-03-27 09:26:25 -07:00
Vlad Yasevich b1b7ce0f0d bridge: Add support for printing bridge port attributes
Output new nested bridge port attributes.

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
2013-03-16 10:02:18 -07:00
Stephen Hemminger e7b24b67db Fix build when shared libraries are disabled
On some platforms, shared libraries are not used. The stub code
need some updating to not generate errors.
2013-03-13 08:29:59 -07:00
Vlad Yasevich 9eff0e5cc4 bridge: Add vlan configuration support
Recent kernel patches added support for VLAN filtering on the bridge.
This functionality allows one to turn a basic bridge into a VLAN bridge,
where VLANs dicatate packet forwarding and header transformation.

To configure the VLANs on the bridge and its ports a new command is
added to the 'bridge' utility.

   # bridge vlan add dev eth0 vid 10 pvid untagged brdev
   # bridge vlan add
   # bridge vlan delete dev eth0 vid 10
   # bridge vlan show

This command supports the following flags:
   master - peform the operation on the software bridge device.  This is
	    the default behavior.
   self  -  perform the operation on the hardware associated with the port.
            This flag is required when the device is the bridge device and
	    the configuration is desired on the bridge device itself (not
	    one of the ports).
   pvid  -  Set the PVID (port vlan id) for a given port.  Any untagged
            frames arriving on the port will be assigned to this vlan.
   untagged - Sets the egress policy of for a given vlan.  Default port
            egress policy is tagged.  Set this flag if you wish traffic
            associated with this VLAN to exit the port untagged.

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
2013-03-06 11:03:08 -08:00
Stephen Hemminger 609106d3af Update kernel headers to 3.9.0-rc1 2013-02-28 08:43:46 -08:00
Vijay Subramanian 9235195666 Fix compilation error of m_ipt.c with -Werror enabled
Commit (5a650703d4 Makefile: make warnings into
errors ) causes the following build error.

gcc -Wall -Wstrict-prototypes -Werror -Wmissing-prototypes
-Wmissing-declarations -Wold-style-definition -O2 -I../include
-DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib\" -DCONFDIR=\"/etc/iproute2\"
-D_GNU_SOURCE -DCONFIG_GACT -DCONFIG_GACT_PROB -DIPT_LIB_DIR=\"/lib/xtables\"
-DYY_NO_INPUT   -c -o m_ipt.o m_ipt.c
cc1: warnings being treated as errors
m_ipt.c:72: error: no previous prototype for 'xtables_register_target'
m_ipt.c:361: error: no previous prototype for 'build_st'
make[1]: *** [m_ipt.o] Error 1

This is fixed by adding the prototype in the header include/iptables.h

I am not sure if this is due to something wrong on my build system but I am
using current glibc 2.17.

Signed-off-by: Vijay Subramanian <subramanian.vijay@gmail.com>
2013-02-26 17:35:26 -08:00
Stephen Hemminger 05e983ea82 v3.8.0 2013-02-21 08:41:20 -08:00
Stephen Hemminger 46ac8a5550 lib: make string arguments const
For lookup routines, make arguments const where possible.
2013-02-12 11:39:07 -08:00
Strake 5bd9dd49ae include needed files
Needed to build iproute2 with musl
2012-12-23 11:49:06 -08:00
Stephen Hemminger 75e003c23e bridge: update kernel headers 2012-12-20 08:24:05 -08:00
Cong Wang 4a4ee61699 iproute2: add support to monitor mdb entries too
This patch implements `bridge monitor mdb`.

Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Cong Wang <amwang@redhat.com>
2012-12-12 10:27:46 -08:00
Cong Wang 9dca676721 iproute2: implement add/del mdb entry
This patch implements:

	bridge mdb { add | del } dev DEV port PORT grp GROUP

Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Cong Wang <amwang@redhat.com>
2012-12-12 10:27:46 -08:00
Nicolas Dichtel 9d0efc1048 ip: add support of 'ip link type ip6tnl'
This patch allows to manage ip6 tunnels via the interface ip link.
The syntax for parameters is the same that 'ip -6 tunnel'.

It also allows to display tunnels parameters with 'ip -details link' or
'ip -details monitor link'.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
2012-12-12 09:09:23 -08:00
Nicolas Dichtel 4852ba750a ip: add support of netconf messages
Example of the output:
$ ip monitor netconf&
[1] 24901
$ echo 0 > /proc/sys/net/ipv6/conf/all/forwarding
ipv6 dev lo forwarding off
ipv6 dev eth0 forwarding off
ipv6 all forwarding off
$ echo 1 > /proc/sys/net/ipv4/conf/eth0/forwarding
ipv4 dev eth0 forwarding on

$ ip -6 netconf
ipv6 all forwarding on mc_forwarding 0
$ ip netconf show dev eth0
ipv4 dev eth0 forwarding on rp_filter off mc_forwarding 1

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>

Minor cleanup of original patch, made sure netconf.h matched
result of santized kernel headers
2012-12-12 09:05:51 -08:00
Stephen Hemminger 08342500ee bridge: add if_bridge.h header
Since system may not have upto date kernel headers, keep if_bridge.h
in set of exported headers used to build iproute.
2012-12-11 16:43:36 -08:00
Stephen Hemminger 910773dc0d Update kernel headers to 3.8-pre
Sanitized headers from net-next
2012-12-11 11:16:36 -08:00
Stephen Hemminger 6abef21b3e v3.7.0 2012-12-11 09:52:39 -08:00
Stephen Hemminger e95c8fc3b1 Update kernel headers to 3.7-rc1
Get new sanitized headers
2012-10-19 13:31:05 -07:00
Stephen Hemminger 2d596120cf vxlan: add support for port range 2012-10-09 23:39:17 -07:00
Julian Anastasov ea63a69b6d iproute2: add support for tcp_metrics
ip tcp_metrics/tcpmetrics

	We support get/del for single entry and dump for
show/flush.

v3:
 - fix rtt/rttvar shifts as suggested by Eric Dumazet
 - show rtt/rttvar usecs as suggested by David Laight

Signed-off-by: Julian Anastasov <ja@ssi.bg>
2012-10-08 10:23:07 -07:00
Stephen Hemminger f22640712f Update headers to 3.7-pre-rc
Get latest headers from merge
2012-10-03 08:48:37 -07:00
Stephen Hemminger 808ed6e10a v3.6.0 2012-10-01 08:39:21 -07:00
Stephen Hemminger ab12370657 update header files to 3.6 2012-10-01 08:38:03 -07:00
Julian Anastasov 328d482c48 iproute2: GENL: merge GENL_REQUEST and GENL_INITIALIZER
Both macros are used together, so better to have
single define. Update all requests in ipl2tp.c to use the
new macro.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
2012-09-17 15:46:45 -07:00
Julian Anastasov 8afcc28879 iproute2: add libgenl files
Create libgenl.h and libgenl.c. They will contain
common code for GENL users such as ipl2tp, tcp_metrics, etc.

Somewhat simplified by Stephen Hemminger

Signed-off-by: Julian Anastasov <ja@ssi.bg>
2012-09-11 08:59:09 -07:00
Stephen Hemminger ac4e8384e0 Update can.h to 3.6-rc2 2012-08-20 13:02:42 -07:00
Rostislav Lisovy 13eea5a600 add can.h 2012-08-01 16:14:55 -07:00
Stephen Hemminger a564b70942 Update to 3.6.0-pre headers
These are pre -rc1 version of santised kernel headers
2012-08-01 16:08:53 -07:00
Stephen Hemminger a27875b0f8 v3.5.0 2012-08-01 15:25:51 -07:00
Stephen Hemminger 5e4dc84ff7 Update headers to 3.5 merge window
Use sanitized version of kernel headers from 3.5 pre-rc1 merge
2012-05-22 14:02:49 -07:00
Stephen Hemminger db70d91c78 v3.4.0 2012-05-21 14:12:19 -07:00
Stephen Hemminger 29cea29df0 Merge in 3.3-rc2 kernel headers 2012-04-10 09:11:21 -07:00
Stephen Hemminger 4bb00cd2b7 v3.3.0 2012-03-19 17:27:12 -07:00
Stephen Hemminger 7dd0371222 Fix rta_getattr_u32 wrapper and add getattr_u8 2012-03-15 17:47:51 -07:00
Stephen Hemminger c23abafbdc update to 3.3-rc7 kernel headers 2012-03-15 14:44:13 -07:00
Stephen Hemminger cfd2cbd15f Add cast to rta_getattr_str
Warning from C++
2012-02-06 09:35:27 -08:00
Stephen Hemminger f606236010 Fix unix socket diagnostic build
Get updated headers incorporated into build environment
and include required sock_diag.h.
2012-01-20 12:48:00 -08:00