Commit Graph

1201 Commits

Author SHA1 Message Date
Stephen Hemminger
ebde878097 Allow default DP of zero in gred
To emulate WRED behaviour, allow default DP of zero.
2009-05-26 15:15:01 -07:00
Stephen Hemminger
d13cee6d59 Add IPV6 match pretty print 2009-05-26 15:14:29 -07:00
Stephen Hemminger
b4d41f41b6 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.
2009-04-15 15:39:34 -07:00
Thomas Egerer
b9ab720e33 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.
2009-04-14 16:15:17 -07:00
Thomas Graf
ff213c4bf2 cgroup support
Stephen,

iproute2 part of the cgroup classifier that has been included upstream
for a while. Please apply.
2009-04-13 13:38:33 -07:00
Oliver Hartkopp
685f3a9ffb 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>
2009-04-13 13:38:05 -07:00
Stephen Hemminger
9fce67dd46 Remove goto chain
The selector logic is clearer with if / else if
2009-04-03 09:44:04 -07:00
Olaf Rempel
e48f73d6a5 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.
2009-03-27 11:26:57 -07:00
Oliver Hartkopp
98f9a1d244 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.
2009-03-27 11:21:29 -07:00
Srivats P
c3651bf476 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'.
2009-03-27 11:17:26 -07:00
Sascha Hlusiak
eeef12c514 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.
2009-03-27 11:14:00 -07:00
Andreas Henriksson
6cdbf37063 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
2009-03-27 11:11:12 -07:00
Varun Chandramohan
4b6e07d8fd 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>
2009-03-27 11:09:04 -07:00
Varun Chandramohan
fb063322b4 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>
2009-03-27 11:09:04 -07:00
Stephen Hemminger
52d6a85050 remove duplicate limits.h 2009-03-27 11:07:46 -07:00
Petr Jediný
10494d2724 Changing commandline help text to be more uniform... 2009-03-27 11:05:44 -07:00
jamal
4cd23bdde9 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>
2009-03-27 10:59:25 -07:00
Stephen Hemminger
1957a322c9 Fix headers needed for gre
Need to get right headers or build breaks.
2009-03-24 15:40:54 -07:00
Stephen Hemminger
a136af4ba6 Update snapshot 2009-03-24 15:15:14 -07:00
Stephen Hemminger
6788115142 Use sanatized headers from 2.6.29
Update to final 2.6.29 headers
2009-03-24 15:13:31 -07:00
Stephen Hemminger
ced61d7dc4 Handle default hoplimit
Default for hoplimit is -1 which should be displayed as zero.
2009-03-23 10:49:21 -07:00
Stephen Hemminger
ace9c96121 Add support for IFALIAS
New 2.6.28 support for text description
2009-03-23 10:46:47 -07:00
Stephen Hemminger
1e659af3c0 Add DHCP as routing protocol 2009-03-18 13:33:12 -07:00
Stephen Hemminger
44e50c8e78 Add missing limits.h
Need limits.h to get INT_MIN on Debian
2009-03-01 20:36:38 -08:00
Denys Fedoryschenko
a589dcda9c 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>
2009-02-19 09:04:06 -08:00
Jamal Hadi Salim
63c7d26f94 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>
2009-02-19 09:02:13 -08:00
Stephen Hemminger
46a6573259 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>
2009-02-19 08:59:06 -08:00
Patrick McHardy
c86f34942a 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>
2009-01-27 16:11:39 -08:00
Stephen Hemminger
a69293245f Update snapshot 2009-01-15 12:25:04 -08:00
Stephen Hemminger
9a73e17deb Fix compile warnings
Gcc now warns about possible errors from passing a string
buffer as format arguement to printf().
2009-01-07 17:20:43 -08:00
Stephen Hemminger
bdc213423a Fix leftovers from earlier change
Still had references to l_name.
2009-01-07 17:20:14 -08:00
Denys Fedoryshchenko
6e34e7dc0a 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
2009-01-06 19:46:11 -08:00
Benedikt Gollatz
037d950bce 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.
2009-01-06 19:36:56 -08:00
Alexander Duyck
fe1a34fa81 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>
2009-01-06 19:29:25 -08:00
Alexander Duyck
f72a7aab0c 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>
2009-01-06 19:27:03 -08:00
Olivier Fourdan
7f71c0cae2 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.
2009-01-06 18:56:03 -08:00
Herbert Xu
72c771b20e 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>
2009-01-06 18:27:52 -08:00
Herbert Xu
237d9e82c5 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>
2009-01-06 17:29:02 -08:00
Stephen Hemminger
05bfd16595 Update headers to 2.6.28
Put in sanitized 2.6.28 headers
2009-01-06 15:03:26 -08:00
Stephen Hemminger
cafa6c8ec1 Restore old address parsing but with checking
Go back to original address parsing for compatability, but
document it and add more stringent checking.
2008-10-27 10:27:27 -07:00
Stephen Hemminger
94afda7529 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.
2008-10-14 15:02:16 -07:00
Stephen Hemminger
750a405a5a 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>
2008-10-13 07:17:08 -07:00
Patrick McHardy
3ef0c85942 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>
2008-10-13 07:03:41 -07:00
Patrick McHardy
0532555202 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>
2008-10-13 07:02:44 -07:00
Stephen Hemminger
3a99df7074 tc filter help should just print usage
Doing tc filter help should end argument processing.
This prevents extraneous messages.  Reported by Marcela Maslanova
2008-10-13 07:00:48 -07:00
Stephen Hemminger
bc7d1bd88d Fix duplicate return
Get rid of dead code
2008-09-19 08:49:07 -07:00
Andreas Henriksson
1f1ae524fb Allow he in tunnel name
Allows tunnels that could be confused with help command.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
2008-09-18 10:55:03 -07:00
Herbert Xu
1758a81f49 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>
2008-09-17 22:09:01 -07:00
Li Yewang
a37b01c1f0 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>
2008-09-17 22:05:02 -07:00
Li Yewang
f70d96a41b 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>
2008-09-17 22:05:00 -07:00