]> git.proxmox.com Git - mirror_iproute2.git/log
mirror_iproute2.git
11 years agoiproute2: clarifications in the libnetlink.3 man page
Kees van Reeuwijk [Fri, 8 Feb 2013 03:32:36 +0000 (03:32 +0000)]
iproute2: clarifications in the libnetlink.3 man page

Rephrasing for clarity.

Signed-off-by: Kees van Reeuwijk <reeuwijk@few.vu.nl>
 ---

 libnetlink.3 |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

11 years agoiproute2: add a missing return statement
Kees van Reeuwijk [Fri, 8 Feb 2013 03:32:36 +0000 (03:32 +0000)]
iproute2: add a missing return statement

Since do_help() has to return an int to fit in the table of commands,
it should actually return an int. This patch lets it do so.

Signed-off-by: Kees van Reeuwijk <reeuwijk@few.vu.nl>
11 years agoiproute2: clarifications in the tc-hfsc.7 man page
Kees van Reeuwijk [Fri, 8 Feb 2013 03:32:36 +0000 (03:32 +0000)]
iproute2: clarifications in the tc-hfsc.7 man page

Improved man page as follows:
- Use more `mainstream' english
- Rephrased for clarity
- Use standard notation for units

Signed-off-by: Kees van Reeuwijk <reeuwijk@few.vu.nl>
11 years agoiproute2: clarification of various man8 pages
Kees van Reeuwijk [Fri, 8 Feb 2013 03:32:36 +0000 (03:32 +0000)]
iproute2: clarification of various man8 pages

Rephrasing for clarity.

Note that in ip-rule.8 I rephrased a sentence to "The RPDB is scanned
in order of decreasing priority." The original version talked about
*in*creasing priority, but from the context that didn't make sense.

Signed-off-by: Kees van Reeuwijk <reeuwijk@few.vu.nl>
11 years agoUse pkg-config to obtain xtables.h path
Benjamin Poirier [Wed, 6 Feb 2013 11:19:24 +0000 (11:19 +0000)]
Use pkg-config to obtain xtables.h path

On openSUSE 12.2 (at least) xtables.h is not installed in the system-wide
include dir but in /usr/include/iptables-1.4.16.3/. This results in the
following build failure:
em_ipset.c:26:21: fatal error: xtables.h: No such file or directory

Other includers of xtables.h already call out to pkg-config

11 years agoip: change format of promiscuity display
Stephen Hemminger [Tue, 5 Feb 2013 16:16:28 +0000 (08:16 -0800)]
ip: change format of promiscuity display

Don't put it on separate line, keep it on line with link address.

11 years agoiplink: display the value of IFLA_PROMISCUITY
Nicolas Dichtel [Tue, 5 Feb 2013 08:38:34 +0000 (00:38 -0800)]
iplink: display the value of IFLA_PROMISCUITY

This is useful to know the 'real' status of an interface (the flag IFF_PROMISC
is exported by the kernel only when the user set it explicitly, for example it
will not be exported when a tcpdump is running).

This information will be displayed when '-details' is provided by the user.

Example:
$ ip -d l l tun10
6: tun10: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1480 qdisc noqueue state UNKNOWN mode DEFAULT
    link/sit 10.16.0.249 peer 10.16.0.121
    sit remote 10.16.0.121 local 10.16.0.249 ttl inherit pmtudisc 6rd-prefix 2002::/16
    promiscuity 2

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
11 years agoiproute2: tc netem rate: allow negative packet/cell overhead
Johannes Naab [Wed, 23 Jan 2013 11:38:19 +0000 (11:38 +0000)]
iproute2: tc netem rate: allow negative packet/cell overhead

by fixing the parsing of command-line tokens

Signed-off-by: Johannes Naab <jn@stusta.de>
11 years agoipaddr: fix a typo in error msg about SIOCGIFTXQLEN
Nicolas Dichtel [Tue, 29 Jan 2013 16:46:42 +0000 (08:46 -0800)]
ipaddr: fix a typo in error msg about SIOCGIFTXQLEN

The optname was wrong.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
11 years agoip/iptunnel: Extend TOS syntax
David Ward [Sun, 27 Jan 2013 13:04:59 +0000 (13:04 +0000)]
ip/iptunnel: Extend TOS syntax

The 'inherit/STRING' or 'inherit/00..ff' syntax indicates that the
TOS field of tunneled packets should be copied from the original IP
header, but for non-IP packets the value STRING or 00..ff should be
used instead. (This syntax is already used by 'ip tunnel show'.)

Also clarify the man page and the command usage text (particularly
that the TOS is not specified as a decimal number).

Signed-off-by: David Ward <david.ward@ll.mit.edu>
11 years agolibnetlink: add caveat
Stephen Hemminger [Mon, 4 Feb 2013 16:54:17 +0000 (08:54 -0800)]
libnetlink: add caveat

There are much better API's to netlink now. Encourage users to look
elsewhere.

11 years agoMakefile: make warnings into errors
Stephen Hemminger [Mon, 4 Feb 2013 16:51:44 +0000 (08:51 -0800)]
Makefile: make warnings into errors

Don't let contributions cause warnings.

11 years agoiproute2: Add "ip netns pids" and "ip netns identify"
Eric W. Biederman [Thu, 17 Jan 2013 14:48:15 +0000 (14:48 +0000)]
iproute2: Add "ip netns pids" and "ip netns identify"

Add command that go between network namespace names and process
identifiers.  The code builds and runs agains older kernels but
only works on Linux 3.8+ kernels where I have fixed stat to work
properly.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
11 years agoiproute2: Fill in the ip-netns.8 manpage
Eric W. Biederman [Thu, 17 Jan 2013 14:47:47 +0000 (14:47 +0000)]
iproute2: Fill in the ip-netns.8 manpage

Document ip netns monitor.

Add a few senteces describing each command.  The manpage was looking
very scrawny.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
11 years agoiproute2: Make "ip netns delete" more likely to succeed
Eric W. Biederman [Thu, 17 Jan 2013 14:47:18 +0000 (14:47 +0000)]
iproute2: Make "ip netns delete" more likely to succeed

Sometimes "ip netns delete" fails because it can not delete the file a
network namespace was mounted on.  If this only happened when a
network namespace was really in use this would be fine, but today it
is possible to pin all network namespaces by simply having a long
running process started with "ip netns exec".

Every mount is copied when a network namespace is created so it is
impossible to prevent the mounts from getting into other mount
namespaces.  Modify all mounts in the files and subdirectories of
/var/run/netns to be shared mount points so that unmount events can
propogate, making it unlikely that "ip netns delete" will fail because
a directory is mounted in another mount namespace.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
11 years agoiproute2: Improve "ip netns add" failure error message
Eric W. Biederman [Thu, 17 Jan 2013 14:46:43 +0000 (14:46 +0000)]
iproute2: Improve "ip netns add" failure error message

Report the name of the network namespace that could not be
added.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
11 years agoiproute2: Normalize return codes in "ip netns"
Eric W. Biederman [Thu, 17 Jan 2013 14:46:09 +0000 (14:46 +0000)]
iproute2: Normalize return codes in "ip netns"

Ben Hutchings pointed out that the return value of do_netns is passed
to exit and the current convention of returning -1 for failure is
inconsitent with that reality.

Return EXIT_FAILURE instead of -1 and EXIT_SUCCESS instead of 0.  To make
it clear that the return codes are expected to be passed to exit.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
11 years agoiproute2: Don't propogate mounts out of ip
Eric W. Biederman [Thu, 17 Jan 2013 14:45:33 +0000 (14:45 +0000)]
iproute2: Don't propogate mounts out of ip

Some systems are now following the advice in
linux/Documentation/sharedsubtrees.txt and running with all mount
points shared between all mount namespaces by default.

After creating the mount namespace call mount on / with
MS_SLAVE|MS_REC to modify all mounts in the new mount namespace to
slave mounts if they are shared or private mounts otherwise.
Guarnateeing that changes to the mount namespace created with
"ip netns exec" don't propgate to other namespaces.

Reported-by: Petr Šabata <contyk@redhat.com>
Tested-by: Petr Šabata <contyk@redhat.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
11 years agoREADME: update mail address and download location
Stephen Hemminger [Fri, 18 Jan 2013 17:54:58 +0000 (09:54 -0800)]
README: update mail address and download location

11 years agoipxfrm: use alloca to allocate stack space
Mike Frysinger [Thu, 17 Jan 2013 18:00:50 +0000 (18:00 +0000)]
ipxfrm: use alloca to allocate stack space

Clang doesn't support the gcc extension for embeddeding flexible arrays
inside of structures.  Use the slightly more portable alloca().

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
11 years agoiproute2: act_ipt fix xtables breakage
Jamal Hadi Salim [Sun, 16 Dec 2012 10:41:39 +0000 (10:41 +0000)]
iproute2: act_ipt fix xtables breakage

Fixes breakage with xtables API starting with version 1.4.10

Signed-off-by: Hasan Chowdhury <shemonc@gmail.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
11 years agodo not ignore errors in man subdirs
Mike Frysinger [Fri, 11 Jan 2013 06:56:29 +0000 (06:56 +0000)]
do not ignore errors in man subdirs

If an error occurs in a man subdir, make sure we propagate it back up.

While we're here, merge the duplicate rules into one.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
11 years agoadd man7 to subdirs list
Mike Frysinger [Fri, 11 Jan 2013 06:56:28 +0000 (06:56 +0000)]
add man7 to subdirs list

The man dir misses the man7 as a subdir which means none of the pages
get installed.

URL: https://bugs.gentoo.org/451166
Reported-by: Marcin Mirosław <bug@mejor.pl>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
11 years agoinclude needed files
Strake [Sun, 23 Dec 2012 13:46:04 +0000 (08:46 -0500)]
include needed files

Needed to build iproute2 with musl

11 years agobridge: update help
Cong Wang [Thu, 20 Dec 2012 14:31:54 +0000 (22:31 +0800)]
bridge: update help

Signed-off-by: Cong Wang <amwang@redhat.com>
11 years agobridge: make `bridge mdb` output consistent with input
Cong Wang [Thu, 20 Dec 2012 14:31:55 +0000 (22:31 +0800)]
bridge: make `bridge mdb` output consistent with input

bridge -> dev
group -> grp

Signed-off-by: Cong Wang <amwang@redhat.com>
11 years agobridge: distinguish permanent and temporary mdb entries
Cong Wang [Thu, 20 Dec 2012 18:54:19 +0000 (10:54 -0800)]
bridge: distinguish permanent and temporary mdb entries

This patch adds a flag to mdb entries so that we can distinguish
permanent entries with temporary ones.

Signed-off-by: Cong Wang <amwang@redhat.com>
11 years agobridge: update kernel headers
Stephen Hemminger [Thu, 20 Dec 2012 16:24:05 +0000 (08:24 -0800)]
bridge: update kernel headers

11 years agoconfigure: restore old behaviour
Stephen Hemminger [Thu, 20 Dec 2012 00:01:39 +0000 (16:01 -0800)]
configure: restore old behaviour

Previous change wasn't needed, since merge of
configure: move toolchain init to a function

11 years agobuild: indent shell functions in configure
Stephen Hemminger [Tue, 18 Dec 2012 17:20:13 +0000 (09:20 -0800)]
build: indent shell functions in configure

Script has lots of shell functions but never indented properly.

11 years agobuild: unbreak linakge of m_xt.so
Jan Engelhardt [Tue, 18 Dec 2012 17:18:45 +0000 (09:18 -0800)]
build: unbreak linakge of m_xt.so

Commit v3.7.0~10 caused the variable new PKG_CONFIG variable never
to be present at the time of calling make, leading to tc/m_xt.so
not linked with -lxtables (result from pkg-config xtables --libs),
that in turn leading to

tc: symbol lookup error: /usr/lib64/tc//m_xt.so: undefined symbol:
xtables_init_all

Fixing that.

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
11 years agoconfigure: pull AR from the env too
Mike Frysinger [Sun, 16 Dec 2012 22:09:17 +0000 (17:09 -0500)]
configure: pull AR from the env too

This matches the existing CC behavior.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
11 years agolib: include the Config file too
Mike Frysinger [Sun, 16 Dec 2012 22:09:16 +0000 (17:09 -0500)]
lib: include the Config file too

The lib makefile doesn't include Config which means it misses
setting up toolchain vars that it includes.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
11 years agoconfigure: move toolchain init to a function
Mike Frysinger [Sun, 16 Dec 2012 22:09:15 +0000 (17:09 -0500)]
configure: move toolchain init to a function

The layout of this file uses functions to update Config.  Move the
toolchain logic to the same style to fix setting the vars in Config.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
11 years agoip: update man pages and usage() for 'ip monitor'
Nicolas Dichtel [Mon, 17 Dec 2012 16:41:27 +0000 (17:41 +0100)]
ip: update man pages and usage() for 'ip monitor'

Sync with the current code.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
11 years agoip: add man pages for netconf
Nicolas Dichtel [Mon, 17 Dec 2012 16:41:26 +0000 (17:41 +0100)]
ip: add man pages for netconf

This patch add the documentation about 'ip netconf' command.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
11 years agoip: add the type 'vxlan' in the output of "ip link help"
Zhi Yong Wu [Sat, 15 Dec 2012 16:21:08 +0000 (00:21 +0800)]
ip: add the type 'vxlan' in the output of "ip link help"

  The new type 'vxlan' is added in the output of "ip link help"

Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
11 years agoip: use rtnelink to manage mroute
Nicolas Dichtel [Fri, 14 Dec 2012 18:08:17 +0000 (10:08 -0800)]
ip: use rtnelink to manage mroute

mroute was using /proc/net/ip_mr_[vif|cache] to display mroute entries. Hence,
only RT_TABLE_DEFAULT was displayed and only IPv4.
With rtnetlink, it is possible to display all tables for IPv4 and IPv6. The output
format is kept. Also, like before the patch, statistics are displayed when user specify
the '-s' argument.

The patch also adds the support of 'ip monitor mroute', which is now possible.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
11 years agoip: term OPTIONS was used twice in 'ip route' man pages
Nicolas Dichtel [Thu, 13 Dec 2012 03:42:53 +0000 (03:42 +0000)]
ip: term OPTIONS was used twice in 'ip route' man pages

INFO_SPEC already uses the term 'OPTIONS' and describe it.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
11 years agoip: update man pages for 'ip link'
Nicolas Dichtel [Thu, 13 Dec 2012 03:42:52 +0000 (03:42 +0000)]
ip: update man pages for 'ip link'

Now 'ip link' supports ipip, sit and ip6tnl.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
11 years agoip: update mand pages and usage() for 'ip mroute'
Nicolas Dichtel [Fri, 14 Dec 2012 17:56:47 +0000 (09:56 -0800)]
ip: update mand pages and usage() for 'ip mroute'

Sync with the current code.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
11 years agoip/link_iptnl: fix indentation Logged in as shemminger
Nicolas Dichtel [Fri, 14 Dec 2012 17:50:33 +0000 (09:50 -0800)]
ip/link_iptnl: fix indentation Logged in as shemminger

Use tabs instead of space when possible.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
11 years agoiproute2: update usage info of bridge monitor
Cong Wang [Fri, 14 Dec 2012 05:59:32 +0000 (13:59 +0800)]
iproute2: update usage info of bridge monitor

Cc: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Cong Wang <amwang@redhat.com>
11 years agoiproute2: add support to monitor mdb entries too
Cong Wang [Tue, 11 Dec 2012 22:23:10 +0000 (22:23 +0000)]
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>
11 years agoiproute2: implement add/del mdb entry
Cong Wang [Tue, 11 Dec 2012 22:23:09 +0000 (22:23 +0000)]
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>
11 years agoadd DOVE extensions for iproute2
David L Stevens [Wed, 12 Dec 2012 18:02:19 +0000 (10:02 -0800)]
add DOVE extensions for iproute2

This patch adds a new flag to iproute2 for vxlan devices to enable
DOVE features. It also adds support for L2 and L3 switch lookup miss
netlink messages to "ip monitor".

Changes since v2: fix merge conflict
Changes since v1:
- split "dove" flag into separate feature flags:
- "proxy" for ARP reduction
- "rsc" for route short circuiting
- "l2miss" for L2 switch miss notifications
- "l3miss" for L3 switch miss notifications

Signed-off-by: David L Stevens <dlstevens@us.ibm.com>
11 years agoip: add support of 'ip link type [ipip|sit]'
Nicolas Dichtel [Wed, 12 Dec 2012 09:51:47 +0000 (10:51 +0100)]
ip: add support of 'ip link type [ipip|sit]'

This patch allows to manage ip tunnels via the interface ip link.
The syntax for parameters is the same that 'ip 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>
11 years agoip: add support of 'ip link type ip6tnl'
Nicolas Dichtel [Wed, 12 Dec 2012 17:09:23 +0000 (09:09 -0800)]
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>
11 years agoip: add support of netconf messages
Nicolas Dichtel [Wed, 12 Dec 2012 17:05:51 +0000 (09:05 -0800)]
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

11 years agoiproute2: fix tc ematch manpage section
Andreas Henriksson [Wed, 12 Dec 2012 11:23:48 +0000 (12:23 +0100)]
iproute2: fix tc ematch manpage section

The debian package checking tool, lintian, spotted that the
tc ematch manpage seems to have an error in the specified section.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
11 years agoiproute2: add mdb sub-command to bridge
Cong Wang [Wed, 12 Dec 2012 00:46:22 +0000 (16:46 -0800)]
iproute2: add mdb sub-command to bridge

Sample output:

# ./bridge/bridge mdb show dev br0
bridge br0 port eth1 group 224.8.8.9
bridge br0 port eth0 group 224.8.8.8

# ./bridge/bridge -d mdb show dev br0
bridge br0 port eth1 group 224.8.8.9
bridge br0 port eth0 group 224.8.8.8
router ports on br0: eth0

Signed-off-by: Cong Wang <amwang@redhat.com>
11 years agobridge: add if_bridge.h header
Stephen Hemminger [Wed, 12 Dec 2012 00:43:36 +0000 (16:43 -0800)]
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.

11 years agoUpdate kernel headers to 3.8-pre
Stephen Hemminger [Tue, 11 Dec 2012 19:16:36 +0000 (11:16 -0800)]
Update kernel headers to 3.8-pre

Sanitized headers from net-next

11 years agov3.7.0
Stephen Hemminger [Tue, 11 Dec 2012 17:52:39 +0000 (09:52 -0800)]
v3.7.0

11 years agoiproute2: ss - change default filter to include all socket types
Petr Sabata [Tue, 11 Dec 2012 06:42:52 +0000 (06:42 +0000)]
iproute2: ss - change default filter to include all socket types

Currently the default filter lists TCP sockets only which is
rather confusing especially when the '-a/--all' flag is used.
This patch changes the default to include all sockets, imitating
netstat(8) behavior.

Signed-off-by: Petr Šabata <contyk@redhat.com>
Acked-by: David S. Miller <davem@davemloft.net>
11 years agotc: add canid ematch to ematch_map
Rostislav Lisovy [Thu, 22 Nov 2012 09:53:44 +0000 (09:53 +0000)]
tc: add canid ematch to ematch_map

The canid ematch has been added in commit:

7b5f30e Ematch used to classify CAN frames according to their identifiers

But the corresponding entry in etc/iproute2/ematch_map was lost. This patch
adds the missing entry in ematch_map, otherweise tc would complain:

Error: Unable to find ematch "canid" in /etc/iproute2/ematch_map
Please assign a unique ID to the ematch kind the suggested entry is:
        7       canid

Signed-off-by: Rostislav Lisovy <lisovy@gmail.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
11 years agoip/ip6tunnel: fix update of tclass and flowlabel
Nicolas Dichtel [Wed, 14 Nov 2012 15:29:26 +0000 (16:29 +0100)]
ip/ip6tunnel: fix update of tclass and flowlabel

When tclass or flowlabel field were updated, we only performed an OR with the
new value. For example, it was not possible to reset tclass:
  ip -6 tunnel change ip6tnl2 tclass 0

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
11 years agoip/ip6tunnel: reset encap limit flag on change
Nicolas Dichtel [Wed, 14 Nov 2012 15:29:25 +0000 (16:29 +0100)]
ip/ip6tunnel: reset encap limit flag on change

Flag IP6_TNL_F_IGN_ENCAP_LIMIT is set when encaplimit is none, but it was not
removed if encaplimit was set on update (ip tunnel change).

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
11 years agoip/ip6tunnel: fix help for TCLASS
Nicolas Dichtel [Wed, 14 Nov 2012 15:29:24 +0000 (16:29 +0100)]
ip/ip6tunnel: fix help for TCLASS

Help is "[tclass TCLASS]", but only TOS was described.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
11 years agoconfigure: respect $CC environment var override
Wookey [Fri, 16 Nov 2012 16:06:19 +0000 (08:06 -0800)]
configure: respect $CC environment var override

Enables e.g. cross-compiling by setting $CC env var.  This patch
extracted from the Ubuntu package (thanks, Wookey and Colin Watson).

BugLink: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=670660
BugLink: https://bugs.launchpad.net/bugs/870197
Signed-off-by: Kamal Mostafa <kamal@debian.org>
11 years agoiproute2: drop libresolv
Andreas Henriksson [Sat, 10 Nov 2012 12:22:10 +0000 (13:22 +0100)]
iproute2: drop libresolv

Hello!

While building the iproute package in Debian I get warnings from
package helpers like this:

dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/iproute/sbin/tc debian/iproute/usr/bin/lnstat debian/iproute/bin/ip debian/iproute/bin/ss debian/iproute/sbin/bridge debian/iproute/sbin/rtmon were not linked against libresolv.so.2 (they use none of the library's symbols)

The -lresolv in ./Makefile seems to come from pre-historic times (before
iproute2 git history, possibly from libc5/pre-glibc days).
I couldn't find out if/why there was any reason for linking to libresolv.
Does anyone know if there are any valid reasons for keeping it still?

If not, I'd be happy to see it go.... while at it I also removed includes
of <resolv.h> which I also couldn't find any reason for, but this is
just an added bonus of the patch (and there are probably more unneeded
includes that could be dropped in the same sources).

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
11 years agoman: fix incorrect use of "it's"
Stephen Hemminger [Mon, 12 Nov 2012 16:05:45 +0000 (08:05 -0800)]
man: fix incorrect use of "it's"

A couple of places were using "it's" where possive form "its"
should be used instead.

11 years agoiproute2: avoid errors from double-installing manpages
Andreas Henriksson [Fri, 9 Nov 2012 15:42:41 +0000 (16:42 +0100)]
iproute2: avoid errors from double-installing manpages

Three manpages in man8 are listed twice in MAN8PAGES (both directly and
in TARGETS) which causes the install command to spit our a couple of
warnings as below and exiting with non-zero exit code....

make[3]: Entering directory `/tmp/buildd/iproute-20121001/man/man8'
install -m 0755 -d /tmp/buildd/iproute-20121001/debian/tmp/usr/share/man/man8
install -m 0644 ip-address.8 ip-link.8 ip-route.8 ip.8 arpd.8 lnstat.8 routel.8 rtacct.8 rtmon.8 ss.8 tc.8 tc-bfifo.8 tc-cbq.8 tc-cbq-details.8 tc-choke.8 tc-codel.8 tc-drr.8 tc-ematch.8 tc-fq_codel.8 tc-hfsc.8 tc-htb.8 tc-netem.8 tc-pfifo.8 tc-pfifo_fast.8 tc-prio.8 tc-red.8 tc-sfb.8 tc-sfq.8 tc-stab.8 tc-tbf.8 bridge.8 rtstat.8 ctstat.8 nstat.8 routef.8 ip-address.8 ip-addrlabel.8 ip-l2tp.8 ip-link.8 ip-maddress.8 ip-monitor.8 ip-mroute.8 ip-neighbour.8 ip-netns.8 ip-ntable.8 ip-route.8 ip-rule.8 ip-tunnel.8 ip-xfrm.8 /tmp/buildd/iproute-20121001/debian/tmp/usr/share/man/man8
install: will not overwrite just-created `/tmp/buildd/iproute-20121001/debian/tmp/usr/share/man/man8/ip-address.8' with `ip-address.8'
install: will not overwrite just-created `/tmp/buildd/iproute-20121001/debian/tmp/usr/share/man/man8/ip-link.8' with `ip-link.8'
install: will not overwrite just-created `/tmp/buildd/iproute-20121001/debian/tmp/usr/share/man/man8/ip-route.8' with `ip-route.8'
make[3]: *** [install] Error 1
make[3]: Leaving directory `/tmp/buildd/iproute-20121001/man/man8'
make[2]: *** [install] Error 2
make[2]: Leaving directory `/tmp/buildd/iproute-20121001/man'

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
11 years agoallow pkg-config to be customized
Mike Frysinger [Thu, 8 Nov 2012 16:41:17 +0000 (11:41 -0500)]
allow pkg-config to be customized

Rather than hard coding `pkg-config`, use ${PKG_CONFIG} so people can
override it to their specific version (like when cross-compiling).

This is the same way the upstream pkg-config code works.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
11 years agobridge: use rta_getattr_xxx wrappers
Stephen Hemminger [Tue, 30 Oct 2012 00:52:45 +0000 (17:52 -0700)]
bridge: use rta_getattr_xxx wrappers

Don't peek at RTA_DATA() directly.

11 years agobridge: remove trailing whitespace
Stephen Hemminger [Tue, 30 Oct 2012 00:48:55 +0000 (17:48 -0700)]
bridge: remove trailing whitespace

11 years agoss: Get udp sockets info via sock-diag
Pavel Emelyanov [Thu, 25 Oct 2012 03:24:58 +0000 (03:24 +0000)]
ss: Get udp sockets info via sock-diag

Now everything is prepared for it, so the patch is straightforward.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
11 years agoss: Support sock-diag
Pavel Emelyanov [Thu, 25 Oct 2012 03:23:36 +0000 (03:23 +0000)]
ss: Support sock-diag

That is -- write the code, that sends diag request in new format. It's
mostly copied from tcp-diag code. Plus, sock-diag differentiates sockets
by families, thus we have to send two requests sequentially.

If we fail to submit new sock-diag request, try to fall-back and submit
the legacy tcp-diag one.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
11 years agoss: Split inet_show_netlink into parts
Pavel Emelyanov [Thu, 25 Oct 2012 03:21:39 +0000 (03:21 +0000)]
ss: Split inet_show_netlink into parts

The existing function inet_show_netlink sends tcp-diag request and
then receives back the response and prints it on the screen.

The sock-diag and legacy tcp-diag have different request types, but
report sockets in the same format. In order to support both it's
convenient to split the code into sending and receiving parts.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
11 years agoss: Rename some tcp- names into inet-
Pavel Emelyanov [Thu, 25 Oct 2012 03:18:31 +0000 (03:18 +0000)]
ss: Rename some tcp- names into inet-

The sock-diag is capable to diag udp sockets as well. Prepare the
ss code for this by first renaming soon-to-be-generic tcp-s names
into inet-s.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
11 years agoip: fix "ip -6 route add ... nexthop"
Vincent Bernat [Tue, 23 Oct 2012 12:42:55 +0000 (14:42 +0200)]
ip: fix "ip -6 route add ... nexthop"

IPv6 multipath routes were not accepted by "ip route" because an IPv4
address was expected for each gateway. Use `get_addr()` instead of
`get_addr32()`.

Signed-off-by: Vincent Bernat <bernat@luffy.cx>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
11 years agoiplink: add vxlan to man page
Stephen Hemminger [Thu, 25 Oct 2012 16:01:29 +0000 (09:01 -0700)]
iplink: add vxlan to man page

Also sort link types for clarity

11 years agoiplink: Added support for the kernel IPoIB RTNL ops
Or Gerlitz [Thu, 25 Oct 2012 14:57:59 +0000 (16:57 +0200)]
iplink: Added support for the kernel IPoIB RTNL ops

Added support to ipoib rtnl ops through which one can create, configure,
query and delete IPoIB devices, for example

 $ ip link add link ib0.8001 name ib0.8001 type ipoib pkey 0x8001
 $ ip link add link ib0.1 name ib0.1 type ipoib mode connected
 $ ip --details link show dev ib0.1

Cc: Patrick McHardy <kaber@trash.net>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
11 years agoUpdate kernel headers to 3.7-rc1
Stephen Hemminger [Fri, 19 Oct 2012 20:31:05 +0000 (13:31 -0700)]
Update kernel headers to 3.7-rc1

Get new sanitized headers

11 years agovxlan: only send group address if defined
Stephen Hemminger [Fri, 19 Oct 2012 20:25:17 +0000 (13:25 -0700)]
vxlan: only send group address if defined

Don't send 0 as group address.

11 years agovxlan: add support for port range
Stephen Hemminger [Wed, 10 Oct 2012 06:39:17 +0000 (23:39 -0700)]
vxlan: add support for port range

11 years agoiproute2: add support for tcp_metrics
Julian Anastasov [Wed, 3 Oct 2012 12:07:39 +0000 (12:07 +0000)]
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>
11 years agoiproute2: inform user when a neighbor is removed
Nicolas Dichtel [Mon, 8 Oct 2012 16:48:23 +0000 (09:48 -0700)]
iproute2: inform user when a neighbor is removed

When running 'ip monitor neigh', there is no hint to tell if a neighbor is
updated or deleted.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
11 years agoMerge branch 'vxlan'
Stephen Hemminger [Wed, 3 Oct 2012 15:52:59 +0000 (08:52 -0700)]
Merge branch 'vxlan'

Conflicts:
include/linux/if_link.h

11 years agoiproute2-3.6.0 assumes presence of iptables
Matt Burgess [Tue, 2 Oct 2012 18:01:32 +0000 (19:01 +0100)]
iproute2-3.6.0 assumes presence of iptables

Hi,

When compiling iproute2-3.6.0 on a host that doesn't have iptables available, I get the following error:

gcc -Wall -Wstrict-prototypes -O2 -I../include -DRESOLVE_HOSTNAMES
-DLIBDIR=\"/usr/lib\" -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE
-DCONFIG_GACT -DCONFIG_GACT_PROB -DYY_NO_INPUT   -c -o em_ipset.o
em_ipset.c
em_ipset.c:26:21: fatal error: xtables.h: No such file or directory

Fixed by the following patch, which guards the building of em_ipset.o on
the presence of suitable headers.

Thanks,

Matt.

11 years agoUpdate headers to 3.7-pre-rc
Stephen Hemminger [Wed, 3 Oct 2012 15:48:37 +0000 (08:48 -0700)]
Update headers to 3.7-pre-rc

Get latest headers from merge

11 years agoiproute2: List interfaces without net address by default
Petr Písař [Wed, 3 Oct 2012 14:42:41 +0000 (16:42 +0200)]
iproute2: List interfaces without net address by default

This fixes regression in iproute2-3.5.1 when `ip addr show' skipped
interfaces without network layer address.

Wrong output:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:50:54:00:0f:03 brd ff:ff:ff:ff:ff:ff
    inet 10.34.25.198/23 brd 10.34.25.255 scope global eth0
    inet6 2620:52:0:2219:250:54ff:fe00:f03/64 scope global dynamic
       valid_lft 2591919sec preferred_lft 604719sec
    inet6 fe80::250:54ff:fe00:f03/64 scope link
       valid_lft forever preferred_lft forever

Expected output:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:50:54:00:0f:03 brd ff:ff:ff:ff:ff:ff
    inet 10.34.25.198/23 brd 10.34.25.255 scope global eth0
    inet6 2620:52:0:2219:250:54ff:fe00:f03/64 scope global dynamic
       valid_lft 2591896sec preferred_lft 604696sec
    inet6 fe80::250:54ff:fe00:f03/64 scope link
       valid_lft forever preferred_lft forever
5: veth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 8a:ec:35:34:1f:a8 brd ff:ff:ff:ff:ff:ff
6: veth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 2e:97:ef:77:40:82 brd ff:ff:ff:ff:ff:ff

Signed-off-by: Petr Písař <ppisar@redhat.com>
11 years agol2tp: remove references to old bridge utils
Stephen Hemminger [Wed, 3 Oct 2012 15:45:32 +0000 (08:45 -0700)]
l2tp: remove references to old bridge utils

Can no manage interfaces with ip no need to invoke old brctl

12 years agobridge: manage VXLAN based forwarding tables
Stephen Hemminger [Mon, 1 Oct 2012 20:58:01 +0000 (13:58 -0700)]
bridge: manage VXLAN based forwarding tables

Allow extending bridge forwarding table to handle VXLAN as well.
Change format of output to be close to 'ip neighbour'

12 years agoMerge branch 'master' into vxlan
Stephen Hemminger [Mon, 1 Oct 2012 16:05:29 +0000 (09:05 -0700)]
Merge branch 'master' into vxlan

12 years agov3.6.0
Stephen Hemminger [Mon, 1 Oct 2012 15:39:21 +0000 (08:39 -0700)]
v3.6.0

12 years agoupdate header files to 3.6
Stephen Hemminger [Mon, 1 Oct 2012 15:38:03 +0000 (08:38 -0700)]
update header files to 3.6

12 years agovxlan support
Stephen Hemminger [Mon, 24 Sep 2012 19:48:29 +0000 (12:48 -0700)]
vxlan support

12 years agoChange how pdf doc's are created
Werner Fink [Mon, 24 Sep 2012 19:50:37 +0000 (12:50 -0700)]
Change how pdf doc's are created

 Currently the pdf docs are done with
    sgml -> sgmltool -> tex -> latex -> dvi -> dvips -> ps -> ps2pdf -> pdf
 or
    tex -> latex -> dvi -> dvips -> ps -> ps2pdf -> pdf
 with this patch we do
    sgml -> sgmltool -> tex -> pdflatex -> pdf
 or
    tex -> pdflatex -> pdf

12 years agoAdd support for AF_BRIDGE
Stephen Hemminger [Mon, 17 Sep 2012 22:50:27 +0000 (15:50 -0700)]
Add support for AF_BRIDGE

This can be useful when displaying neighbour table

12 years agoiproute2: GENL: merge GENL_REQUEST and GENL_INITIALIZER
Julian Anastasov [Wed, 12 Sep 2012 06:15:19 +0000 (09:15 +0300)]
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>
12 years agoman: make sure tc man page gets installed
Stephen Hemminger [Mon, 17 Sep 2012 22:46:00 +0000 (15:46 -0700)]
man: make sure tc man page gets installed

12 years agoiproute2: bridge: finish removing replace option in man pages
John Fastabend [Fri, 14 Sep 2012 06:50:36 +0000 (23:50 -0700)]
iproute2: bridge: finish removing replace option in man pages

This patch finishes removing the replace option from the bridge
man page which I missed in this commit

commit 57b9785de32404da3d2ac5483469b7fcc5a9c9e7
Author: John Fastabend <john.r.fastabend@intel.com>
Date:   Mon Aug 27 10:52:31 2012 -0700

    iproute2: bridge: remove replace and change options

Also add documentation for "{ self | embedded }" already shown on
the cmd line help msg.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
12 years agoiproute: Add ability to save, restore and show the interfaces' addresses (resend)
Pavel Emelyanov [Tue, 11 Sep 2012 15:47:00 +0000 (19:47 +0400)]
iproute: Add ability to save, restore and show the interfaces' addresses (resend)

This functionality is required by checkpoint-restore project. Since the
dump and restore for routes is already done in ip tool it's naturally to
dump and restore addresses in the ip tool as well.

The implementation logic is the same as for the respective one for routes.
The magic number digits are taken from the Seattle coordinates.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
12 years agoiproute2: use libgenl in ipl2tp
Julian Anastasov [Tue, 11 Sep 2012 09:04:34 +0000 (12:04 +0300)]
iproute2: use libgenl in ipl2tp

Use the common code from libgenl.c to parse family, and initialize
structures.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
12 years agoiproute2: add libgenl files
Julian Anastasov [Tue, 11 Sep 2012 09:04:33 +0000 (12:04 +0300)]
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>
12 years agoiproute2: tc.8: update UNITS section.
Li Wei [Tue, 28 Aug 2012 20:41:56 +0000 (20:41 +0000)]
iproute2: tc.8: update UNITS section.

- rename section UNITS to PARAMETERS.
- break section PARAMETERS down to four subsections to cover the
  common used parameter types(RATES, TIMES, SIZES, VALUES).
- add some explaination for IEC units in RATES.
- point out the max value we can set for RATES, TIMES and SIZES.

Signed-off-by: Li Wei <lw@cn.fujitsu.com>
12 years agoiproute: Add route showdump command (v2)
Pavel Emelyanov [Fri, 27 Jul 2012 04:57:20 +0000 (08:57 +0400)]
iproute: Add route showdump command (v2)

Some time ago the save+restore commands were added to ip route (git
id f4ff11e3, Add ip route save/restore). These two save the raw rtnl
stream into a file and restore one (reading it from stdin).

The problem is that there's no way to get the contents of the dump
file in a human readable form. The proposal is to add a command that
reads the rtnl stream from stdin and prints the data in a way the
usual "ip route list" does?

changes since v1:

* Take the magic at the beginning of the dump file into account
* Check for stdin (the dump is taken from) is not a tty

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
12 years agoiproute: Add magic cookie to route dump file
Pavel Emelyanov [Thu, 26 Jul 2012 18:55:41 +0000 (18:55 +0000)]
iproute: Add magic cookie to route dump file

In order to somehow verify that a blob contains route dump a
4-bytes magic is put at the head of the data and is checked
on restore.

Magic digits are taken from Portland (OR) coordinates :) Is
there any more reliable way of generating such?

Signed-of-by: Pavel Emelyanov <xemul@parallels.com>
12 years agoiproute2: Fix various manpage formatting nits
Andreas Schwab [Thu, 6 Sep 2012 03:09:58 +0000 (03:09 +0000)]
iproute2: Fix various manpage formatting nits

Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>