]> git.proxmox.com Git - mirror_iproute2.git/log
mirror_iproute2.git
16 years agoAdd new rtacct/nstat manpages and additional symlinks.
Andreas Henriksson [Fri, 12 Oct 2007 08:56:44 +0000 (10:56 +0200)]
Add new rtacct/nstat manpages and additional symlinks.

Symlink rtstat(8) and ctstat(8) to lnstat(8).
Add rtacct/nstat manpage based on doc/nstat.sgml as rtacct(8).
Symlink nstat(8) to rtacct(8).
Add arpd(8) symlink based on doc/arpd.sgml.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agoFix ematch cmp and nbyte syntax help text.
Lionel Elie Mamane [Fri, 12 Oct 2007 08:56:43 +0000 (10:56 +0200)]
Fix ematch cmp and nbyte syntax help text.

The help/usage screen of ematch cmp and nbyte say recognised symbolic
values for "layer FOO" are link, header and next-header, but the code
does _not_ implement that: it will recognise "next-header" as what is
supposed to be "header" and will not recognise "header". The right
symbolic values seem to be link, network, transport. Here is a patch
that changes the help/usage screen to match the code.
(http://bugs.debian.org/438653)

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agoRemove bogus reference to tc-filters(8) from tc(8) manpage.
Andreas Barth [Fri, 12 Oct 2007 08:56:41 +0000 (10:56 +0200)]
Remove bogus reference to tc-filters(8) from tc(8) manpage.

Spotted by Aleš Kozumplík <al_es@seznam.cz>
(http://bugs.debian.org/289225)

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agodon't allow "" for device name
Stephen Hemminger [Fri, 12 Oct 2007 21:43:03 +0000 (14:43 -0700)]
don't allow "" for device name

If a zero-length string is given, it is not rejected by
netlink in kernel so catch it at command line.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agoremove support for IP multipath
Stephen Hemminger [Fri, 12 Oct 2007 21:38:30 +0000 (14:38 -0700)]
remove support for IP multipath

IP multipath routing was so buggy that it was dropped from the
current kernel.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agoremove outdated netbug script.
Stephen Hemminger [Fri, 12 Oct 2007 20:50:43 +0000 (13:50 -0700)]
remove outdated netbug script.

Haven't received a bug from this script in years.
And it has several race conditions, etc.

See http://bugs.debian.org/289541, http://bugs.debian.org/313540,
http://bugs.debian.org/313541, and http://bugs.debian.org/313544.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agoIPROUTE2: Support IPv4/IPv6 Tunnel
YOSHIFUJI Hideaki / 吉藤英明 [Fri, 12 Oct 2007 07:51:22 +0000 (16:51 +0900)]
IPROUTE2: Support IPv4/IPv6 Tunnel

Based on patch from Yasuyuki KOZAKAI <yasuyuki.kozakai@toshiba.co.jp>.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agorto support for ip command
Rick Jones [Thu, 11 Oct 2007 20:04:11 +0000 (13:04 -0700)]
rto support for ip command

Enable users of ip to specify the times for rtt, rttvar and rto_min
in human-friendly terms a la "tc" while maintaining backwards
compatability with the previous "raw" mechanism.  Builds upon
David Miller's uncommited patch to set rto_min.

Signed-off-by: Rick Jones <rick.jones2@hp.com>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agodon't make veth a shared library
Stephen Hemminger [Thu, 11 Oct 2007 20:01:42 +0000 (13:01 -0700)]
don't make veth a shared library

Making veth a shared library for ip caused build problems (not PIC)
and is unneeded.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agoMerge 192.168.0.5:src/iproute2
Stephen Hemminger [Thu, 11 Oct 2007 19:43:27 +0000 (12:43 -0700)]
Merge 192.168.0.5:src/iproute2

16 years agolnstat : force a flush before sleep
Eric Dumazet [Thu, 27 Sep 2007 12:26:09 +0000 (14:26 +0200)]
lnstat : force a flush before sleep

Hi Stephen

This small patch allows to use lnstat/rtstat with a pipe output, without a full bufferisation.

Thank you
Eric

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years ago2.6.23 kernel headers
Stephen Hemminger [Thu, 11 Oct 2007 19:39:12 +0000 (12:39 -0700)]
2.6.23 kernel headers

Update headers to sanitized versions of 2.6.23 final

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agoUpdate kernel headers to 2.6.23-rc5
Stephen Hemminger [Wed, 5 Sep 2007 12:05:21 +0000 (13:05 +0100)]
Update kernel headers to 2.6.23-rc5

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agoip: xfrm: Fix flush message.
Masahide NAKAMURA [Fri, 24 Aug 2007 02:05:24 +0000 (11:05 +0900)]
ip: xfrm: Fix flush message.

Fix xfrm state or policy flush message.
And minor updates are included:
o Use static buffer to show unknown value as string.
o Show policy type (ptype) only when kernel specified it.
o Clean-up xfrm_monitor.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agoip: xfrm: Fix policy and state flags.
Masahide NAKAMURA [Fri, 24 Aug 2007 02:05:18 +0000 (11:05 +0900)]
ip: xfrm: Fix policy and state flags.

o Support policy flag with string format.
  Note that kernel defines only one name "localok" for the flag
  and it has not had any effect currently.
o Support state flag value XFRM_STATE_NOPMTUDISC.
o Fix to show detailed flags value when "-s" option is used.
o Fix minor typo.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agoip: xfrm: Clean-up for internal mask to filter.
Masahide NAKAMURA [Fri, 24 Aug 2007 02:05:07 +0000 (11:05 +0900)]
ip: xfrm: Clean-up for internal mask to filter.

Remove unused or redundant usage for xfrm_filter.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agoModule for ip utility to support veth device (v.2.1)
Pavel Emelianov [Wed, 11 Jul 2007 09:33:55 +0000 (13:33 +0400)]
Module for ip utility to support veth device (v.2.1)

The usage is
# ip link add [name] type veth [peer <name>] [mac <mac>] [peer_mac <mac>]

This version doesn't include the fix for ip/iplink.c as Patrick
said that he had included it into his patches already.

Signed-off-by: Pavel Emelianov <xemul@openvz.org>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agovlan support
Patrick McHardy [Sat, 1 Sep 2007 16:47:19 +0000 (18:47 +0200)]
vlan support

This is a resend of the iproute VLAN patch with the if_link.h changes
edited out since the headers are already synced.

[IPROUTE]: VLAN support

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agoFix modes of test files
Stephen Hemminger [Wed, 5 Sep 2007 11:00:01 +0000 (12:00 +0100)]
Fix modes of test files

Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agoRevert "Make ip utility veth driver aware"
Stephen Hemminger [Wed, 5 Sep 2007 10:51:10 +0000 (11:51 +0100)]
Revert "Make ip utility veth driver aware"

This reverts commit 4ed390ce43d1ec7c881721f312260df901d8390d.
Newer version doesn't use genetlink.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agoFix bug in display of ipv6 cloned/cached routes
Sridhar Samudrala [Wed, 22 Aug 2007 17:55:47 +0000 (10:55 -0700)]
Fix bug  in display of ipv6 cloned/cached routes

This patch fixes a bug in the 'ip' command to display
IPv6 cloned routes.
  ip -6 route ls cache
returns empty even when there are cloned routes because of
of a missing else in print_route() routine.

Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
16 years agoFix meta ematch usage of 0 values
Patrick McHardy [Wed, 11 Jul 2007 12:48:12 +0000 (14:48 +0200)]
Fix meta ematch usage of 0 values

em_meta doesn't send 0 values to the kernel. breaking matching on them and
resulting in "Missing value TLV" messages on dump.

Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agoiplink: use netlink for link configuration
Patrick McHardy [Wed, 22 Aug 2007 17:49:01 +0000 (10:49 -0700)]
iplink: use netlink for link configuration

Add support for using netlink for link configuration. Kernel-support is
probed, when not available it falls back to using ioctls.

Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agoFix m_ipt build
Stephen Hemminger [Wed, 22 Aug 2007 17:33:33 +0000 (10:33 -0700)]
Fix m_ipt build

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agoMake ip utility veth driver aware
Pavel Emelianov [Wed, 2 May 2007 10:57:57 +0000 (14:57 +0400)]
Make ip utility veth driver aware

The new command is called "veth" with the following syntax:
* ip veth add <dev1> <dev2>
  creates interconnected pair of veth devices.
* ip veth del <dev>
  destroys the pair of veth devices, where <dev> is either
  <dev1> or <dev2> used to create the pair.

One question that is to be solved is whether or not to create
a hard-coded netlink family for veth driver. Without it the
family resolution code has to be moved to general place in ip
utility (by now it is copy-paste-ed from one file to another
till final decision).

Signed-off-by: Pavel Emelianov <xemul@openvz.org>
16 years agoUse FRA_* attributes for routing rules
Patrick McHardy [Wed, 22 Aug 2007 17:26:12 +0000 (10:26 -0700)]
Use FRA_* attributes for routing rules

Use the FRA attributes for routing rules, with exception of RTA_GATEWAY
(used for route-NAT) which isn't supported by current kernels anymore
and thus doesn't exist as FRA attribute.

Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agosanitized headers update to 2.6.23-rc3
Stephen Hemminger [Wed, 22 Aug 2007 17:19:53 +0000 (10:19 -0700)]
sanitized headers update to 2.6.23-rc3

Update headers

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agoiproute2: sch_rr support in tc
PJ Waskiewicz [Tue, 14 Aug 2007 18:21:24 +0000 (11:21 -0700)]
iproute2: sch_rr support in tc

This patch applies on top of Patrick McHardy's RTNETLINK
patches to add nested compat attributes.  This is needed to maintain
ABI for sch_{rr|prio} in the kernel with respect to tc.  A new option,
namely multiqueue, was added to sch_prio and sch_rr.  This will allow
a user to turn multiqueue support on for sch_prio or sch_rr at loadtime.
Also, tc qdisc ls will display whether or not multiqueue is enabled on
that qdisc.  When in multiqueue mode, a user can specify a value of 0 for
bands, and the number of bands will be created to match the number of
queues on the device.

This patch is to support the new sch_rr (round-robin) qdisc being proposed
in NET for multiqueue network device support in the Linux network stack.
It uses q_prio.c as the template, since the qdiscs are nearly identical,
outside of the ->dequeue() routine.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
16 years agoIPROUTE2: RTNETLINK nested attributes
Patrick McHardy [Tue, 14 Aug 2007 18:21:19 +0000 (11:21 -0700)]
IPROUTE2: RTNETLINK nested attributes

This adds capability for iproute2 to send nested attributes to the
kernel, while maintaining backwards compatibility.

Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agoshow multicast groups
Johannes Berg [Thu, 19 Jul 2007 09:13:18 +0000 (11:13 +0200)]
show multicast groups

Update the included version of the genetlink.h header to the multicast
group API and make the generic netlink controller part show multicast
groups where applicable. Also fix two typos.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
16 years agoBug fix tc action drop
Patrick McHardy [Wed, 18 Jul 2007 10:46:20 +0000 (12:46 +0200)]
Bug fix tc action drop

>>That command is from a script that used to work with iproute2-ss020116
>>(2002!), which had the following in tc/m_police.c:
>>
>>210     } else if (strcmp(*argv, "action") == 0) {
>>211             NEXT_ARG();
>>212             if (get_police_result(&p.action, &presult, *argv)) {
>>
>>I don't know when that bit was dropped, but it used to be there. :-)
>
>
>
> Indeed, I missed that. I'll fix up the patch ..

OK this patch fixes parsing of "action ...". I've removed
the erroring on unknown arguments again since in that case
the caller should continue parsing.

16 years agoTC action parsing bug fix
Patrick McHardy [Wed, 18 Jul 2007 09:49:55 +0000 (11:49 +0200)]
TC action parsing bug fix

>
> Is it a bug that:
>
>   # tc filter add dev eth0 parent 1: protocol ip prio 0 handle 0xfffffff
>     fw police rate 1 burst 1 mpu 0 mtu 1 action drop
>                                          ^^^^^^^^^^^
> creates a filter that looks like:
>
>   # tc filter ls dev eth0
>   filter parent 1: protocol ip pref 49152 fw
>   filter parent 1: protocol ip pref 49152 fw handle 0xfffffff police 0x1
>   rate 0bit burst 0b mtu 1b action reclassify
>                             ^^^^^^^^^^^^^^^^^
>   ref -543190236 bind 4
>
> (which reclassifies and thus lets 0xfffffff-marked packets through).
>
> I'm pretty sure this used to work under 2.4.x (though I no longer have a
> 2.4 box to test with), but it hasn't worked on any of the 2.6.x kernels
> I've tried (with both iproute2-ss060323 and 070710).

Good catch. It seems this is merely a parsing error, iproute doesn't
have an "action" parameter and aborts parsing, so it uses the default
value of "RECLASSIFY". It never had this parameter, so this patch
removes it from the help text and makes it return an error.

16 years agoFix ss to handle partial records.
Stephen Hemminger [Wed, 18 Jul 2007 14:31:29 +0000 (15:31 +0100)]
Fix ss to handle partial records.

Output from /proc may include partial records, so rather than
trying to be sexy and do own parsing, just use stdio.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agov2.6.22-070710
Stephen Hemminger [Wed, 11 Jul 2007 01:34:14 +0000 (18:34 -0700)]
v2.6.22-070710

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agoip/routef lifesaver
Mike Frysinger [Sat, 15 Jul 2006 07:31:48 +0000 (03:31 -0400)]
ip/routef lifesaver

keep people from screwing their systems with routef

minor patch here ... if you run `routef --help`,
it'll turn around and flush your routing tables anyways :)

so patch will have routef output usage if any arguments are given,
otherwise it'll flush the tables ... idea is from Lars Strojny

16 years agoss: fix issues with signed inodes
Stephen Hemminger [Wed, 11 Jul 2007 01:26:54 +0000 (18:26 -0700)]
ss: fix issues with signed inodes

Some parts of ss were incorrectly assuming inode number was int
not unsigned.

16 years agoSnapshot update for 2.6.22
Stephen Hemminger [Mon, 25 Jun 2007 16:42:30 +0000 (09:42 -0700)]
Snapshot update for 2.6.22

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agoAdd TC_LIB_DIR environment variable.
Stephen Hemminger [Wed, 20 Jun 2007 22:27:22 +0000 (15:27 -0700)]
Add TC_LIB_DIR environment variable.

Don't hardcode /usr/lib/tc as a path

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agonetem: static
Stephen Hemminger [Wed, 20 Jun 2007 22:20:22 +0000 (15:20 -0700)]
netem: static

Make netem static rather than shared library. It saves problems
on 64 bit platforms.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agofix build warnings
Stephen Hemminger [Wed, 20 Jun 2007 17:55:18 +0000 (10:55 -0700)]
fix build warnings

Fix problems from recent if.h related changes.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years ago[Fwd: Re: more iproute2 issues (not critical)]
Patrick McHardy [Tue, 19 Jun 2007 23:37:53 +0000 (01:37 +0200)]
[Fwd: Re: more iproute2 issues (not critical)]

This one also makes sense for the release I guess.

-------- Original Message --------
Subject:  Re: more iproute2 issues (not critical)
Date:  Sat, 31 Mar 2007 16:16:56 +0200
From:  Patrick McHardy <kaber@trash.net>
To:  Denys <denys@visp.net.lb>
CC: Stephen Hemminger <shemminger@linux-foundation.org>,
netdev@vger.kernel.org
References:  <20070321175951.M73913@visp.net.lb>
<46026717.9060909@trash.net> <20070322124533.M79867@visp.net.lb>
<46027FF2.6020001@trash.net> <20070322101224.3e6bb899@freekitty>
<20070331021401.M17326@visp.net.lb> <20070331023011.M8101@visp.net.lb>

Denys wrote:
> Ooops, sorry, it seems my fault, no library exist on this system.
> But i guess it must not coredump in this case? Is it possible to check if
> library not exist and just print some nice message?
> It is trivial i guess.

The problem is that lib_dir is NULL when calling get_target_names.
This patch fixes it.

[IPROUTE]: m_ipt: fix crash when dumping rules

lib_dir is NULL when calling get_target_name, causing a NULL pointer
dereference in the strlen call.

Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agoiproute2: Support IFF_LOWER_UP and IFF_DORMANT
Thomas Graf [Tue, 19 Jun 2007 23:40:40 +0000 (16:40 -0700)]
iproute2: Support IFF_LOWER_UP and IFF_DORMANT

In order to support these new flags add current
linux/if.h into the directory with the local copies.
This caused troubles with outdated redefinitions from net/if.h
so I've removed the dependency on it.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agoFix symbolic link to tc-bfifo.8
Yasuyuki KOZAKAI [Mon, 18 Jun 2007 02:16:42 +0000 (11:16 +0900)]
Fix symbolic link to tc-bfifo.8

tc-pbfifo.8 does not exist because it was moved to tc-bfifo.8.

Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agoiproute2: Format IPv6 tunnels endpoints nicely.
David Lamparter [Sat, 9 Jun 2007 13:53:58 +0000 (15:53 +0200)]
iproute2: Format IPv6 tunnels endpoints nicely.

Change formatting of IPv6 tunnel endpoints from hex chain to standard IPv6
representation.

Signed-off-by: David Lamparter <equinox@diac24.net>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agofix last change
Stephen Hemminger [Tue, 19 Jun 2007 23:24:08 +0000 (16:24 -0700)]
fix last change

Need to use correct XFRMA_ constants.
Get rid of bogus casts. Fix case where no attribute returned.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agosee SPD info
jamal [Thu, 3 May 2007 23:20:29 +0000 (19:20 -0400)]
see SPD info

and heres the SPD version ...

cheers,
jamal

[XFRM] see SPD info

i.e instead of something like ip xfrm policy ls | grep -i src | wc -l
do:

ip xfrm policy count
And you get the count; you can also pass -s or -s -s to see more
details

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agosee SAD info
jamal [Thu, 3 May 2007 23:09:41 +0000 (19:09 -0400)]
see SAD info

Stephen,
Use this patch instead of the one i sent yesterday.
As before, you will need to pull include/linux/xfrm.h from
net-2.6 once Dave applies the kernel patch.

cheers,
jamal

[XFRM] see SAD info

i.e instead of something like ip xfrm state ls | grep -i src | wc -l
do:

ip xfrm state count
And you get the count; you can also pass -s to the command line and
get the hash info.

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agoip: add support for displaying link types 802 and 803
Pavel Roskin [Wed, 28 Mar 2007 13:43:49 +0000 (09:43 -0400)]
ip: add support for displaying link types 802 and 803

802 is 802.11 with prism headers.  803 is 802.11 with radiotap headers.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agoiproute2: support for goto/nop action and detached flag
Thomas Graf [Tue, 27 Mar 2007 00:04:10 +0000 (02:04 +0200)]
iproute2: support for goto/nop action and detached flag

Stephen,

Patch to support the new fib rules features I just posted
on netdev.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
16 years agoheaders update to 2.6.22
Stephen Hemminger [Tue, 19 Jun 2007 22:55:46 +0000 (15:55 -0700)]
headers update to 2.6.22

Update to sanitized version of 2.6.22-rc5 headers.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
17 years agoincorrect initialization
Stephen Hemminger [Fri, 11 May 2007 02:33:21 +0000 (19:33 -0700)]
incorrect initialization

Fix initialization in libnetlink.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
17 years agoAdd xt_tcpudp.h
Stephen Hemminger [Fri, 16 Mar 2007 18:47:42 +0000 (11:47 -0700)]
Add xt_tcpudp.h

Needed for cross/backwards compiles.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
17 years agoRevert "Increase internal clock resolution to nsec"
Stephen Hemminger [Wed, 14 Mar 2007 17:14:07 +0000 (10:14 -0700)]
Revert "Increase internal clock resolution to nsec"

This reverts fd784ccaf649128965be016f857708669e798479 commit.

Thanks Stephen, but actually I think the last patch (increase clock
resolution) shouldn't go in yet. I'm not done yet looking at all
the compatibility issues and it does change the range of valid
values for everything dealing with times. Most places I looked
at still accept reasonable ranges, but I would feel more comfortable
to make sure everything is fine first.

17 years agoIproute2 v2.6.20-070313
Stephen Hemminger [Tue, 13 Mar 2007 21:50:56 +0000 (14:50 -0700)]
Iproute2 v2.6.20-070313

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
17 years agoOld bug on tc
jamal [Thu, 8 Mar 2007 01:40:25 +0000 (20:40 -0500)]
Old bug on tc

> It is in current git tree.

A small fix attached after some testing.
Please dont forget to apply my other patches. When you have them let me
know so i can do some more testing.

cheers,
jamal

[TC] Get iptables path selection to set correct path

A small tweak on top of Stephens patch

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
17 years agoIncrease internal clock resolution to nsec
Patrick McHardy [Sun, 4 Mar 2007 19:15:04 +0000 (20:15 +0100)]
Increase internal clock resolution to nsec

[IPROUTE]: Increase internal clock resolution to nsec

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
17 years agoHandle different kernel clock resolutions
Patrick McHardy [Sun, 4 Mar 2007 19:15:03 +0000 (20:15 +0100)]
Handle different kernel clock resolutions

[IPROUTE]: Handle different kernel clock resolutions

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
17 years agoAdd sprint_ticks() function and use in CBQ
Patrick McHardy [Sun, 4 Mar 2007 19:15:01 +0000 (20:15 +0100)]
Add sprint_ticks() function and use in CBQ

[IPROUTE]: Add sprint_ticks() function and use in CBQ

Add helper function to print ticks to avoid assumptions about clock
resolution in CBQ.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
17 years agoReplace "usec" by "time" in function names
Patrick McHardy [Sun, 4 Mar 2007 19:15:00 +0000 (20:15 +0100)]
Replace "usec" by "time" in function names

[IPROUTE]: Replace "usec" by "time" in function names

Rename functions containing "usec" since they don't necessarily return
usec units anymore.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
17 years agoIntroduce TIME_UNITS_PER_SEC to represent internal clock resolution
Patrick McHardy [Sun, 4 Mar 2007 19:14:59 +0000 (20:14 +0100)]
Introduce TIME_UNITS_PER_SEC to represent internal clock resolution

[IPROUTE]: Introduce TIME_UNITS_PER_SEC to represent internal clock resolution

Introduce TIME_UNITS_PER_SEC and conversion functions between internal
resolution and resolution expected by the kernel (currently implemented as
NOPs, only needed by HFSC, which currently always uses microseconds).

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
17 years agoIntroduce tc_calc_xmitsize and use where appropriate
Patrick McHardy [Sun, 4 Mar 2007 19:14:57 +0000 (20:14 +0100)]
Introduce tc_calc_xmitsize and use where appropriate

[IPROUTE]: Introduce tc_calc_xmitsize and use where appropriate

Add tc_calc_xmitsize() as complement to tc_calc_xmittime(), which calculates
the size that can be transmitted at a given rate during a given time.

Replace all expressions of the form "size = rate*tc_core_tick2usec(time))/1000000"
by tc_calc_xmitsize() calls.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
17 years agoUse tc_calc_xmittime() where appropriate
Patrick McHardy [Sun, 4 Mar 2007 19:14:56 +0000 (20:14 +0100)]
Use tc_calc_xmittime() where appropriate

[IPROUTE]: Use tc_calc_xmittime() where appropriate

Replace expressions of the form "tc_core_usec2tick(1000000 * size/rate)"
by tc_calc_xmittime().

The CBQ case deserves an extra comment: when called with bnwd=rate,
tc_cbq_calc_maxidle() behaves identical to tc_calc_xmittime():

unsigned tc_cbq_calc_maxidle(...)
{
double g = 1.0 - 1.0/(1<<ewma_log);
double xmt = (double)avpkt/bndw;

maxidle = xmt*(1-g);
if (bndw != rate && maxburst) {
...
}
return tc_core_usec2tick(maxidle*(1<<ewma_log)*1000000);
}

which comes down to:

maxidle = xmt * (1 - g)
= xmt * (1 - (1.0 - 1.0/(1 << ewma_log))
= xmt * (1.0/(1 << ewma_log))

so:

maxidle * (1 << ewma_log) * 1000000
= xmt * (1.0/(1 << ewma_log)) * (1 << ewma_log) * 1000000
= xmt * 1000000
= avpkt/bndw * 1000000

Which means tc_core_usec2tick(maxidle*(1<<ewma_log)*1000000) is identical
to tc_calc_xmittime(bndw, avpkt). Use it directly since its a lot easier
to understand its limits.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
17 years agotbf: fix latency printing
Patrick McHardy [Sun, 4 Mar 2007 19:14:55 +0000 (20:14 +0100)]
tbf: fix latency printing

[IPROUTE]: tbf: fix latency printing

The calculated latency is already in usecs, the additional tick2usec
conversion breaks the calculation with jiffies or tsc clock source.

Example:

# tc qdisc add dev dummy0 root tbf latency 20ms burst 10k rate 50mbit
# tc qdisc show dev dummy0
qdisc tbf 8002: rate 50000Kbit burst 10Kb lat 15.4ms

Fixed:

# tc qdisc show dev dummy0
qdisc tbf 8002: rate 50000Kbit burst 10Kb lat 20ms

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
17 years agonl_mgrp to crap if base multicast groups exceeded
jamal [Sun, 25 Feb 2007 17:02:23 +0000 (12:02 -0500)]
nl_mgrp to crap if base multicast groups exceeded

cheers,
jamal

[GENERAL] nl_mgrp to crap if base multicast groups exceeded

The old scheme of bitmasks works only for the first 32 groups.
Above that the setsockopt scheme must be used.

Signed-off-by: J Hadi Salim <hadi@cyberus.ca>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
17 years agoupdate rest to use nl_mgrp
jamal [Sun, 25 Feb 2007 16:55:19 +0000 (11:55 -0500)]
update rest to use nl_mgrp

cheers,
jamal

[ALL] update rest to use nl_mgrp

Signed-off-by: J Hadi Salim <hadi@cyberus.ca>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
17 years agoUse kernel headers from 2.6.20.y
Stephen Hemminger [Tue, 13 Mar 2007 21:37:11 +0000 (14:37 -0700)]
Use kernel headers from 2.6.20.y

Update kernel headers to be versions from 2.6.20.y
Solve cross compile build problems with x_tables and netfilter.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
17 years agoenabled to manipulate the flags of IFA_F_HOMEADDRESS or IFA_F_NODAD from ip.
Noriaki TAKAMIYA [Wed, 7 Mar 2007 18:15:43 +0000 (03:15 +0900)]
enabled to manipulate the flags of IFA_F_HOMEADDRESS or IFA_F_NODAD from ip.

Hi,

  This patch enables ip command to add IFA_F_HOMEADDRESS and
  IFA_F_NODAD flags while adding the IPv6 address.

Signed-off-by: Noriaki TAKAMIYA<takamiya@po.ntts.co.jp>
Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
17 years agoTC bfifo man page
Stephen Hemminger [Wed, 7 Mar 2007 22:18:43 +0000 (14:18 -0800)]
TC bfifo man page

Add back missing man page.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
17 years agoiptables library fix
Stephen Hemminger [Tue, 6 Mar 2007 21:03:19 +0000 (13:03 -0800)]
iptables library fix

Don't hard code iptables library path. Allow use of environment variable.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
17 years agodo not ignore build failures in subdirs of iproute2
Mike Frysinger [Tue, 6 Mar 2007 01:50:49 +0000 (17:50 -0800)]
do not ignore build failures in subdirs of iproute2

if a file fails to compile in a subdir of iproute2 fails (say "tunnel.c" in
the "ip" dir), the top level makefile does not abort:
 all: Config
    @for i in $(SUBDIRS); \
    do $(MAKE) $(MFLAGS) -C $$i; done

the attached patch inserts a 'set -e' so that if the $(MAKE) fails, the all
target fails as well
-mike

17 years agoFixes use of uninitialized string
Thomas Hisch [Fri, 9 Feb 2007 18:24:47 +0000 (19:24 +0100)]
Fixes use of uninitialized string

store can be used uninitialized in generic_proc_open
if getenv(env) != NULL

Signed-off-by: Thomas Hisch <t.hisch@gmail.com>
17 years agofix tc-pfifo and tc-bfifo man pages
Stephen Hemminger [Tue, 20 Feb 2007 19:35:13 +0000 (11:35 -0800)]
fix tc-pfifo and tc-bfifo man pages

Move tc-pbfifo to tc-bfifo and make tc-pfifo a sym link

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
17 years agonetem parameters to change command
Stephen Hemminger [Tue, 9 Jan 2007 23:46:55 +0000 (15:46 -0800)]
netem parameters to change command

When using tc to change netem attributes, only those values
on the command line should be passed down, others should
remain unchanged.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
17 years agosnapshot update
Stephen Hemminger [Thu, 14 Dec 2006 23:04:12 +0000 (15:04 -0800)]
snapshot update

17 years agoFixes for tc help commands
Hasso Tepper [Sun, 10 Dec 2006 14:33:05 +0000 (16:33 +0200)]
Fixes for tc help commands

* "tc [class|qdisc|filter] get" doesn't exist, remove it from inline help.

* Add "replace" to "tc [class|filter] get" inline help.

* Fix "tc [class|qdisc|filter] help" output:

  ~$ tc class help
  [snip]
  Command "help" is unknown, try "tc class help".
  ~$

with my best wishes,

--
Hasso Tepper
Elion Enterprises Ltd. [AS3249]
Data Communication Network Administrator

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
17 years agoEliminate trailing whitespace
Stephen Hemminger [Thu, 14 Dec 2006 01:05:50 +0000 (17:05 -0800)]
Eliminate trailing whitespace

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
17 years agoupdate xfrm monitoring to use nl_mgrp
jamal [Fri, 8 Dec 2006 01:58:23 +0000 (20:58 -0500)]
update xfrm monitoring to use nl_mgrp

Stephen,
I will wait until you sync all these patches ive sent; then send a
couple more then i will be done.

cheers,
jamal

[XFRM] update xfrm monitoring to use nl_mgrp

Signed-off-by: J Hadi Salim <hadi@cyberus.ca>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
17 years agomake muticast group to bitmask conversion generic
jamal [Fri, 8 Dec 2006 01:47:03 +0000 (20:47 -0500)]
make muticast group to bitmask conversion generic

[utils] make muticast group to bitmask conversion generic

Signed-off-by: J Hadi Salim <hadi@cyberus.ca>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
17 years agoupdate xfrm async events
jamal [Fri, 8 Dec 2006 01:31:14 +0000 (20:31 -0500)]
update xfrm async events

[XFRM] update xfrm async events

Report abbreviated async xfrm aevents.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
17 years agoMention need for db dev package
jamal [Thu, 7 Dec 2006 16:08:19 +0000 (11:08 -0500)]
Mention need for db dev package

[README] Mention need for db dev package
This has always been an annoyance for me whenever i moved to a new
machine. Just mention it in the readme hoping it will save someone
some cycles

Signed-off-by: J Hadi Salim <hadi@cyberus.ca>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
17 years agoFix missing class/flowid oddity
jamal [Thu, 7 Dec 2006 16:07:07 +0000 (11:07 -0500)]
Fix missing class/flowid oddity

[U32] Fix missing class/flowid oddity
When an action or policer is specified but not a classid/flowid, the
syntax accepts it but the kernel never really hits it.
This has been a long standing problem, but thanks to the persistence
of Marco Berizzi <pupilla@hotmail.com> I broke down and fixed it.

Signed-off-by: J Hadi Salim <hadi@cyberus.ca>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
17 years ago[IPROUTE]: Add support for routing rule fwmark masks
Patrick McHardy [Thu, 14 Dec 2006 00:58:32 +0000 (16:58 -0800)]
[IPROUTE]: Add support for routing rule fwmark masks

Needs kernel >= 2.6.19.

Signed-off-by: Patrick McHardy <kaber@trash.net>
17 years agoChange to post 2.6.19 sanitized headers
Stephen Hemminger [Thu, 14 Dec 2006 00:56:40 +0000 (16:56 -0800)]
Change to post 2.6.19 sanitized headers

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
17 years agoclarify "ok" and "pass"
jamal [Wed, 6 Dec 2006 17:44:26 +0000 (12:44 -0500)]
clarify "ok" and "pass"

a small one.
I have a few more but just run out of cycles for now;
if you dont mind holding before releasing for a short while so i can
get them out I will appreciate it.

cheers,
jamal

[DOC]: clarify "ok" and "pass"

A small fixup to elucidate the mysteries of accepting ..

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
17 years agoAdd controller support for new features exposed
jamal [Wed, 6 Dec 2006 17:35:52 +0000 (12:35 -0500)]
Add controller support for new features exposed

Ok, heres hopefully the last one in this series for generic netlink ..

cheers,
jamal

[GENL]: Add controller support for new features exposed

Update the controller to spit out the new features being exposed
from the kernel

Signed-off-by: J Hadi Salim <hadi@cyberus.ca>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
17 years agoUpdate generic netlink header
jamal [Wed, 6 Dec 2006 17:08:24 +0000 (12:08 -0500)]
Update generic netlink header

Stepehen,

Didnt hear back from you, please apply this one; needed for the next
patches.

cheers,
jamal

[GENL]  Update generic netlink header

The header file needs to be uptodate with recent changes to allow
for forward compatibility

Signed-off-by: J Hadi Salim <hadi@cyberus.ca>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
17 years agoMulticast computation off by one
jamal [Wed, 6 Dec 2006 17:06:03 +0000 (12:06 -0500)]
Multicast computation off by one

A small typo fixup
BTW, how do you like the subject to look like?

cheers,
jamal

[GENL] Multicast computation off by one

When using the first 32 groups, the multicast group to bit mapping
was off by one.

Signed-off-by: Jamal Hadi Salim
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
17 years agoRemove trailing whitespace
Stephen Hemminger [Tue, 5 Dec 2006 18:10:22 +0000 (10:10 -0800)]
Remove trailing whitespace

Go through source files and remove all trailing whitespace

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
17 years agoXFRM: Mobility header support.
Masahide NAKAMURA [Tue, 5 Dec 2006 10:16:12 +0000 (19:16 +0900)]
XFRM: Mobility header support.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
17 years agoXFRM: support report message by monitor.
Masahide NAKAMURA [Tue, 5 Dec 2006 10:16:05 +0000 (19:16 +0900)]
XFRM: support report message by monitor.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
17 years agoXFRM: Mobile IPv6 route optimization support.
Masahide NAKAMURA [Tue, 5 Dec 2006 10:15:47 +0000 (19:15 +0900)]
XFRM: Mobile IPv6 route optimization support.

To support Mobile IPv6 RO, the following extension is included:
o Use XFRM_MODE_XXX macro instead of magic number
o New attribute option for all state: source address for
  deleting or getting message
o New attribute options for RO: care-of address, last-used timestamp
  and wild-receive flag

Note:
Flush command like `ip xfrm state flush` is to remove all XFRM state.
It has been effected for IPsec SAD but with this patch it flushes both
IPsec SAD and Mobile IPv6 RO states.
To make only IPsec SA flush, it is recommanded to specify each XFRM
protocol like below:
 `ip x s f proto esp ; ip x s f proto ah ; ip x s f proto comp`

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
17 years agoXFRM: sub policy support.
Masahide NAKAMURA [Tue, 5 Dec 2006 10:15:38 +0000 (19:15 +0900)]
XFRM: sub policy support.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
17 years agoAdd more includes
Stephen Hemminger [Tue, 5 Dec 2006 17:59:59 +0000 (09:59 -0800)]
Add more includes

Add more sanitized headers to make build work,
and get rid of warning

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
17 years agoUpdate to 2.6.19 headers
Stephen Hemminger [Tue, 5 Dec 2006 17:54:48 +0000 (09:54 -0800)]
Update to 2.6.19 headers

Headers extracted from early 2.6.20 development process

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
17 years agoDisplay local route table name correctly in output of:
Boian Bonev [Mon, 27 Nov 2006 22:12:31 +0000 (14:12 -0800)]
Display local route table name correctly in output of:
ip ru

17 years agoTUNNEL: IPv6-over-IPv6 tunnel support.
Masahide NAKAMURA [Fri, 24 Nov 2006 03:27:09 +0000 (12:27 +0900)]
TUNNEL: IPv6-over-IPv6 tunnel support.

Fix ip6tunnel.c to be fit with current ip command style.
Unlike other modules currently iptunnel (and ip6tunnel) is not
designed as protocol-independent because of unarranged structure
between IPv4 and IPv6.

Usage: ip -f inet6 tunnel { add | change | del | show } [ NAME ]
          [ remote ADDR local ADDR ] [ dev PHYS_DEV ]
          [ encaplimit ELIM ]
          [ hoplimit HLIM ] [ tc TC ] [ fl FL ]
          [ dscp inherit ]

Where: NAME := STRING
       ADDR := IPV6_ADDRESS
       ELIM := { none | 0..255 }(default=4)
       HLIM := 0..255 (default=64)
       TC   := { 0x0..0xff | inherit }
       FL   := { 0x0..0xfffff | inherit }

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
17 years agoTUNNEL: Import ip6tunnel.c.
Masahide NAKAMURA [Fri, 24 Nov 2006 03:27:06 +0000 (12:27 +0900)]
TUNNEL: Import ip6tunnel.c.

This file (ip6tunnel.c) is renamed from ipv6tunnel.c which is imported
from usagi cvs tree. It is originally ported by MIPL to work on their
2.4 kernel patch (MIPL1).

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
17 years agoTUNNEL: Split common functions to export them.
Masahide NAKAMURA [Fri, 24 Nov 2006 03:27:03 +0000 (12:27 +0900)]
TUNNEL: Split common functions to export them.

Split common functions like ioctl to export them.
This is a preparation to support to configure IPv6-over-IPv6 tunnel.
This patch also includes minor improvemen:
 o to stop to include unused headers
 o to change function static if it is not needed to be exported

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
17 years agoADDR: Define 0xFFFFFFFFU as INFINITY_LIFE_TIME regarding to the kernel.
Masahide NAKAMURA [Fri, 24 Nov 2006 03:27:01 +0000 (12:27 +0900)]
ADDR: Define 0xFFFFFFFFU as INFINITY_LIFE_TIME regarding to the kernel.

Signed-off-by: TAKAMIYA Noriaki <takamiya@po.ntts.co.jp>
Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
17 years agoADDR: Add the 'change' and 'replace' commands to the IPv6 address manipulation context.
Noriaki TAKAMIYA [Fri, 24 Nov 2006 03:26:58 +0000 (12:26 +0900)]
ADDR: Add the 'change' and 'replace' commands to the IPv6 address manipulation context.

Signed-off-by: TAKAMIYA Noriaki <takamiya@po.ntts.co.jp>
Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>