]> rtime.felk.cvut.cz Git - lisovros/iproute2_canprio.git/log
lisovros/iproute2_canprio.git
15 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>
15 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.

15 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>
15 years agoiproute: DESTDIR vs LIBDIR.
Andreas Henriksson [Fri, 22 Aug 2008 14:54:12 +0000 (16:54 +0200)]
iproute: DESTDIR vs LIBDIR.

Hello Rafael Almeida.

I noticed your patch adding DESTDIR support in the latest iproute2 release.
Much appreciated! Soon the debian packages might be able to move to actually
using "make install" rather then it's own installation procedure when
building packages. I've noticed something that will break though....

Debian packages usually sets DESTDIR=debian/tmp/ and packages the contents
of that directory as if it where the root file system. This will break
the /usr/lib/{tc,ip}/ module loading, because they DESTDIR (/usr) will be
/whatever-the-build-path-was/debian/tmp/lib/{tc,ip}/.
I beleive others usually call this the LIBDIR to make the separation between
DISTDIR being the (possibly temporary) place things are put when build is
done, and LIBDIR (and others) are used for actual runtime paths.

I'm attaching a patch that I think fixes this, but would be really happy if
you could have a look at to verify I'm not screwing something up.

--
Regards,
Andreas Henriksson

Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
15 years agoadd generic size table for qdiscs
Jussi Kivilinna [Fri, 25 Jul 2008 13:19:09 +0000 (16:19 +0300)]
add generic size table for qdiscs

Patch adds generic size table that is similiar to rate table, with
difference that size table stores link layer packet size.

Based on patch by Patrick McHardy
 http://marc.info/?l=linux-netdev&m=115201979221729&w=2

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
15 years agoiflink_vlan: support GVRP flag
Patrick McHardy [Thu, 3 Jul 2008 17:06:29 +0000 (19:06 +0200)]
iflink_vlan: support GVRP flag

This is the patch for iproute for configuring GVRP.

commit 32143eed8b706e5c6554ab42903533b3bccdc060
Author: Patrick McHardy <kaber@trash.net>
Date:   Thu Jul 3 19:05:09 2008 +0200

    [IPROUTE]: iflink_vlan: support GVRP flag

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
15 years agocls_flow: add perturbation support
Patrick McHardy [Mon, 14 Jul 2008 12:42:48 +0000 (14:42 +0200)]
cls_flow: add perturbation support

commit 337628b9aca63fda7622701191d6304c83438909
Author: Patrick McHardy <kaber@trash.net>
Date:   Fri Jul 4 04:54:56 2008 +0200

    cls_flow: add perturbation support

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
15 years agoMerge in fix for loss of MQ
Stephen Hemminger [Thu, 18 Sep 2008 04:51:40 +0000 (21:51 -0700)]
Merge in fix for loss of MQ

Fix up conflict with earlier attempt at resolving build
issues with MQ

15 years agoip a flush: unnecessarily chatty when there's nothing to flush
Andreas Henriksson [Fri, 29 Aug 2008 17:52:48 +0000 (19:52 +0200)]
ip a flush: unnecessarily chatty when there's nothing to flush

On tis, 2008-07-22 at 20:21 +0200, martin f krafft wrote:
> piper:~|master|% sudo ip a flush dev eth0 >/dev/null
> Nothing to flush.
>
> It should just shut up, shouldn't it? :)

The patch below makes the "Nothing to flush" only visible when show
statistics flag is given, and then only to stdout rather then stderr.

$ sudo ./ip/ip -s addr flush dev skif
Nothing to flush.
$ sudo ./ip/ip addr flush dev skif
$

(See http://bugs.debian.org/492196 )

15 years agoip: abbreviation of network-prefix is no longer possible with ip route
Andreas Henriksson [Fri, 29 Aug 2008 17:26:42 +0000 (19:26 +0200)]
ip: abbreviation of network-prefix is no longer possible with ip route

Commit 516ffb6b7724e97ca035293dcfd9f94cf6ce3a47 says:

Stephen Hemminger [Thu, 22 May 2008 20:41:40 +0000 (13:41 -0700)]
> Use the standard POSIX inet_pton to convert from string to IPV4
> address. This avoids problems where ip parses "127.2" wrong.

Apparently inet_pton doesn't support abbreviated/shortened/classful
ipv4 addresses at all, but inet_aton does.
Since the function only deals with AF_INET anyway maybe using
inet_aton "to increse backwards compatability" (please those
who still want to use the format) could be considered?
(This will still not restore the 10/8 format which apparently used
to work in iproute, so people would have to settle for 10.0/8)

(See http://bugs.debian.org/497011)

15 years agoUpdate to 2.6.27 API
Stephen Hemminger [Mon, 15 Sep 2008 19:05:11 +0000 (12:05 -0700)]
Update to 2.6.27 API

The one issue was the old multiqueue API, so that is handled
by tc_util.h

15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/shemminger...
Stephen Hemminger [Mon, 15 Sep 2008 18:56:06 +0000 (11:56 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2

15 years agoUpdate headers to 2.6.27
Stephen Hemminger [Fri, 12 Sep 2008 16:50:26 +0000 (09:50 -0700)]
Update headers to 2.6.27

15 years agoAdd DSCP values for RFC2597
Stephen Hemminger [Fri, 5 Sep 2008 22:28:37 +0000 (15:28 -0700)]
Add DSCP values for RFC2597

Most newer documentation refers to these values already.

15 years agofix syntax errors in ip(8) manpage.
Andreas Henriksson [Sat, 26 Jul 2008 19:54:42 +0000 (21:54 +0200)]
fix syntax errors in ip(8) manpage.

Fix syntax errors in ip(8) manpage.

lintian said:
W: iproute: manpage-has-errors-from-man usr/share/man/man8/ip.8.gz 2167: warning: `RP' not defined

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
15 years agolong/ulong iproute-git fix
Denys Fedoryshchenko [Wed, 30 Jul 2008 14:34:07 +0000 (17:34 +0300)]
long/ulong iproute-git fix

This patch fixes bug in Metadata ematch attributes parser

strtoul on error return ULONG_MAX, not LONG_MAX

Patch attached as file

15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/shemminger...
Stephen Hemminger [Sat, 26 Jul 2008 05:41:37 +0000 (22:41 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2

15 years agoUpdate snapshot
Stephen Hemminger [Fri, 25 Jul 2008 20:46:07 +0000 (13:46 -0700)]
Update snapshot

15 years agoFixed installation when changing DESTDIR
Rafael Almeida [Mon, 2 Jun 2008 00:33:44 +0000 (21:33 -0300)]
Fixed installation when changing DESTDIR

After changing the DESTDIR the installated binaries have some issues
due to hard coded paths. For example, using distributions on NetEm
would segfault.

I've changed iplink.c and tc_util.c so they are now aware of DESTDIR.
Along with that change I needed to change the main Makefile so it
defines the DESTDIR macro when calling gcc.

I also changed the paths so that during the installation sbin, etc,
share and lib directories are created directly inside of the DESTDIR,
instead of creating a usr directory inside that. That's the behaviour
of most packages out there, so I think most users will be expecting
that to happen.

15 years agoDisplay Correct Error For Addrlabel Info
Varun Chandramohan [Mon, 2 Jun 2008 08:25:56 +0000 (13:55 +0530)]
Display Correct Error For Addrlabel Info

The command "ip addrlabel add/del" displays incorrect error message when provided with insufficient inputs. This patch fixes it in par with "ip addr add/del".

Currently:
# ./ip addrlabel add
RTNETLINK answers: Numerical result out of range

# ./ip addr add
Not enough information: "dev" argument is required.

After patch:
# ./ip addrlabel add
Not enough information: "prefix" argument is required.

Signed-off-by: Varun Chandramohan <varunc@linux.vnet.ibm.com>
Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
15 years agoUpdate headers to 2.6.26
Stephen Hemminger [Tue, 15 Jul 2008 18:03:24 +0000 (11:03 -0700)]
Update headers to 2.6.26

Copy santized version of headers from 2.6.26 final version.

15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/shemminger...
Stephen Hemminger [Tue, 8 Jul 2008 22:58:07 +0000 (15:58 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2

15 years agoAdd warning message when MAX_FIELDS reached
Stephen Hemminger [Mon, 30 Jun 2008 18:57:13 +0000 (11:57 -0700)]
Add warning message when MAX_FIELDS reached

Don't just silently drop.

15 years agoFix array out of bounds problem
Stephen Hemminger [Mon, 30 Jun 2008 17:37:28 +0000 (10:37 -0700)]
Fix array out of bounds problem

The current kernel generates 71 possible header fields, but
MAX_FIELDS in lnstat is only 64. This leads to referencing outside
of the array. To fix, increase size of array and chop off parsing
at MAX_FIELDS - 1.

15 years agoFix generic_proc_open() of command 'nstat' and 'rtacct'
Yu Zhiguo [Fri, 20 Jun 2008 01:50:16 +0000 (09:50 +0800)]
Fix generic_proc_open() of command 'nstat' and 'rtacct'

Fix a bug of generic_proc_open(), so environment variables
(e.g. PROC_NET_SNMP, PROC_NET_RTACCT) can be used to specify procfile.

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
15 years agonetem: fix cross-compiling failure
Bertrand Jacquin [Sat, 21 Jun 2008 05:51:19 +0000 (01:51 -0400)]
netem: fix cross-compiling failure

The programs in netem are compiled and run on the build machine, but they
use the CFLAGS that are meant for the target system and often times, these
are incompatible.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoiproute2: add support for IFLA_NET_NS_PID in ip link
Benjamin Thery [Fri, 20 Jun 2008 09:07:35 +0000 (11:07 +0200)]
iproute2: add support for IFLA_NET_NS_PID in ip link

Hi Stephen,

I resend you this patch once more. This time I updated the documentation
too (may be that was the reason why you didn't take it before?).

Please tell me if there are other things missing in this patch
It applies on iproute2 git tree.

Regards,
Benjamin

Description:
------------

This patch adds support for the IFLA_NET_NS_PID type. It is used to
move network devices between network namespaces.

The syntax is:
ip link set DEVICE netns PID

PID is the pid of a process in the target network namespace.

(Daniel Lezcano is the original author).

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
15 years agotc: don't set protococol field on filter delete
Patrick McHardy [Mon, 23 Jun 2008 13:59:18 +0000 (15:59 +0200)]
tc: don't set protococol field on filter delete

> # tc filter show dev eth1 | grep 4:29:d1
> filter parent 1: protocol ip pref 5 u32 fh 4:29:d1 order 209 key ht 4
> bkt 29 flowid 1:b7aa
>
> # tc filter del dev eth1 parent 1: pref 5 handle 4:29:d1 u32
> RTNETLINK answers: Invalid argument
> We have an error talking to the kernel
>
> after rollback to package"sys-apps/iproute2-2.6.24.20080108" all
> deleted normal...

The current iproute version uses "protocol all" by default
if its not specified. This is actually only useful for creating
new filters, on deletion an unset protocol is treated as wildcard.

15 years agotimers are in user hz
Stephen Hemminger [Fri, 20 Jun 2008 19:40:03 +0000 (12:40 -0700)]
timers are in user hz

The kernel timers are exposed in user hz not kernel hz

15 years agoNeighbor cache timer is in user hz
Stephen Hemminger [Fri, 20 Jun 2008 19:37:42 +0000 (12:37 -0700)]
Neighbor cache timer is in user hz

All timer values from kernel are supposed to be in constant
units or user hz value.

15 years agouse correct hz for rto,ato
Stephen Hemminger [Fri, 20 Jun 2008 19:34:15 +0000 (12:34 -0700)]
use correct hz for rto,ato

The function get_hz() returns the psched hz value which is wrong
for anything other than tc usage. Should be user hz instead, but
kernel is broken (patch sent) and this code doesn't get hit on
current systems (netlink is used first).

15 years agoUpdate to 2.6.26-rc6 headers
Stephen Hemminger [Fri, 20 Jun 2008 18:26:38 +0000 (11:26 -0700)]
Update to 2.6.26-rc6 headers

Copy sanitized headers from 2.6.26-rc6

16 years agoematch related bugfix and cleanup
Stephen Hemminger [Thu, 29 May 2008 18:54:19 +0000 (11:54 -0700)]
ematch related bugfix and cleanup

Bugfix: use strtoul rather than strtol for bstrtol to handle large key/mask.
Deinline larger functions to save space.

16 years agoUse inet_pton to read ipv4 addresses
Stephen Hemminger [Thu, 22 May 2008 20:41:40 +0000 (13:41 -0700)]
Use inet_pton to read ipv4 addresses

Use the standard POSIX inet_pton to convert from string to IPV4
address. This avoids problems where ip parses "127.2" wrong.

16 years agoAdd routel and routef man page.
Andreas Henriksson [Thu, 3 Jan 2008 15:48:56 +0000 (16:48 +0100)]
Add routel and routef man page.

16 years agoxfrm: Allow replay setting
Herbert Xu [Wed, 23 Apr 2008 07:42:32 +0000 (15:42 +0800)]
xfrm: Allow replay setting

Hi Stephen:

[IP] xfrm: Allow replay setting

For certain applications there is a requirement to start the
sequence number from a point other than the default.  As it
is the kernel provides an interface to do that but it isn't
available through the ip(8) command.  Since we're encouraging
people to migrate over to ip(8) for manual keying, it is useful
to have this ability there.

This patch adds support for setting replay sequence numbers
through ip(8).

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Thanks,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--

16 years agoInfrastructure for pretty printing
jamal [Sun, 20 Apr 2008 14:49:24 +0000 (10:49 -0400)]
Infrastructure for pretty printing

And last for now ..

cheers,
jamal

[PATCH 3/3] [TC/U32] Infrastructure for pretty printing

This patch makes it easy to add pretty printers of different protocols.
For starters it makes use of ipv4 and raw printers.
Add more later ...

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
16 years agoExpose the filter protocol
jamal [Sun, 20 Apr 2008 14:47:48 +0000 (10:47 -0400)]
Expose the filter protocol

makes protocol accessible ..

cheers,
jamal

[PATCH 2/3] [TC/FILTERS] Expose the filter protocol

Expose the filter protocol so it can be used by underlying
classifiers when they need it.

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
16 years agoChange formatting of u32 back to default
Stephen Hemminger [Fri, 9 May 2008 22:42:34 +0000 (15:42 -0700)]
Change formatting of u32 back to default

Don't break scripts that depend on previous offset/value format.
Introduce a new -pretty flag for decoding, and (*gasp*) document
the formatting arguments.

16 years agoFix bad hash calculation because of signed address
Stephen Hemminger [Thu, 8 May 2008 16:11:04 +0000 (09:11 -0700)]
Fix bad hash calculation because of signed address

The addr[] was being used signed, but this causes hash calcultion
to overflow. Originally reported as Debian bug 480173.

16 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/shemminger...
Stephen Hemminger [Mon, 28 Apr 2008 22:57:19 +0000 (15:57 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2

16 years agoAvoid infinite loop in ip addr flush.
Daniel Silverstone [Fri, 19 Oct 2007 11:32:24 +0000 (13:32 +0200)]
Avoid infinite loop in ip addr flush.

Fix "ip addr flush" the same way "ip neigh flush" was previously fixed,
by bailing out if the flush hasn't completed after MAX_ROUNDS (10) tries.

16 years agodocument promote_secondaries
Andreas Henriksson [Sat, 12 Jan 2008 16:17:02 +0000 (17:17 +0100)]
document promote_secondaries

Write something about the tweak to enable promoting secondary addresses
instead of deleting them together with the primary address as discussed
in this thread on the netdev mailing list:
http://www.spinics.net/lists/netdev/msg52294.html

The claim that this is supported since 2.6.15 is based on looking at
changes to net/ipv4/devinet.c in the linux-2.6 git tree:

Commit to add support:
2005-05-30      Harald Welte
8f937c6099858eee15fae14009dcbd05177fa91d

Commit to fix bug:
2005-11-22      Jamal Hadi Salim
0ff60a45678e67b2547256a636fd00c1667ce4fa

Version 2.6.15 was released 2006-01-03 and seems to include the code from
both the above commits.

16 years agoFix typos (syntax error) in ip(8) manpage.
Andreas Henriksson [Sun, 20 Apr 2008 09:25:31 +0000 (11:25 +0200)]
Fix typos (syntax error) in ip(8) manpage.

This one also caught by lintian (debian package checker tool).

16 years agoUpdate version
Stephen Hemminger [Thu, 17 Apr 2008 17:12:54 +0000 (10:12 -0700)]
Update version

Release new snapshot for 2.6.25

16 years agoFix classifier help
Patrick McHardy [Wed, 26 Mar 2008 06:40:03 +0000 (07:40 +0100)]
Fix classifier help

commit c504ffd627ac211eebf5ed34ef0fbfd7f1dbb347
Author: Patrick McHardy <kaber@trash.net>
Date:   Wed Mar 26 07:38:43 2008 +0100

    [IPROUTE]: Fix classifier help

    The new check whether the user has specified a protocol makes
    "ip filter <type> help" fails with "protocol is required".

    This could be fixed by moving it further down, but a more user-friendly
    way it to simply use ETH_P_ALL as default if nothing is specified.

Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agoATM cell alignment.
Jesper Dangaard Brouer [Wed, 9 Apr 2008 21:01:01 +0000 (23:01 +0200)]
ATM cell alignment.

Introducing the function that does the ATM cell alignment, and
modifying tc_calc_rtable() to use this based upon a linklayer
parameter.

Modified from original to use constants from atm.h and
fix all the usages of rtable in same patch.

Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
16 years agoIn police, fix uninitialized "overhead" variable.
Stephen Hemminger [Thu, 17 Apr 2008 16:12:38 +0000 (09:12 -0700)]
In police, fix uninitialized "overhead" variable.

Bug introduced by myself in an earlier patch series.

Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
16 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/shemminger...
Stephen Hemminger [Tue, 8 Apr 2008 14:58:50 +0000 (09:58 -0500)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2

16 years agoman ip.8 miss xfrm option
Marcela Maslanova [Fri, 22 Feb 2008 15:16:03 +0000 (16:16 +0100)]
man ip.8 miss xfrm option

I was asked to at least mention the xfrm option in ip manual. I added
all usage into ip.8 and try to write some basic information about xfrm.
If someone want complete it, I'll be happy.

Marcela Maslanova

a16304c0cdbdbc8926b112743b4bd49069a50cd7
 man/man8/ip.8 |  474 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 474 insertions(+), 0 deletions(-)

Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
16 years agoss: Fix return value checks for net_*_open
Björn Steinbrink [Thu, 3 Apr 2008 09:42:41 +0000 (11:42 +0200)]
ss: Fix return value checks for net_*_open

In ss.c, generic_proc_open(), for which the net_*_open functions are just
convenient wrappers, uses fopen, so errors are signalled by a NULL return
value. Some checks were expecting negative values instead, fix them.

Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
16 years agoUpdate kernel headers to 2.6.25-rc7
Stephen Hemminger [Tue, 1 Apr 2008 18:37:35 +0000 (11:37 -0700)]
Update kernel headers to 2.6.25-rc7

Copy sanitized kernel headers from 2.6.25-rc7 to ensure proper
compatiability.