]> git.proxmox.com Git - mirror_iproute2.git/log
mirror_iproute2.git
14 years agoiproute2: avoid using bashisms in configure script.
Andreas Henriksson [Fri, 1 Jan 2010 22:20:30 +0000 (23:20 +0100)]
iproute2: avoid using bashisms in configure script.

"function foo" should be "foo()" to work when sh is not bash.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
14 years agotc: respect LDFLAGS for %.so targets
Mike Frysinger [Sat, 26 Dec 2009 19:52:36 +0000 (14:52 -0500)]
tc: respect LDFLAGS for %.so targets

Since there aren't any targets that currently use this pattern rule, this
is more of a proactive fix.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoiproute2/iplink: add macvlan options for bridge mode
Arnd Bergmann [Sat, 26 Dec 2009 19:22:57 +0000 (11:22 -0800)]
iproute2/iplink: add macvlan options for bridge mode

Macvlan can now optionally support forwarding between its
ports, if they are in "bridge" mode. This adds support
for this option to "ip link add", "ip link set" and "ip
-d link show".

The default mode in the kernel is now "vepa" mode, meaning
"virtual ethernet port aggregator". This mode is used
together with the "hairpin" mode of an ethernet bridge
that the parent of the macvlan device is connected to.
All frames still get sent out to the external interface,
but the adjacent bridge is able to send them back on
the same wire in hairpin mode, so the macvlan ports
are able to see each other, which the bridge can be
configured to monitor and control traffic between
all macvlan instances. Multicast traffic coming in
from the external interface is checked for the source
MAC address and only delivered to ports that have not
yet seen it.

In bridge mode, macvlan will send all multicast traffic
to other interfaces that are also in bridge mode but
not to those in vepa mode, which get them on the way
back from the hairpin.

The third supported mode is "private", which prevents
communication between macvlans even if the adjacent
bridge is in hairpin mode. This behavior is closer to
the original implementation of macvlan but stricly
maintains isolation.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
14 years agoAdd dadfailed option to ip command
Brian Haley [Thu, 3 Dec 2009 10:39:36 +0000 (10:39 +0000)]
Add dadfailed option to ip command

Fix support for IFA_F_DADFAILED and update ip.8 man page.

Signed-off-by: Brian Haley <brian.haley@hp.com>
14 years agoiprule: add oif classification support
Patrick McHardy [Thu, 3 Dec 2009 20:07:14 +0000 (20:07 +0000)]
iprule: add oif classification support

David Miller wrote:
> From: Patrick McHardy <kaber@trash.net>
> Date: Mon, 30 Nov 2009 19:00:14 +0100
>
>> This patch contains iproute support for iprule oif classification
>> for the send-to-self RFC I just sent out.
>
> Patrick, you need to submit a new version of this patch with
> the FIB_RULE_* macro fixed, just like the kernel version got
> fixed.

Thanks for reminind me of this. New patch attached.

commit 0fe5164cbaa1d65dda341075710be71bf1f32d10
Author: Patrick McHardy <kaber@trash.net>
Date:   Fri Dec 4 07:06:18 2009 +0100

    iprule: add oif classification support

Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agoskbedit: Add support to mark packets
Jamal Hadi Salim [Sat, 26 Dec 2009 19:12:43 +0000 (11:12 -0800)]
skbedit: Add support to mark packets

This adds support for setting the skb mark.

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
14 years agoiplink_vlan: add support for VLAN loose binding flag
Patrick McHardy [Tue, 1 Dec 2009 01:21:39 +0000 (01:21 +0000)]
iplink_vlan: add support for VLAN loose binding flag

This patch adds support for the VLAN loose binding flag that is
supported in net-next to iplink_vlan.

commit 870970deb6cbea7a5d4881bdd717304d5284d315
Author: Patrick McHardy <kaber@trash.net>
Date:   Tue Dec 1 12:21:15 2009 +0100

    iplink_vlan: add support for VLAN loose binding flag

Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agoUpdate exported kernel headers
Stephen Hemminger [Sat, 26 Dec 2009 19:02:25 +0000 (11:02 -0800)]
Update exported kernel headers

These corespond with 2.6.33-rc2

14 years agoiproute2-091226
Stephen Hemminger [Sat, 26 Dec 2009 18:26:44 +0000 (10:26 -0800)]
iproute2-091226

14 years agoSlightly improve the configure script.
Andreas Henriksson [Wed, 2 Dec 2009 05:12:30 +0000 (05:12 +0000)]
Slightly improve the configure script.

Split up in functions. Make XT checks bail if previous XT check
was successful.

This result improves the output of the configure script to not indicate
using iptables only because the last test failed (when previous ones could
have already succeded).

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
14 years agoFix warning about sprintf() and NSTAT_HIST
Stephen Hemminger [Sat, 26 Dec 2009 18:21:13 +0000 (10:21 -0800)]
Fix warning about sprintf() and NSTAT_HIST

The environment variable could contain format characters, causing
problems. Better to just use it directly.

14 years agoFix warning about strtod() return value
Stephen Hemminger [Sat, 26 Dec 2009 18:20:50 +0000 (10:20 -0800)]
Fix warning about strtod() return value

14 years agoflush secondary addresses before primary ones
Simon Horman [Thu, 3 Dec 2009 01:08:27 +0000 (12:08 +1100)]
flush secondary addresses before primary ones

Unless promote_secondaries has been active deleting the primary address of
an interface will automatically delete all the secondary addresses.

In the case where ip flush requests the primary then secondary addresses to
be removed - which is the order the addresses are returned by the kernel -
this will cause an error as by the time the request to remove a secondary
address is made it will be missing as it will have been deleted in the
course of deleting the primary address.

This approach to solving this problem orders requests for the
deletion of secondary addresses before primary ones providing
rtnl_dump_filter_l(), a version of rtnl_dump_filter() that
iterates over a list of filters. And by providing two specialised
filters print_addrinfo_secondary() and print_addrinfo_primary().

rtnl_dump_filter_l() first iterates over all addresses using
print_addrinfo_secondary(), which appends secondary addresses to the
request buffer.  Then again using print_addrinfo_primary() which appends
primary addresses.

This approach should work regardless of it promote_secondaries is
active or not. And regardless of if any primary of secondary addresses
are present or not.

Signed-off-by: Simon Horman <horms@verge.net.au>
14 years agoAdd new (iptables 1.4.5 compatible) tc/ipt/xt module.
Andreas Henriksson [Wed, 2 Dec 2009 15:11:50 +0000 (16:11 +0100)]
Add new (iptables 1.4.5 compatible) tc/ipt/xt module.

Add a new cleaned up m_xt.c based on m_xt_old.c
The new m_xt.c has been updated to use the new names and new api
that xtables exposes in iptables 1.4.5.
All the old internal api cruft has also been dropped.

Additionally, a configure script test is added to check for
the new xtables api and set the TC_CONFIG_XT flag in Config.
(tc/Makefile already handles this flag in previous commit.)

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
14 years agoKeep the old tc/ipt/xt module for compatibility.
Andreas Henriksson [Wed, 2 Dec 2009 15:11:21 +0000 (16:11 +0100)]
Keep the old tc/ipt/xt module for compatibility.

Move the file and rename the configure flags.
The file is being kept around for iptables < 1.4.5 compatibility.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
14 years agoiproute: make ss --help output to stdout
Andreas Henriksson [Mon, 7 Dec 2009 12:12:36 +0000 (13:12 +0100)]
iproute: make ss --help output to stdout

Peter Palfrader said in http://bugs.debian.org/545008 that
"--help output, if explicitly requested, should go to stdout, not stderr."
which this patch fixes.

Additionally, the exit code was adjusted to success if help was
explicitly requested.

(Syntax error still outputs to stderr and has the same exit code.)

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
14 years agof_fw: fix compat mode
Patrick McHardy [Mon, 23 Nov 2009 11:03:41 +0000 (12:03 +0100)]
f_fw: fix compat mode

The kernel takes a lack of options as indication that the fw classifier
should operate in compatibility mode, where marks are mapped directly to
classids.

Commit e22b42a (tc mask patch) broke this by adding an empty TCA_OPTIONS
attribute even if no handle is specified. Restore the old behaviour.

Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agoiproute2: use -fPIC in lib/
Andreas Henriksson [Mon, 23 Nov 2009 10:03:52 +0000 (11:03 +0100)]
iproute2: use -fPIC in lib/

The static libnetlink.a library is exposed to other users in Debian via the
"iproute-dev" package. Apparently people are interested in using it in their
shared libraries and would like to see the code be position independent.

Patch below makes the code under lib/ build with -fPIC.

See http://bugs.debian.org/547602

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
14 years agoiproute: "ip mroute show" doesn't show all output interfaces
Mark Borst [Wed, 2 Dec 2009 00:15:15 +0000 (16:15 -0800)]
iproute: "ip mroute show" doesn't show all output interfaces

The command "ip mroute show" will only show the first Oif.

mark@flappie:~$ ip mroute show
(192.168.1.1, 224.0.0.123)       Iif: _rename    Oifs: eth1

mark@flappie:~$ cat /proc/net/ip_mr_cache
Group    Origin   Iif     Pkts    Bytes    Wrong Oifs
7B0000E0 0101A8C0 2          0        0        0  0:1    1:1

This shows 2 Oifs here. However, ipmroute.c, function read_mroute_list(), uses sscanf() with a %s mask for oiflist, which stops after the first whitespace (i.e. after Oif 0:1). The patch below fixes this to read until the newline (though I'm not sure whether this is the proper way to fix it).

After this patch:
mark@flappie:~/iproute-20090324/ip$ ./ip mroute show
(192.168.1.1, 224.0.0.123)       Iif: _rename    Oifs: eth1 eth0

This patch originally submitted as http://bugs.debian.org/550097

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
14 years agoipv6: Add IFA_F_DADFAILED flag
Brian Haley [Tue, 1 Dec 2009 23:58:44 +0000 (15:58 -0800)]
ipv6: Add IFA_F_DADFAILED flag

Add IFA_F_DADFAILED flag to denote an IPv6 address that has
failed Duplicate Address Detection, that way tools like
/sbin/ip can be more informative.

3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
    inet6 2001:db8::1/64 scope global tentative dadfailed
       valid_lft forever preferred_lft forever

Signed-off-by: Brian Haley <brian.haley@hp.com>
14 years agoiproute2: Add ll_index_to_addr function
David Ward [Thu, 15 Oct 2009 18:53:13 +0000 (14:53 -0400)]
iproute2: Add ll_index_to_addr function

After calling ll_init_map, all of the information stored in the link-layer map
can be retrieved by function calls (ll_index_to_*), except for the link-layer
address. This patch fills the gap by adding a ll_index_to_addr function.
Changes welcome.

Signed-off-by: David Ward <david.ward@ll.mit.edu>
14 years agoiproute2 add hoplimit parsing and update usage and documentation
Gilad Ben-Yossef [Tue, 6 Oct 2009 13:40:34 +0000 (15:40 +0200)]
iproute2 add hoplimit parsing and update usage and documentation

- Parse and handle the hoplimit ip route option and add it to the usage
  line and documentation.

- Add the missing reordering ip route option to the usage line.

- Add documentation for initcwnd ip route option.

Tested by setting hoplimit and retreiving it via "show".

Signed-off-by: Gilad Ben-Yossef <gilad@codefidence.com>
[ported to HEAD, fixed a bug with hoplimit lock handling, added documentation]
Signed-off-by: Ori Finkelman <ori@comsleep.com>
Signed-off-by: Yony Amit <yony@comsleep.com>
14 years agoRemove Changes: comments
Stephen Hemminger [Tue, 1 Dec 2009 23:49:48 +0000 (15:49 -0800)]
Remove Changes: comments

Discourage developers from putting change log in comments
now that software has been under change control for 5 years.

14 years agoiproute2: Support 20-byte link layer address in idxmap
David Ward [Thu, 15 Oct 2009 18:53:21 +0000 (14:53 -0400)]
iproute2: Support 20-byte link layer address in idxmap

Extend the link-layer address field from 8 to 20 bytes to support InfiniBand.

Signed-off-by: David Ward <david.ward@ll.mit.edu>
14 years agoiproute2-091117
Stephen Hemminger [Tue, 17 Nov 2009 18:04:57 +0000 (10:04 -0800)]
iproute2-091117

14 years agoIgnore GDB related files
Mike Frysinger [Fri, 13 Nov 2009 22:20:41 +0000 (14:20 -0800)]
Ignore GDB related files

Revised version of Mike's original patch

14 years agoAdd more files to gitignore
Stephen Hemminger [Fri, 13 Nov 2009 22:18:35 +0000 (14:18 -0800)]
Add more files to gitignore

Ignore files from cscope, patch, etc.

14 years agotc: remove dlfcn.h from files that dont need it
Mike Frysinger [Wed, 4 Nov 2009 04:26:34 +0000 (04:26 +0000)]
tc: remove dlfcn.h from files that dont need it

A bunch of source files look like they're copy & pasted from other files,
and some include header files that they don't actually need.  Since dlfcn
has very specific usage (and is a pain on a static-only system), drop it
where it isn't really needed.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoAdd static-syms.h to ignore
Stephen Hemminger [Tue, 10 Nov 2009 18:45:05 +0000 (10:45 -0800)]
Add static-syms.h to ignore

14 years agosupport static-only systems
Mike Frysinger [Fri, 6 Nov 2009 11:09:22 +0000 (06:09 -0500)]
support static-only systems

The iptables code supports a "no shared libs" mode where it can be used
without requiring dlfcn related functionality.  This adds similar support
to iproute2 so that it can easily be used on systems like nommu Linux (but
obviously with a few limitations -- no dynamic plugins).

Rather than modify every location that uses dlfcn.h, I hooked the dlfcn.h
header with stub functions when shared library support is disabled.  Then
symbol lookup is done via a local static lookup table (which is generated
automatically at build time) so that internal symbols can be found.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoarpd/ifstat/nstat/rtacct: use daemon()
Mike Frysinger [Fri, 6 Nov 2009 11:04:39 +0000 (06:04 -0500)]
arpd/ifstat/nstat/rtacct: use daemon()

A bunch of misc utils basically reimplement the daemon() function (the
whole fork/close/chdir/etc...).  Rather than do that, use daemon() as
that will work under nommu Linux systems that lack fork().

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoiproute uses too small of a receive buffer
Patrick McHardy [Wed, 28 Oct 2009 19:50:48 +0000 (20:50 +0100)]
iproute uses too small of a receive buffer

It uses 1MB as receive buf limit by default (without
increasing /proc/sys/net/core/rmem_max it will be limited by less
however) and allows to specify the size manually using "-rcvbuf X"
(-r is already used, so you need to specify at least -rc).

Additionally rtnl_listen() continues on ENOBUFS after printing the
error message.

14 years agoFix flushing code - rtnl_send_check
Sven Anders [Tue, 10 Nov 2009 17:07:26 +0000 (09:07 -0800)]
Fix flushing code - rtnl_send_check

I experienced an error, if I try to perform a

  ip route flush proto 4

with many routes in a complex environment, it
gave me the following error:

  Failed to send flush request: Success
  Flush terminated

14 years agoConsolidate fprintf statements
Stephen Hemminger [Tue, 10 Nov 2009 17:01:57 +0000 (09:01 -0800)]
Consolidate fprintf statements

Doing one item per call is like old MODULA2 code.

14 years agoUpdate to 2.6.32 kernel headers
Stephen Hemminger [Tue, 10 Nov 2009 16:51:17 +0000 (08:51 -0800)]
Update to 2.6.32 kernel headers

14 years agoss: adds a space before congestion string
Eric Dumazet [Fri, 11 Sep 2009 08:32:29 +0000 (10:32 +0200)]
ss: adds a space before congestion string

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
14 years agoss: correct display of sk pointer
Eric Dumazet [Fri, 11 Sep 2009 07:48:07 +0000 (09:48 +0200)]
ss: correct display of sk pointer

On 64bit arches, sk pointer was 32/32 reversed.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
14 years agoUpdate kernel headers to 2.6.31
Stephen Hemminger [Thu, 10 Sep 2009 16:03:22 +0000 (09:03 -0700)]
Update kernel headers to 2.6.31

Final 2.6.31 released, so update sanitized headers.

14 years agoadd include/linux/if_arp.h
Stephen Hemminger [Wed, 26 Aug 2009 16:41:02 +0000 (09:41 -0700)]
add include/linux/if_arp.h

14 years agotc/q_atm.so: respect LDFLAGS
Mike Frysinger [Fri, 29 May 2009 22:37:40 +0000 (18:37 -0400)]
tc/q_atm.so: respect LDFLAGS

The q_atm.so target defines its own link target, but it doesn't respect the
$(LDFLAGS) variable.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoiproute: typo in ip manpage
Andreas Henriksson [Tue, 4 Aug 2009 08:19:23 +0000 (10:19 +0200)]
iproute: typo in ip manpage

Fix spelling (s/commoand/command/) in ip(8) manpage.

Spotted by dann frazier <dannf@hp.com> - http://bugs.debian.org/539830

14 years agoFix typo in IPPROTO_DCCP
Stephen Hemminger [Thu, 6 Aug 2009 21:38:18 +0000 (14:38 -0700)]
Fix typo in IPPROTO_DCCP

14 years agoupdate kernel headers to 2.6.31-rc5
Stephen Hemminger [Thu, 6 Aug 2009 21:38:13 +0000 (14:38 -0700)]
update kernel headers to 2.6.31-rc5

14 years agoFix flushing of large number of entries
Stephen Hemminger [Mon, 13 Jul 2009 17:15:23 +0000 (10:15 -0700)]
Fix flushing of large number of entries

Checking for errors would cause some responses to be lost.

14 years agofix handling of GRED DPs args
Stephen Hemminger [Tue, 26 May 2009 22:58:05 +0000 (15:58 -0700)]
fix handling of GRED DPs args

14 years agoiproute2: Support for the CAN netlink
Wolfgang Grandegger [Tue, 12 May 2009 09:42:50 +0000 (11:42 +0200)]
iproute2: Support for the CAN netlink

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
14 years agoiproute2: Fixes an issue with cross-compilation
Wolfgang Grandegger [Tue, 12 May 2009 09:42:49 +0000 (11:42 +0200)]
iproute2: Fixes an issue with cross-compilation

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
14 years agoiproute2: ISATAP potential router list
Sascha Hlusiak [Sun, 3 May 2009 23:44:47 +0000 (01:44 +0200)]
iproute2: ISATAP potential router list

--Boundary-01=_wxi/JRaNdLkbr7g
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi Stephen,

please review attached patch to add support for in-kernel potential router=
=20
lists for ISATAP tunnels.

Usage:
ip tunnel add name isatap0 mode isatap local 192.168.1.100
ip tunnel prl dev isatap0 prl-default 192.168.1.1
ip tunnel prl dev isatap0 prl-nodefault 192.168.1.2
ip tunnel prl dev isatap0 prl-delete 192.168.1.1
ip tunnel show # pr and pdr will be listed as well

Patch based on http://osprey67.com/seal/iproute2_diff.v0_3.txt by Fred L.=20
Templin.

Thanks,
Sascha

14 years agoFilter class output by classid
Denys Fedoryshchenko [Tue, 26 May 2009 22:20:26 +0000 (15:20 -0700)]
Filter class output by classid

Sometimes while dividing bandwidth by classes it is useful to see how some
specific class doing things live.

Which my simple patch it is possible to do
watch -n1 "tc -s -d class show dev eth0.2022 classid 1:1520"
and to get live statistics, how packets queued or dropped, and how much
bandwidth used (if estimator defined) for specific class.

Signed-off-by: Denys Fedoryshchenko <denys@visp.net.lb>
14 years agoBug#526329: iproute: Segfault on garbage lladdr
Andreas Henriksson [Thu, 30 Apr 2009 14:50:50 +0000 (16:50 +0200)]
Bug#526329: iproute: Segfault on garbage lladdr

On tor, 2009-04-30 at 14:32 +0100, Timothy Baldwin wrote:
> Package: iproute
> Version: 20090324-1
> Severity: minor
>
>
> $ ip link set eth0 address help
> "help" is invalid lladdr.
> Segmentation fault
>
> Desipte the invalid command line arguments it shouldn't crash.
>

Callers need to check return value from ll_addr_a2n(). Patch below.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
14 years agoAllow default DP of zero in gred
Stephen Hemminger [Tue, 26 May 2009 22:15:01 +0000 (15:15 -0700)]
Allow default DP of zero in gred

To emulate WRED behaviour, allow default DP of zero.

14 years agoAdd IPV6 match pretty print
Stephen Hemminger [Tue, 26 May 2009 22:14:29 +0000 (15:14 -0700)]
Add IPV6 match pretty print

15 years agoAdd u32 extension to match on ether source/destination
Stephen Hemminger [Wed, 15 Apr 2009 22:39:34 +0000 (15:39 -0700)]
Add u32 extension to match on ether source/destination

Use existing u32 mechanism to match based on Ethernet header.
No need for protocol that already exists.

15 years agoFix display of xfrm
Thomas Egerer [Tue, 14 Apr 2009 23:15:17 +0000 (16:15 -0700)]
Fix display of xfrm

When using iproute2 to display information on policies installed in kernel
(ip x p s) output is incorrect: IPv6 addresses printed as IPv4 addresses.
In case I am dealing with inter protocol policies where the template's address
family differs from those of the policy itself.
The patch attached solves this problem.

15 years agocgroup support
Thomas Graf [Thu, 9 Apr 2009 11:01:51 +0000 (07:01 -0400)]
cgroup support

Stephen,

iproute2 part of the cgroup classifier that has been included upstream
for a while. Please apply.

15 years agoiproute2: add vcan to ip link help text
Oliver Hartkopp [Fri, 27 Mar 2009 19:22:34 +0000 (20:22 +0100)]
iproute2: add vcan to ip link help text

Hello Stephen,

thanks für the commit of my last CAN patch.

Today i got a hint, that the help text of 'ip link' can be improved also.

Many thanks!

Oliver

Signed-Off-By: Oliver Hartkopp <oliver@hartkopp.net>
15 years agoRemove goto chain
Stephen Hemminger [Fri, 3 Apr 2009 16:38:56 +0000 (09:38 -0700)]
Remove goto chain

The selector logic is clearer with if / else if

15 years agoiproute2-2.6.14-051107: missing arpd directory
Olaf Rempel [Wed, 9 Nov 2005 14:25:40 +0000 (15:25 +0100)]
iproute2-2.6.14-051107: missing arpd directory

arpd requires a directory (/var/lib/arpd/) to run.
see attached patch, which lets iproute create this directroy during install.

15 years agoAdd support Controller Area Network
Oliver Hartkopp [Fri, 27 Mar 2009 18:21:29 +0000 (11:21 -0700)]
Add support Controller Area Network

t's not a big problem, but it makes a better show in 'ip link show' on
CAN interfaces :-)

I also moved __PF(CAN,can) in ll_proto.c to the same position where it
can be found in if_ether.h .

The only thing i did not know if the __PF(CAN,can) in ll_types.c needs
to be put in #ifdef ARPHDR_CAN like __PF(HWX25,hwx25) is or not. You
definitely know that better than me.

15 years agoip6tunnel: Fix no default display of ip4ip6 tunnels
Srivats P [Fri, 27 Mar 2009 18:17:26 +0000 (11:17 -0700)]
ip6tunnel: Fix no default display of ip4ip6 tunnels

"ip -6 tunnel show" displays only ip6ip6 tunnels not ip4ip6 tunnels
 - it should display all irrespective of proto.

This is because the default tunnel proto is initialized to IPPROTO_IPV6 in ip6_tnl_parm_init() which is fine for a 'add' command but not for 'show'. This patch overrides proto with 0 signifying 'mode any' as the default in case of a 'show'.

15 years agoiptunnel: allow ISATAP with stateless autoconf
Sascha Hlusiak [Fri, 27 Mar 2009 18:14:00 +0000 (11:14 -0700)]
iptunnel: allow ISATAP with stateless autoconf

please commit my patch below to the iproutes package. It just an incorrect
check so that adding an isatap tunnel with remote works, since it's needed if
one wants to use stateless autoconf. The current check makes tunnel mode
isatap unusable for all client users.

15 years agoiproute2: drop equalize support.
Andreas Henriksson [Sat, 14 Mar 2009 16:37:35 +0000 (17:37 +0100)]
iproute2: drop equalize support.

Hello Stephen and netdev people!

Currently you can configure "equalize" and it looks all fine and dandy.
The kernel has the interface defined, but apparently there's never actually
been any implementation for it (only a never merged patch in the 2.4 era).

I'm suggesting to drop the code to give any potential users of this feature
the benefit of receiving a proper error message. I see it unlikely that
this will be implemented in the near future, but if it ever happens
reviving the iproute2 side should be as easy as git revert this patch.

For more details see http://bugs.debian.org/149897

Regards,
Andreas Henriksson

15 years agoEnable Type Labels For "ip monitor all"
Varun Chandramohan [Thu, 12 Mar 2009 08:12:43 +0000 (13:42 +0530)]
Enable Type Labels For "ip monitor all"

This patch adds prefix lables for "ip monitor all" command to simplfy
understanding of the output.

Signed-off-by: Varun Chandramohan <varunc@linux.vnet.ibm.com>
15 years agoAdd Monitor Support For Neigh Table
Varun Chandramohan [Thu, 12 Mar 2009 08:12:07 +0000 (13:42 +0530)]
Add Monitor Support For Neigh Table

This patch adds exclusive support to enable monitoring
neighbour table entries in ip command.

Signed-off-by: Varun Chandramohan <varunc@linux.vnet.ibm.com>
15 years agoremove duplicate limits.h
Stephen Hemminger [Fri, 27 Mar 2009 18:07:46 +0000 (11:07 -0700)]
remove duplicate limits.h

15 years agoChanging commandline help text to be more uniform...
Petr Jediný [Thu, 7 Aug 2008 14:45:33 +0000 (16:45 +0200)]
Changing commandline help text to be more uniform...

15 years agoip: Allow for easier debug of buggy devices that dont send their names
jamal [Fri, 8 Aug 2008 14:06:17 +0000 (10:06 -0400)]
ip: Allow for easier debug of buggy devices that dont send their names

patch attached this time..

On Fri, 2008-08-08 at 10:01 -0400, jamal wrote:
> wireless drivers using wext is a prime example if you need a test case.
>
> cheers,
> jamal

ip: Allow for easier debug of buggy devices that dont send their names

With the old message couldnt tell which device had the bug.
This patch provides at least an ifindex to narrow it down.
Theres also no point in bailing out because of one bug; we
allow it to go on so we could dump as much info as we can

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
15 years agoFix headers needed for gre
Stephen Hemminger [Tue, 24 Mar 2009 22:40:54 +0000 (15:40 -0700)]
Fix headers needed for gre

Need to get right headers or build breaks.

15 years agoUpdate snapshot
Stephen Hemminger [Tue, 24 Mar 2009 22:14:48 +0000 (15:14 -0700)]
Update snapshot

15 years agoUse sanatized headers from 2.6.29
Stephen Hemminger [Tue, 24 Mar 2009 22:13:31 +0000 (15:13 -0700)]
Use sanatized headers from 2.6.29

Update to final 2.6.29 headers

15 years agoHandle default hoplimit
Stephen Hemminger [Mon, 23 Mar 2009 17:49:21 +0000 (10:49 -0700)]
Handle default hoplimit

Default for hoplimit is -1 which should be displayed as zero.

15 years agoAdd support for IFALIAS
Stephen Hemminger [Mon, 23 Mar 2009 17:46:47 +0000 (10:46 -0700)]
Add support for IFALIAS

New 2.6.28 support for text description

15 years agoAdd DHCP as routing protocol
Stephen Hemminger [Wed, 18 Mar 2009 20:33:12 +0000 (13:33 -0700)]
Add DHCP as routing protocol

15 years agoAdd missing limits.h
Stephen Hemminger [Mon, 2 Mar 2009 04:36:38 +0000 (20:36 -0800)]
Add missing limits.h

Need limits.h to get INT_MIN on Debian

15 years agoFix memory leak in local options
Denys Fedoryschenko [Sat, 7 Feb 2009 13:49:32 +0000 (08:49 -0500)]
Fix memory leak in local options

This change was forgotten by Stephen in the last release

Signed-off-by: Denys Fedoryschenko <denys@visp.net.lb>
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
15 years agoBreakage noticed when debian upgraded to xtables (iptables > 1.4.1)
Jamal Hadi Salim [Sat, 7 Feb 2009 13:19:20 +0000 (08:19 -0500)]
Breakage noticed when debian upgraded to xtables (iptables > 1.4.1)

Many thanks to Yevgeny Kosarzhevsky <yevg@pisem.net> for reporting
and a lot of testing

Thanks to Jan Engelhardt <jengelh@medozas.de> for a lot of advice
Thanks to Denys Fedoryschenko <denys@visp.net.lb> for some sample
code that he tried and thanks to Andreas Henriksson <andreas@fatal.se>
(who maintains iproute2 on debian) for the persistent followup.

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
15 years agofix uninitialized memory in tc_skbedit
Stephen Hemminger [Thu, 19 Feb 2009 16:59:06 +0000 (08:59 -0800)]
fix uninitialized memory in tc_skbedit

Original from: Alexander Duyck <alexander.h.duyck@intel.com>

A bug was found in which the memory for the tc_skbedit struct was being
used uninitialized to 0.  Alternative version of original fix
using initializer rather than memset.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
15 years agoiproute: add DRR support
Patrick McHardy [Wed, 19 Nov 2008 15:08:05 +0000 (16:08 +0100)]
iproute: add DRR support

add DRR support

This patch adds support for the DRR scheduler I just sent
to iproute.

Signed-off-by: Patrick McHardy <kaber@trash.net>
15 years agoUpdate snapshot
Stephen Hemminger [Thu, 15 Jan 2009 20:25:04 +0000 (12:25 -0800)]
Update snapshot

15 years agoFix compile warnings
Stephen Hemminger [Thu, 8 Jan 2009 01:20:43 +0000 (17:20 -0800)]
Fix compile warnings

Gcc now warns about possible errors from passing a string
buffer as format arguement to printf().

15 years agoFix leftovers from earlier change
Stephen Hemminger [Thu, 8 Jan 2009 01:20:14 +0000 (17:20 -0800)]
Fix leftovers from earlier change

Still had references to l_name.

15 years agoFix tc/m_ipt memory leaks
Denys Fedoryshchenko [Wed, 7 Jan 2009 03:41:50 +0000 (19:41 -0800)]
Fix tc/m_ipt memory leaks

1)optind according iptables sources have to be set to 0. If it is set to 1, in
batch it will mess up things. Also in iptables sources i notice that ->tflags
and ->used need to be reset.

2)Since target->t = fw_calloc(1, size); allocated memory in function build_st,
it have to be freed at the end, or in batch we will have memory leak. TODO:
Probably it must be freed in all "return -1" cases in parse_ipt after
build_st. About this i am not sure, up to Stephen.

3)new_name was malloc'ed, but not freed

15 years agoWhen the preferred lifetime of a prefix assigned by IPv6 autoconfiguration
Benedikt Gollatz [Wed, 7 Jan 2009 03:36:56 +0000 (19:36 -0800)]
When the preferred lifetime of a prefix assigned by IPv6 autoconfiguration
(router solicitation) becomes negative

How reproducible:

Always.

Steps to Reproduce:
1. Configure an IPv6 router to advertise a prefix with a short preferred
lifetime, e.g. 0.
2. Wait for the IPv6 autoconfiguration process to complete for an interface
<if> connected to a link where that router advertises.
3. Run ip -6 show dev <if>.

Actual results:

The preferred lifetime will have become negative, but it is printed as an
unsigned integer. The preferred lifetime to be displayed will therefore be
close to UINT_MAX.

15 years agoadd support for multiq qdisc
Alexander Duyck [Fri, 5 Dec 2008 22:16:42 +0000 (14:16 -0800)]
add support for multiq qdisc

Add support for multiq qdisc
This patch adds the ability to configure the multiq qdisc.  Since the qdisc does not require any input it will pull the number of bands directly from the device that it is added to the root of.

usage: tc qdisc add dev <DEV> root handle <HANDLE> multiq

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
15 years agoadd support for skbedit action
Alexander Duyck [Wed, 7 Jan 2009 03:27:03 +0000 (19:27 -0800)]
add support for skbedit action

Provides ability to edit queue_mapping field
Provides ability to edit priority field

usage: action skbedit [queue_mapping QUEUE_MAPPING] [priority PRIORITY]
at least one option must be select, or both at the same time

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
15 years agoip maddr show” on an infiniband address causes a stack corruption
Olivier Fourdan [Tue, 25 Nov 2008 12:36:22 +0000 (12:36 +0000)]
ip maddr show” on an infiniband address causes a stack corruption

“ip maddr show” on an infiniband address causes a stack corruption
because the length of the address for Infiniband (20 bytes, as
described in kernel doc Documentation/infiniband/ipoib.txt) does not
fit on the 16 bytes of the field in which it gets stored.

The proposed patch increases the size of the hardware address from 4
__u32 to 8 and also adds a check to avoid overriding the available
size while parsing the hardware address.

This bug affects current upstream code AFAICT.

Hope this helps,
Cheers,
Olivier.

“ip maddr show ib0” causes a stack corruption because the length of the address
for Infiniband (20 see kernel doc Documentation/infiniband/ipoib.txt) does not
fit on the 16 bytes of the field in which it gets stored.

The proposed patch increases the size of the hardware address from 4 u32 to 8
and adds a check to avoid overriding the available size while parsing the
hardware address.

15 years agoUpdate version of IP gre
Herbert Xu [Wed, 7 Jan 2009 02:27:52 +0000 (18:27 -0800)]
Update version of IP gre

This patch adds support for configuring GRE tunnels using the
new rtnl_link interface.  This only works on kernels that have
the new GRE configuration interface.

This is accessed through the "ip link" command.  The previous
tunnel configuration interface "ip tunnel" remains as it is
and should be retained for compatibility with old kernels.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
15 years agoip: gre: Add GRE configuration support through rtnl_link
Herbert Xu [Thu, 9 Oct 2008 07:08:24 +0000 (15:08 +0800)]
ip: gre: Add GRE configuration support through rtnl_link

This patch adds support for configuring GRE tunnels using the
new rtnl_link interface.  This only works on kernels that have
the new GRE configuration interface.

This is accessed through the "ip link" command.  The previous
tunnel configuration interface "ip tunnel" remains as it is
and should be retained for compatibility with old kernels.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
15 years agoUpdate headers to 2.6.28
Stephen Hemminger [Tue, 6 Jan 2009 23:03:26 +0000 (15:03 -0800)]
Update headers to 2.6.28

Put in sanitized 2.6.28 headers

15 years agoRestore old address parsing but with checking
Stephen Hemminger [Mon, 27 Oct 2008 17:27:27 +0000 (10:27 -0700)]
Restore old address parsing but with checking

Go back to original address parsing for compatability, but
document it and add more stringent checking.

15 years agoCompatiable network abbreviation support
Stephen Hemminger [Tue, 14 Oct 2008 22:02:16 +0000 (15:02 -0700)]
Compatiable network abbreviation support

Handle 10/8 as 10.0.0.0/8 and check for bogus values like 256/8.
This is a comprimise between original iproute2 parsing and standard BSD
parsing of abbreviated IPV4 addresses.

15 years agoFix help text for ip link
Stephen Hemminger [Mon, 13 Oct 2008 14:17:08 +0000 (07:17 -0700)]
Fix help text for ip link

This is a variant of Patrick McHardy patch for help text.
Add help for ip link add and ip link delete.
The help conditional on what the kernel supports.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
15 years agoRefuse "ip link add/replace" without device type parameter
Patrick McHardy [Tue, 7 Oct 2008 15:23:04 +0000 (17:23 +0200)]
Refuse "ip link add/replace" without device type parameter

Fix confusing error message noticed by Martin Josefsson:
Fix typo noticed by Phil Oester: information vs. informatin

# ip link add
RTNETLINK answers: Operation not supported

The reason is missing device type information, refuse this and print a message.

Signed-off-by: Patrick McHardy <kaber@trash.net>
15 years agoSupport "ip link add help" for rtnl_link API
Patrick McHardy [Tue, 7 Oct 2008 15:16:08 +0000 (17:16 +0200)]
Support "ip link add help" for rtnl_link API

For some reason "ip link add help" is currently not supported when using
the new rtnl_link API. Fix that.

Signed-off-by: Patrick McHardy <kaber@trash.net>
15 years agotc filter help should just print usage
Stephen Hemminger [Mon, 13 Oct 2008 14:00:48 +0000 (07:00 -0700)]
tc filter help should just print usage

Doing tc filter help should end argument processing.
This prevents extraneous messages.  Reported by Marcela Maslanova

15 years agoFix duplicate return
Stephen Hemminger [Fri, 19 Sep 2008 15:49:07 +0000 (08:49 -0700)]
Fix duplicate return

Get rid of dead code

15 years agoAllow he in tunnel name
Andreas Henriksson [Thu, 18 Sep 2008 17:55:03 +0000 (10:55 -0700)]
Allow he in tunnel name

Allows tunnels that could be confused with help command.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
15 years agoip: xfrm: Add AEAD support
Herbert Xu [Thu, 18 Sep 2008 05:09:01 +0000 (22:09 -0700)]
ip: xfrm: Add AEAD support

This patch allows the user to create/manage AEAD algorithms with
the ip xfrm command.  AEAD algorithms are also known as combined-
mode algorithms.  They provide the functionality of encryption
algorithms as well as authentication algorithms.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
15 years agodistinguish the inet and inet6 domain when loading the tcp_diag module
Li Yewang [Tue, 9 Sep 2008 01:13:42 +0000 (09:13 +0800)]
distinguish the inet and inet6 domain when loading the tcp_diag module

When load the tcp_diag module, and use "ss -f inet" command to show the socket
information of inet domain. But this command also shows the information of inet6
domain, but not only inet domain. and "ss -f inet6", "ss -4", "ss -6" have the
same problem.

Signed-off-by: Li Yewang <lyw@cn.fujitsu.com>
Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
15 years agoFix the error of "ss -f inet -t"
Li Yewang [Tue, 9 Sep 2008 01:06:47 +0000 (09:06 +0800)]
Fix the error of "ss -f inet -t"

when using the "ss -f inet -t" command to show the tcp socket information of
inet domain, we get the error message: "ss: no socket tables to show with such filter."

This patch can fix this bug.

Signed-off-by: Li Yewang <lyw@cn.fujitsu.com>
Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>