]> git.proxmox.com Git - mirror_iproute2.git/log
mirror_iproute2.git
11 years agoll_map: use net/if.h to get prototype
Stephen Hemminger [Wed, 27 Mar 2013 16:28:58 +0000 (09:28 -0700)]
ll_map: use net/if.h to get prototype

Better to get prototype from system headers

11 years agoll_map: remove unused address fields
Stephen Hemminger [Wed, 27 Mar 2013 16:26:25 +0000 (09:26 -0700)]
ll_map: remove unused address fields

The address was being stored but not used by current code.

11 years agotc-tbf: remove ancient references to Alpha
Stephen Hemminger [Fri, 22 Mar 2013 18:18:25 +0000 (11:18 -0700)]
tc-tbf: remove ancient references to Alpha

In older versions of traffic shaping the Alpha kernel was special
and had higher HZ. This no longer matters, TC is based on high
resoulution timers in kernel.

11 years agoip xfrm state: Allow different selector family
Thomas Egerer [Wed, 20 Mar 2013 09:18:43 +0000 (02:18 -0700)]
ip xfrm state: Allow different selector family

My previous commit introduced a patch to allow for states with different
ip address families for selector and id. The must have somehow been a
mixup of the patch I tested and the one I send, so the patch sent breaks
the iproute2 build. This patch fixes this. My apologies.

Signed-off-by: Thomas Egerer <hakke_007@gmx.de>
11 years agoip xfrm state: Allow different selector family
Thomas Egerer [Sun, 17 Mar 2013 00:56:01 +0000 (00:56 +0000)]
ip xfrm state: Allow different selector family

Do not enforce the selector of a state to have the same address family
as the id. This makes it possible to configure inter family states.

Signed-off-by: Thomas Egerer <hakke_007@gmx.de>
11 years agobridge: add oneline option
Stephen Hemminger [Sat, 16 Mar 2013 17:18:50 +0000 (10:18 -0700)]
bridge: add oneline option

Split output of 'bridge link' across multiple lines,
only show the flags if -d is set, and add --oneline option
like ip command.

11 years agoman: Add documentation for the bridge link operation.
Vlad Yasevich [Fri, 15 Mar 2013 17:05:08 +0000 (10:05 -0700)]
man: Add documentation for the bridge link operation.

Bridge tool now supports setting and retrieving bridge port specific
link attributes.  Document what attributes are supported and what
they mean.

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
11 years agobridge: Add support for printing bridge port attributes
Vlad Yasevich [Fri, 15 Mar 2013 17:01:28 +0000 (10:01 -0700)]
bridge: Add support for printing bridge port attributes

Output new nested bridge port attributes.

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
11 years agobridge: Add support for setting bridge port attributes
Vlad Yasevich [Fri, 15 Mar 2013 17:01:28 +0000 (10:01 -0700)]
bridge: Add support for setting bridge port attributes

Add netlink support bridge port attributes such as cost, priority, state
and flags.  This also adds support for HW mode such as VEPA or VEB.

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
11 years agoipaddress: minor white space cleanup
Stephen Hemminger [Thu, 14 Mar 2013 20:47:49 +0000 (13:47 -0700)]
ipaddress: minor white space cleanup

Convert leading spaces to tabs, and put alias in one printf

11 years agoipmaddr: add whitespace around =
Stephen Hemminger [Thu, 14 Mar 2013 20:44:25 +0000 (13:44 -0700)]
ipmaddr: add whitespace around =

fix warning from parser

11 years agoiproute2: Mention the 'up' argument in documentation
Petr Šabata [Thu, 14 Mar 2013 14:10:44 +0000 (15:10 +0100)]
iproute2: Mention the 'up' argument in documentation

Both ip-link and ip-address support the 'up' argument, however this
isn't documented in neither their help outputs or ip-address' manpage.
This patch fixes that.

Signed-off-by: Petr Šabata <contyk@redhat.com>
Reported-by: Jiří Popelka <jpopelka@redhat.com>
11 years agoFix build when shared libraries are disabled
Stephen Hemminger [Wed, 13 Mar 2013 15:29:59 +0000 (08:29 -0700)]
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.

11 years agoFix -oneline output when alias present
roopa [Tue, 12 Mar 2013 22:04:02 +0000 (15:04 -0700)]
Fix -oneline output when alias present

This patch removes '\n' in -oneline output when alias
present on interface

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
11 years agoiproute2: Document the -D and -I options
Eric W. Biederman [Mon, 11 Mar 2013 21:59:55 +0000 (14:59 -0700)]
iproute2: Document the -D and -I options

While looking into a sysctl regression in decnet on old kernels I
discovered this omission in the iproute2 documentation.

I can't imagine anyone's muscle memory remembering the longer forms.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
11 years agobridge: cleanup usage message
Stephen Hemminger [Wed, 6 Mar 2013 19:04:29 +0000 (11:04 -0800)]
bridge: cleanup usage message

Fdb usage message got too long.

11 years agobridge: Update bridge man pages to include vlan command
Vlad Yasevich [Thu, 28 Feb 2013 10:04:06 +0000 (10:04 +0000)]
bridge: Update bridge man pages to include vlan command

Add the vlan command documentation to bridge man page.

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
11 years agobridge: Add vlan configuration support
Vlad Yasevich [Thu, 28 Feb 2013 10:04:05 +0000 (10:04 +0000)]
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>
11 years agobridge: Add vlan support to fdb entries
Vlad Yasevich [Thu, 28 Feb 2013 10:04:04 +0000 (10:04 +0000)]
bridge: Add vlan support to fdb entries

Provide the ability to set and show vlans on FDB entries.

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
11 years agoRevert "generalize VXLAN forwarding tables"
Stephen Hemminger [Wed, 6 Mar 2013 19:02:46 +0000 (11:02 -0800)]
Revert "generalize VXLAN forwarding tables"

This reverts commit 90ad5ae77ea4d14e0e1aaa587e48fca5bfde0593.

11 years agogeneralize VXLAN forwarding tables
David Stevens [Thu, 28 Feb 2013 09:26:14 +0000 (09:26 +0000)]
generalize VXLAN forwarding tables

This is the iproute2 support allowing an administrator to specify alternate
ports, vnis and outgoing interfaces for VXLAN device forwarding tables.

Signed-Off-By: David L Stevens <dlstevens@us.ibm.com>
11 years agoiplink_vlan: Add flag for Multiple VLAN Registration Protocol (MVRP)
David Ward [Wed, 27 Feb 2013 13:00:40 +0000 (13:00 +0000)]
iplink_vlan: Add flag for Multiple VLAN Registration Protocol (MVRP)

Signed-off-by: David Ward <david.ward@ll.mit.edu>
Acked-by: Patrick McHardy <kaber@trash.net>
11 years agoip/iptunnel: Fix incorrect syntax in man page
David Ward [Wed, 27 Feb 2013 12:58:15 +0000 (12:58 +0000)]
ip/iptunnel: Fix incorrect syntax in man page

Reported-by: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: David Ward <david.ward@ll.mit.edu>
11 years agoipntable: more fixes for ppc64
Stephen Hemminger [Mon, 4 Mar 2013 21:59:39 +0000 (13:59 -0800)]
ipntable: more fixes for ppc64

Not all arch have sizeof(unsigned long long) == sizeof(__u64)

11 years agofix dependency on sizeof(__u64) == sizeof(unsigned long long)
Stephen Hemminger [Thu, 28 Feb 2013 16:51:46 +0000 (08:51 -0800)]
fix dependency on sizeof(__u64) == sizeof(unsigned long long)

Some platforms like ppc64 have unsigned long long as 128 bits, and
the printf format string would cause errors. Resolve this by using
unsigned long long where necessary (or unsigned long).

11 years agoUpdate kernel headers to 3.9.0-rc1
Stephen Hemminger [Thu, 28 Feb 2013 16:43:46 +0000 (08:43 -0800)]
Update kernel headers to 3.9.0-rc1

11 years agoip: fix ipv6 ntable on ppc64
Stephen Hemminger [Wed, 27 Feb 2013 15:26:17 +0000 (07:26 -0800)]
ip: fix ipv6 ntable on ppc64

Add casts to handle printf format when
 sizeof(unsigned long long) != sizeof(__u64)

11 years agoFix compilation error of m_ipt.c with -Werror enabled
Vijay Subramanian [Tue, 26 Feb 2013 09:12:07 +0000 (09:12 +0000)]
Fix compilation error of m_ipt.c with -Werror enabled

Commit (5a650703d47e10aa386406c855eff5a593b2120b 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>
11 years agoss: show socket memory stats for unix sockets if requested
Hannes Frederic Sowa [Fri, 22 Feb 2013 15:28:18 +0000 (15:28 +0000)]
ss: show socket memory stats for unix sockets if requested

The output format is the same as for tcp sockets but only the following
fields are currently non-zero: sk_rcvbuf, sk_wmem_alloc and sk_sndbuf.

Cc: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
11 years agoss: use rta_getattr_u32
Stephen Hemminger [Wed, 27 Feb 2013 01:32:58 +0000 (17:32 -0800)]
ss: use rta_getattr_u32

11 years agoss: show send queue length on unix domain sockets
Hannes Frederic Sowa [Fri, 22 Feb 2013 15:28:10 +0000 (15:28 +0000)]
ss: show send queue length on unix domain sockets

On sockets in listen state Send-Q reports the maximum backlog,
otherwise it reports allocated socket write memory.

Cc: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
11 years agov3.8.0
Stephen Hemminger [Thu, 21 Feb 2013 16:41:20 +0000 (08:41 -0800)]
v3.8.0

11 years agoiproute2: clearer error messages for fifo and tbf qdiscs
Kees van Reeuwijk [Tue, 19 Feb 2013 07:46:04 +0000 (07:46 +0000)]
iproute2: clearer error messages for fifo and tbf qdiscs

Clearer error messages for fifo and tbf qdiscs:
- Say who is complaining
- Don't just say a parameter is bad, show the offending parameter
- Be clearer about duplicate parameters vs illegal pairs of parameters
- Try to give multiple error messages rather than let the user discover the errors one by one
- When there are parameter aliases, try to use the variant that was used, or at least mention them all

Note that in the old version an empty parameter list to tbf would just cause an explain() message
without a specific error message. By simply removing the relevant error check, the code now
handles this error more gracefully by printing an error message for all mandatory parameters.
It still prints the explain() message.

Signed-off-by: Kees van Reeuwijk <reeuwijk@few.vu.nl>
11 years agortnl_wilddump_request: fix alignment issue for embedded platforms
Lutz Jaenicke [Thu, 30 Aug 2012 05:01:34 +0000 (05:01 +0000)]
rtnl_wilddump_request: fix alignment issue for embedded platforms

Platforms have different alignment requirements which need to be
fulfilled by the compiler. If the structure elements are already
4 byte (NLMGS_ALIGNTO) aligned by the compiler adding an explicit
padding element (align_rta) is not allowed.
Use __attribute__ ((aligned (NLMSG_ALIGNTO))) in order to achieve
the required alignment.
Experienced on ARM (xscale) with symptom
  netlink: 12 bytes leftover after parsing attributes

Tested on:
  ARM      (32bit Big Endian)
  PowerPC  (32bit Big Endian)
  x86_64   (64bit Little Endian)
Each with different aligment requirments.

Signed-off-by: Lutz Jaenicke <ljaenicke@innominate.com>
11 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/shemminger...
Stephen Hemminger [Tue, 19 Feb 2013 15:19:12 +0000 (07:19 -0800)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2

11 years agoip: handle flush with table > 2^31
Stephen Hemminger [Tue, 12 Feb 2013 19:41:46 +0000 (11:41 -0800)]
ip: handle flush with table > 2^31

Fixes Debian bug #700434
Need to table id in filter to be unsigned to avoid conversion to -1

The documentation for "ip" suggests that, when using multiple routing tables, the table ID can be an arbitrary 32 bit number. I've been writing a script that calculates a table Id based on an IP addresses and sets up tables accordingly based on it. This seems to work for everything I've tried except "ip route flush". If you specify a table to flush with an ID over 2^31, it flushes all IPv4 routing tables. For example:

Will delete all routing tables, including the default one. Needless to say, this is quite annoying. I think this is an upstream bug, but your opinions will be greatly appreciated.

11 years agoMakefile: turn on warnings about missing prototypes
Stephen Hemminger [Tue, 12 Feb 2013 19:39:32 +0000 (11:39 -0800)]
Makefile: turn on warnings about missing prototypes

Catches missing, dead code and also places where function should be static.

11 years agolib: make string arguments const
Stephen Hemminger [Tue, 12 Feb 2013 19:39:07 +0000 (11:39 -0800)]
lib: make string arguments const

For lookup routines, make arguments const where possible.

11 years agoip: make local functions static
Stephen Hemminger [Tue, 12 Feb 2013 19:09:03 +0000 (11:09 -0800)]
ip: make local functions static

11 years agoiproute2: improved error messages
Kees van Reeuwijk [Fri, 8 Feb 2013 03:32:36 +0000 (03:32 +0000)]
iproute2: improved error messages

This patch improves many error messages as follows:
- For incorrect parameters, show the value of the offending parameter, rather than just say that it is incorrect
- Rephrased messages for clarity
- Rephrased to more `mainstream' english

Signed-off-by: Kees van Reeuwijk <reeuwijk@few.vu.nl>
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 agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/shemminger...
Stephen Hemminger [Fri, 7 Dec 2012 17:04:38 +0000 (09:04 -0800)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2

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>