]> rtime.felk.cvut.cz Git - lisovros/iproute2_canprio.git/log
lisovros/iproute2_canprio.git
12 years agotc-red: update man page
Eric Dumazet [Tue, 24 Jan 2012 13:18:33 +0000 (14:18 +0100)]
tc-red: update man page

include documentation for harddrop and adaptive parameters.

All parameters but limit and avpkt are optional.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
12 years agonetem: Fix 'reorder' section of man page
Vijay Subramanian [Tue, 24 Jan 2012 06:08:52 +0000 (22:08 -0800)]
netem: Fix 'reorder' section of man page

The syntax used in the example on reordering in the manpage is inconsistent with
the usage syntax.  Moreover, the text does not describe the reordering process
in the kernel correctly. This patch fixes these two issues.

Signed-off-by: Vijay Subramanian <subramanian.vijay@gmail.com>
12 years agonetem: Fix up grammatical errors in man page
Vijay Subramanian [Tue, 24 Jan 2012 06:08:51 +0000 (22:08 -0800)]
netem: Fix up grammatical errors in man page

Signed-off-by: Vijay Subramanian <subramanian.vijay@gmail.com>
12 years agoFix unix socket diagnostic build
Stephen Hemminger [Fri, 20 Jan 2012 20:48:00 +0000 (12:48 -0800)]
Fix unix socket diagnostic build

Get updated headers incorporated into build environment
and include required sock_diag.h.

12 years agoiproute: Dump unix sockets via netlink
Pavel Emelyanov [Thu, 15 Dec 2011 03:28:15 +0000 (03:28 +0000)]
iproute: Dump unix sockets via netlink

Get the same info as from /proc file plus the peer inode.

Applies on top of new sock diag patch and udp diag patch.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
12 years agoUpdate ip manpage
nick black [Fri, 20 Jan 2012 20:32:44 +0000 (12:32 -0800)]
Update ip manpage

Fix synopsis and other references to match current code.

12 years agonetem: Fail cleanly if user input is wrong
Vijay Subramanian [Fri, 20 Jan 2012 17:50:25 +0000 (09:50 -0800)]
netem: Fail cleanly if user input is wrong

(Resending patch since it looks like my earlier mail did not make it to
netdev).

netem reordering requires that the delay parameter be given. Currently, if no
delay is given, tc prints the error message but still installs the qdisc. Fix
this by printing the usage and failing cleanly.

Signed-off-by: Vijay Subramanian <subramanian.vijay@gmail.com>
12 years agoMerge branch 'master' of nehalam:src/iproute2
Stephen Hemminger [Fri, 20 Jan 2012 16:17:59 +0000 (08:17 -0800)]
Merge branch 'master' of nehalam:src/iproute2

12 years agoip: make 'ip l' be 'ip link'
Stephen Hemminger [Fri, 20 Jan 2012 16:16:02 +0000 (08:16 -0800)]
ip: make 'ip l' be 'ip link'

Restore compatiablity for those lazy typists.

12 years agogred: support TCA_GRED_MAX_P attribute
Eric Dumazet [Fri, 20 Jan 2012 15:27:50 +0000 (16:27 +0100)]
gred: support TCA_GRED_MAX_P attribute

TCA_GRED_MAX_P permits to express high resolution probabilities.

New output (on 3.3+ kernel) :

disc gred 9442: root refcnt 17
 DP:0 (prio 1) Average Queue 0b Measured Queue 0b
 Packet drops: 0 (forced 0 early 0)
 Packet totals: 20 (bytes 2584)
 limit 31460b min 3000b max 9000b ewma 5 probability 0.05 Scell_log 15

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
12 years agochoke: support TCA_CHOKE_MAX_P
Eric Dumazet [Fri, 20 Jan 2012 15:19:44 +0000 (16:19 +0100)]
choke: support TCA_CHOKE_MAX_P

TCA_CHOKE_MAX_P permits to express high resolution RED probability.

tc qdisc add dev $DEV parent 1:1 handle 10: est 1sec 8sec choke \
limit 90 ecn min 10 max 30 probability 0.05 bandwidth 10Mbit

Before patch :

tc -s -d qdisc show dev eth3
qdisc ... limit 90p min 10p max 30p ecn ewma 3 Plog 19 Scell_log 13

After :

qdisc ... limit 90p min 10p max 30p ecn ewma 3 probability 0.05
Scell_log 13

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
12 years agosfq: add optional RED on top of SFQ
Eric Dumazet [Fri, 20 Jan 2012 11:17:43 +0000 (12:17 +0100)]
sfq: add optional RED on top of SFQ

Adds an optional Random Early Detection on each SFQ flow queue.

Traditional SFQ limits count of packets, while RED permits to also
control number of bytes per flow, and adds ECN capability as well.

1) We dont handle the idle time management in this RED implementation,
since each 'new flow' begins with a null qavg. We really want to address
backlogged flows.

2) if headdrop is selected, we try to ecn mark first packet instead of
currently enqueued packet. This gives faster feedback for tcp flows
compared to traditional RED [ marking the last packet in queue ]

Example of use :

tc qdisc add dev $DEV parent 1:1 handle 10: est 1sec 4sec sfq \
limit 3000 headdrop flows 512 divisor 16384 \
redflowlimit 100000 min 8000 max 60000 probability 0.20 ecn

qdisc sfq 10: parent 1:1 limit 3000p quantum 1514b depth 127 headdrop
flows 512/16384 divisor 16384
 ewma 6 min 8000b max 60000b probability 0.2 ecn
 prob_mark 0 prob_mark_head 4876 prob_drop 6131
 forced_mark 0 forced_mark_head 0 forced_drop 0
 Sent 1175211782 bytes 777537 pkt (dropped 6131, overlimits 11007
requeues 0)
 rate 99483Kbit 8219pps backlog 689392b 456p requeues 0

In this test, with 64 netperf TCP_STREAM sessions, 50% using ECN enabled
flows, we can see number of packets CE marked is smaller than number of
drops (for non ECN flows)

If same test is run, without RED, we can check backlog is much bigger.

qdisc sfq 10: parent 1:1 limit 3000p quantum 1514b depth 127 headdrop
flows 512/16384 divisor 16384
 Sent 1148683617 bytes 795006 pkt (dropped 0, overlimits 0 requeues 0)
 rate 98429Kbit 8521pps backlog 1221290b 841p requeues 0

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
12 years agored: fix adaptive spelling
Eric Dumazet [Fri, 20 Jan 2012 15:10:13 +0000 (16:10 +0100)]
red: fix adaptive spelling

Reported-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
12 years agored: Add adaptative algo Logged in as shemminger
Eric Dumazet [Thu, 19 Jan 2012 22:45:20 +0000 (14:45 -0800)]
red: Add adaptative algo Logged in as shemminger

Enable Adaptative RED algo, using :

tc qdisc  ... red limit BYTES ... adaptative ...

Support of high precision probability/max_p setting and reporting, with
support of old kernels.

With a new kernel, "Plog ..." is replaced in tc output by "probability
value" :

qdisc red 10: dev eth3 parent 1:1 limit 360Kb min 30Kb max 90Kb ecn ewma
5 probability 0.09 Scell_log 15

12 years agonetem: add rate extension to man page
Stephen Hemminger [Thu, 19 Jan 2012 22:38:36 +0000 (14:38 -0800)]
netem: add rate extension to man page

Fixed up version of patch from Hagen Paul Pfeifer <hagen@jauu.net>
Also run spell check.

12 years agotc: netem rate shaping and cell extension
Hagen Paul Pfeifer [Thu, 19 Jan 2012 22:28:27 +0000 (14:28 -0800)]
tc: netem rate shaping and cell extension

This patch add rate shaping as well as cell support. The link-rate can be
specified via rate options. Three optional arguments control the cell
knobs: packet-overhead, cell-size, cell-overhead. To ratelimit eth0 root
queue to 5kbit/s, with a 20 byte packet overhead, 100 byte cell size and
a 5 byte per cell overhead:

tc qdisc add dev eth0 root netem rate 5kbit 20 100 5

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
12 years agoutils: add s32 parser
Hagen Paul Pfeifer [Tue, 20 Dec 2011 11:28:46 +0000 (11:28 +0000)]
utils: add s32 parser

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
12 years agousing NLM_F_DUMP flag constant in libnetlink.c
Masatake YAMATO [Thu, 19 Jan 2012 22:16:12 +0000 (14:16 -0800)]
using NLM_F_DUMP flag constant in libnetlink.c

This is trivial patch for libnetlink.c in iproute2.

In iproute2/include/linux/netlink.h NLM_F_DUMP is defines as:

   #define NLM_F_DUMP (NLM_F_ROOT|NLM_F_MATCH)

It is not used in libnetlink.c. If used, the code becomes a bit easier
to read.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
12 years agonetem: Add missing '}' in man page
Vijay Subramanian [Thu, 19 Jan 2012 21:17:03 +0000 (13:17 -0800)]
netem: Add missing '}' in man page

Signed-off-by: Vijay Subramanian <subramanian.vijay@gmail.com>
12 years agoUpdate to 3.3 headers (with inet_diag fix)
Stephen Hemminger [Thu, 19 Jan 2012 22:09:42 +0000 (14:09 -0800)]
Update to 3.3 headers (with inet_diag fix)

Incorporate change to fix inet_diag build failure.

12 years agoUpdate to kernel v3.3 headers
Stephen Hemminger [Tue, 10 Jan 2012 18:50:02 +0000 (10:50 -0800)]
Update to kernel v3.3 headers

Initial merge window version of headers

12 years agoFix man page whatis entry errors
Stephen Hemminger [Tue, 10 Jan 2012 18:47:28 +0000 (10:47 -0800)]
Fix man page whatis entry errors

lintian says:
W: iproute: manpage-has-bad-whatis-entry usr/share/man/man7/tc-hfsc.7.gz
W: iproute: manpage-has-bad-whatis-entry usr/share/man/man8/ip-address.8.gz
W: iproute: manpage-has-bad-whatis-entry usr/share/man/man8/ip-addrlabel.8.gz
W: iproute: manpage-has-bad-whatis-entry usr/share/man/man8/ip-link.8.gz
W: iproute: manpage-has-bad-whatis-entry usr/share/man/man8/ip-maddress.8.gz
W: iproute: manpage-has-bad-whatis-entry usr/share/man/man8/ip-monitor.8.gz
W: iproute: manpage-has-bad-whatis-entry usr/share/man/man8/ip-mroute.8.gz
W: iproute: manpage-has-bad-whatis-entry usr/share/man/man8/ip-neighbour.8.gz
W: iproute: manpage-has-bad-whatis-entry usr/share/man/man8/ip-netns.8.gz
W: iproute: manpage-has-bad-whatis-entry usr/share/man/man8/ip-ntable.8.gz
W: iproute: manpage-has-bad-whatis-entry usr/share/man/man8/ip-route.8.gz
W: iproute: manpage-has-bad-whatis-entry usr/share/man/man8/ip-rule.8.gz
W: iproute: manpage-has-bad-whatis-entry usr/share/man/man8/ip-tunnel.8.gz
W: iproute: manpage-has-bad-whatis-entry usr/share/man/man8/ip-xfrm.8.gz

12 years agoiplt2p: remove unused libnl headers
Stephen Hemminger [Tue, 10 Jan 2012 16:50:49 +0000 (08:50 -0800)]
iplt2p: remove unused libnl headers

Leftover from change to original code.

12 years agov3.2.0
Stephen Hemminger [Thu, 5 Jan 2012 16:34:31 +0000 (08:34 -0800)]
v3.2.0

12 years agoiproute2: fix calling up the xt action
Jan Engelhardt [Tue, 31 May 2011 22:52:07 +0000 (00:52 +0200)]
iproute2: fix calling up the xt action

Upsteam: has not been sent yet

Requesting the xt action never succeeded because it registered
using the wrong name.

12 years agoiproute2: proper detection of libxtables position and flags
Jan Engelhardt [Sat, 24 Sep 2011 21:37:34 +0000 (23:37 +0200)]
iproute2: proper detection of libxtables position and flags

Upstream: not sent yet

Any tests involving iptables _MUST_ utilize pkg-config to find the
proper locations of the installation.

12 years agoREADME cleanup's
Stephen Hemminger [Tue, 3 Jan 2012 23:04:55 +0000 (15:04 -0800)]
README cleanup's

Spell check the README files and remove out of date release notes.

12 years agoematch: fix warning about unused input()
Stephen Hemminger [Tue, 3 Jan 2012 21:55:59 +0000 (13:55 -0800)]
ematch: fix warning about unused input()

Use existing compile flag to indicate that input() is not used
by tc ematch, fixes compiler warning.

12 years agoematch: fix warning about yyerror and const
Stephen Hemminger [Tue, 3 Jan 2012 21:55:00 +0000 (13:55 -0800)]
ematch: fix warning about yyerror and const

yyerror() should take const char * on current bison.

12 years agoiproute2: avoid use of implicit declarations
Jan Engelhardt [Sat, 31 Dec 2011 22:16:27 +0000 (23:16 +0100)]
iproute2: avoid use of implicit declarations

gcc -DLIBDIR=\"/usr/lib64\" -D_GNU_SOURCE -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -Wstrict-prototypes -fPIC -DXT_LIB_DIR=\"/usr/lib64/xtables\" -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib64\" -fPIC   -c -o ipx_pton.o ipx_pton.c
In file included from ../include/utils.h:8:0,
                 from ipx_ntop.c:5:
../include/libnetlink.h: In function 'rta_getattr_u64':
../include/libnetlink.h:84:2: warning: implicit declaration of function 'memcpy'
../include/libnetlink.h:84:2: warning: incompatible implicit declaration of built-in function 'memcpy'

12 years agol2tp: Add l2tp support
Stephen Hemminger [Sat, 24 Dec 2011 04:52:10 +0000 (20:52 -0800)]
l2tp: Add l2tp support

Based on earlier implementation by James Chapman. But instead of
dragging in all of libnl, use existing libnetlink infrastructure.

12 years agolibnetlink: add attribute access inline functions
Stephen Hemminger [Thu, 29 Dec 2011 17:29:33 +0000 (09:29 -0800)]
libnetlink: add attribute access inline functions

Based on idea in libmnl, add attribute access functions instead
of explicitly exposing casts. Also handle possible alignment issues
of u64.

12 years agolibnetlink: remove unused junk callback
Stephen Hemminger [Wed, 28 Dec 2011 18:37:12 +0000 (10:37 -0800)]
libnetlink: remove unused junk callback

Both rtnl_talk and rtnl_dump had a callback for handling portions
of netlink message that do not match the correct pid or seq.
But this callback was never used by any part of iproute2 so remove
it.

12 years agonetem: fix a typo in explain()
Eric Dumazet [Sat, 24 Dec 2011 04:39:13 +0000 (05:39 +0100)]
netem: fix a typo in explain()

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
12 years agolibnetlink: add more attribute functions
Stephen Hemminger [Fri, 23 Dec 2011 18:43:54 +0000 (10:43 -0800)]
libnetlink: add more attribute functions

New functions to handle u8, u16, u32, u64 and string attribute types.
Use common code for all attribute wrappers.

12 years agolibnetlink: change rtnl_send() to take void *
Stephen Hemminger [Fri, 23 Dec 2011 18:40:04 +0000 (10:40 -0800)]
libnetlink: change rtnl_send() to take void *

Avoid having to cast buffer being sent.

12 years agonetem: add support for 4 state and GE loss model
Stephen Hemminger [Fri, 23 Dec 2011 01:08:11 +0000 (17:08 -0800)]
netem: add support for 4 state and GE loss model

Incorporate support for new loss models.

12 years agonetem: fix man page
Stephen Hemminger [Fri, 23 Dec 2011 00:50:54 +0000 (16:50 -0800)]
netem: fix man page

Format man page with conventional style (BNF and italics) to make
it match other pages.

Fix loss model options to match what will implemented!

12 years agoUpdate to latest 3.2 kernel headers
Stephen Hemminger [Thu, 22 Dec 2011 18:40:39 +0000 (10:40 -0800)]
Update to latest 3.2 kernel headers

Keep in sync

12 years agoSplit up ip man page
Stephen Hemminger [Thu, 22 Dec 2011 18:34:03 +0000 (10:34 -0800)]
Split up ip man page

The man page for ip command had grown too large to be readable.
Break it up into separate pages.

12 years agotc: man: add man page for stochastic fair blue
Florian Westphal [Sun, 11 Dec 2011 12:31:58 +0000 (12:31 +0000)]
tc: man: add man page for stochastic fair blue

With help from Eric Dumazet.
Man page is derived in parts from README file contained in
Juliusz Chroboczeks original sfb kernel patch.

12 years agored: harddrop support and cleanups
Eric Dumazet [Thu, 8 Dec 2011 23:11:40 +0000 (00:11 +0100)]
red: harddrop support and cleanups

Add harddrop support (kernel support added a long time ago), and various
cleanups.

min BYTES, max BYTES are now optional and follow Sally Floyd's
recommendations.

By the way, our default 2% probability is a bit low, Sally recommends 10%.
Not a big deal if upcoming adaptative algo is deployed.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
12 years agonetem: add man-page
Hagen Paul Pfeifer [Fri, 25 Nov 2011 03:47:56 +0000 (03:47 +0000)]
netem: add man-page

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
12 years agored: make burst optional
Eric Dumazet [Thu, 1 Dec 2011 14:25:59 +0000 (15:25 +0100)]
red: make burst optional

Documentation advises to set burst to (min+min+max)/(3*avpkt)

Let tc do this automatically if user doesnt provide burst himself.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
12 years agored: give a hint about burst value
Eric Dumazet [Thu, 1 Dec 2011 11:04:31 +0000 (12:04 +0100)]
red: give a hint about burst value

Check for burst values that are too small.

Reported-by: Dave Taht <dave.taht@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
12 years agoiproute2: Add new command to ip link to enable/disable VF spoof check
Greg Rose [Thu, 13 Oct 2011 20:31:32 +0000 (20:31 +0000)]
iproute2: Add new command to ip link to enable/disable VF spoof check

Add ip link command parsing for VF spoof checking enable/disable

V2 - Fixed problem with parsing of dump info on kernels that don't
     support the spoof checking option and also wrapped the ifla_vf_info
     structure in #ifdef __KERNEL__ to prevent user space from directly
     accessing the structure
V3 - Improved parsing of vfinfo
V4 - Put Makefile back to proper list of subdirs
V5 - Remove struct ifla_vf_info, it is only used by the kernel
V6 - Make sure spoof check is reported by the driver - rtnl will set
     it to -1 to indicate driver didn't report a value.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoss: report ecnseen
Eric Dumazet [Wed, 16 Nov 2011 07:59:06 +0000 (07:59 +0000)]
ss: report ecnseen

Support ECNSEEN reporting in ss command.

ESTAB      0      0           10.170.73.123:4900
10.170.73.125:51001    uid:501 ino:385994 sk:f31e5f00
         mem:(r0,w0,f0,t0) ts sack ecn ecnseen bic wscale:8,8 rto:210
rtt:18.75/15 ato:40 cwnd:10 send 69.9Mbps rcv_space:32768

"ecn" means TCP session negociated ECN capability (TCP layer) at setup
time

"ecnseen" at least one frame with ECT(0) or ECT(1) or ECN (IP layer) was
received from peer.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
12 years agotc: Use correct variable type for get_distribution() result
Thomas Jarosch [Wed, 23 Nov 2011 21:15:19 +0000 (22:15 +0100)]
tc: Use correct variable type for get_distribution() result

get_distribution() returns an int.

cppcheck reported:
[tc/q_netem.c:243]: (style) Checking if unsigned variable 'dist_size' is less than zero.

The mismatch actually rendered the error checking
after get_distribution() ineffective.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
12 years agotc: Remove unused variable 'res'.
Thomas Jarosch [Wed, 23 Nov 2011 21:13:23 +0000 (22:13 +0100)]
tc: Remove unused variable 'res'.

Detected by cppcheck.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
12 years agoUpdate to 3.2.0-rc2 headers
Stephen Hemminger [Wed, 23 Nov 2011 22:34:49 +0000 (14:34 -0800)]
Update to 3.2.0-rc2 headers

12 years agov3.1.0
Stephen Hemminger [Fri, 18 Nov 2011 00:53:50 +0000 (16:53 -0800)]
v3.1.0

12 years agoDisplay closed UDP sockets on 'ss -ul'
Petr Šabata [Wed, 16 Nov 2011 17:32:20 +0000 (09:32 -0800)]
Display closed UDP sockets on 'ss -ul'

This patch emulates 'netstat -ul' behavior, showing 'closed'
(state 07) UDP sockets when ss is called with '-ul' options.
Although dirty, this seems like the least invasive way to fix
it and shouldn't really break anything.

Signed-off-by: Petr Šabata <contyk@redhat.com>
12 years agocleanup ematch yacc files
Stephen Hemminger [Wed, 2 Nov 2011 23:39:36 +0000 (16:39 -0700)]
cleanup ematch yacc files

make clean needs to remove all the yacc output files for ematch.

12 years agoHFS manpage changes
Michal Soltys [Mon, 31 Oct 2011 21:56:38 +0000 (22:56 +0100)]
HFS manpage changes

Few minor changes and small additions.

12 years agoHFSC (7) & (8) documentation + assorted changes
Michal Soltys [Wed, 26 Oct 2011 08:15:21 +0000 (04:15 -0400)]
HFSC (7) & (8) documentation + assorted changes

This patch adds detailed documentation for HFSC scheduler. It roughly
follows HFSC paper, but tries to not rely too much on math side of things.
Post-paper/Linux specific subjects (timer resolution, ul service curve, etc.)
are also discussed.

I've read it many times over, but it's a lengthy chunk of text - so try
to be understanding in case I made some mistakes.

tc-hfsc(7): explains algorithm in detail (very long)
tc-hfsc(8): explains command line options briefly
tc(8): adds references to new man pages
Makefile: adds man7 directory to install target
q_hfsc.c: minimal help text changes, consistency with tc-hfsc(8)

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agotc: fix parallel build file with lex/yacc
Mike Frysinger [Tue, 18 Oct 2011 21:38:08 +0000 (17:38 -0400)]
tc: fix parallel build file with lex/yacc

Building iproute2 in parallel might hit the race failure:
emp_ematch.l:2:30: fatal error: emp_ematch.yacc.h:
No such file or directory
make[1]: *** [emp_ematch.lex.o] Error 1

This is because we currently allow the yacc/lex files to generate and
compile in parallel.  So add a simple dependency to make sure yacc has
finished before we attempt to compile the lex output.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agoip: fix exit codes
Stephen Hemminger [Thu, 13 Oct 2011 15:38:33 +0000 (08:38 -0700)]
ip: fix exit codes

Alternative fix to problem reported by: Bin Li
The issue is came from https://bugzilla.novell.com/show_bug.cgi?id=681952.

In any previous version (since suse ... 10.0?), ip addr add always returned
the error code 2 in case the ip address is already set on the interface:

    inet 172.16.2.3/24 brd 172.16.2.255 scope global bond0
RTNETLINK answers: File exists
2

On 11.4, it returns the exit code 254:

    inet 172.16.1.1/24 brd 172.16.1.255 scope global eth0
RTNETLINK answers: File exists
254

This of course causes ifup to return an error in this quite common case..

12 years agoFix unterminated readlink() buffer usage
Thomas Jarosch [Thu, 13 Oct 2011 08:30:21 +0000 (10:30 +0200)]
Fix unterminated readlink() buffer usage

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
12 years agoUpdate to 3.1-rc9 kernel headers
Stephen Hemminger [Mon, 10 Oct 2011 18:02:42 +0000 (11:02 -0700)]
Update to 3.1-rc9 kernel headers

Align header files with sanitized version of headers in kernel.

12 years agov3.0.0
Stephen Hemminger [Mon, 10 Oct 2011 15:59:54 +0000 (08:59 -0700)]
v3.0.0

12 years agoip: fix man page warnings
Stephen Hemminger [Mon, 10 Oct 2011 15:55:56 +0000 (08:55 -0700)]
ip: fix man page warnings

Fix usage of ".R" which is not man macro.

12 years agoFix file descriptor leak on error in read_igmp()
Thomas Jarosch [Mon, 3 Oct 2011 05:24:44 +0000 (05:24 +0000)]
Fix file descriptor leak on error in read_igmp()

Detected by cppcheck.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
12 years agoFix file descriptor leak in do_tunnels_list()
Thomas Jarosch [Mon, 3 Oct 2011 05:24:32 +0000 (05:24 +0000)]
Fix file descriptor leak in do_tunnels_list()

Detected by cppcheck.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
12 years agoFix file descriptor leak on error in read_mroute_list()
Thomas Jarosch [Mon, 3 Oct 2011 05:24:18 +0000 (05:24 +0000)]
Fix file descriptor leak on error in read_mroute_list()

Detected by cppcheck.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
12 years agoFix file descriptor leak on error in read_viftable()
Thomas Jarosch [Mon, 3 Oct 2011 05:24:08 +0000 (05:24 +0000)]
Fix file descriptor leak on error in read_viftable()

Detected by cppcheck.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
12 years agoFix file descriptor leak on error in iproute_flush_cache()
Thomas Jarosch [Mon, 3 Oct 2011 05:23:53 +0000 (05:23 +0000)]
Fix file descriptor leak on error in iproute_flush_cache()

Detected by cppcheck.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
12 years agoAdd missing closedir() call in do_show()
Thomas Jarosch [Mon, 3 Oct 2011 05:23:42 +0000 (05:23 +0000)]
Add missing closedir() call in do_show()

Detected by cppcheck.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
12 years agoFix memory leak of lname variable in get_target_name()
Thomas Jarosch [Mon, 3 Oct 2011 05:23:30 +0000 (05:23 +0000)]
Fix memory leak of lname variable in get_target_name()

Detected by cppcheck.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
12 years agoFix wrong sanity check in choke_parse_opt()
Thomas Jarosch [Mon, 3 Oct 2011 05:23:18 +0000 (05:23 +0000)]
Fix wrong sanity check in choke_parse_opt()

Detected by cppcheck.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
12 years agoFix wrong comparison in cmp_print_eopt()
Thomas Jarosch [Mon, 3 Oct 2011 05:22:56 +0000 (05:22 +0000)]
Fix wrong comparison in cmp_print_eopt()

Detected by cppcheck.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
12 years agoFix file descriptor leak on error in rtnl_hash_initialize()
Thomas Jarosch [Mon, 3 Oct 2011 05:22:42 +0000 (05:22 +0000)]
Fix file descriptor leak on error in rtnl_hash_initialize()

Detected by cppcheck.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
12 years agoiproute2: fix changing of ip6ip6 tunnel parameters
Jiri Benc [Mon, 19 Sep 2011 05:14:10 +0000 (05:14 +0000)]
iproute2: fix changing of ip6ip6 tunnel parameters

When changing ip6ip6 parameters (ip -6 tun change), ip passes zeroed
struct ip6_tnl_parm to the kernel. The kernel then tries to change all of
the tunnel parameters to the passed values, including zeroing of local and
remote address. This fails (-EEXIST in net/ipv6/ip6_tunnel.c:ip6_tnl_ioctl).

For other tunnel types, ip fetches the current parameters first and applies
the required changes on top of them. This patch applies the same code as in
ip/iptunnel.c to ip/ip6tunnel.c.

See http://bugzilla.redhat.com/730627 for the original bug report.

Signed-off-by: Jiri Benc <jbenc@redhat.com>
12 years agoFix pipe I/O stream descriptor leak in init_service_resolver()
Thomas Jarosch [Mon, 3 Oct 2011 05:22:27 +0000 (05:22 +0000)]
Fix pipe I/O stream descriptor leak in init_service_resolver()

Detected by cppcheck.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
12 years agoiproute2: Fix usage and man page for 'ip link'
Sridhar Samudrala [Thu, 6 Oct 2011 23:10:51 +0000 (16:10 -0700)]
iproute2: Fix usage and man page for 'ip link'

Add bridge as a supported type with 'ip link' in usage and all the missing
types in 'ip' man page. Also fixed some typos.

Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
12 years agoiproute2: arpd - fix usage and manpage options
Petr Sabata [Thu, 6 Oct 2011 12:45:34 +0000 (14:45 +0200)]
iproute2: arpd - fix usage and manpage options

Signed-off-by: Petr Sabata <contyk@redhat.com>
12 years agoiproute2: lnstat - fix typos
Petr Sabata [Thu, 6 Oct 2011 12:45:33 +0000 (14:45 +0200)]
iproute2: lnstat - fix typos

Signed-off-by: Petr Sabata <contyk@redhat.com>
12 years agoiproute2: ss - fix missing parameters
Petr Sabata [Thu, 6 Oct 2011 12:45:32 +0000 (14:45 +0200)]
iproute2: ss - fix missing parameters

Signed-off-by: Petr Sabata <contyk@redhat.com>
12 years agoAdd ntable to ip man page
Stephen Hemminger [Wed, 31 Aug 2011 20:23:04 +0000 (13:23 -0700)]
Add ntable to ip man page

Add some documentation about ip neighbour table parameter command.

12 years agoxt: only unset fields if m is non NULL
Dan McGee [Wed, 31 Aug 2011 19:18:49 +0000 (12:18 -0700)]
xt: only unset fields if m is non NULL

12 years agoensure uptime is initialized if /proc/uptime cannot be opened
Dan McGee [Wed, 31 Aug 2011 19:16:36 +0000 (12:16 -0700)]
ensure uptime is initialized if /proc/uptime cannot be opened

12 years agogenl: remove unused code
Dan McGee [Wed, 31 Aug 2011 19:15:22 +0000 (12:15 -0700)]
genl: remove unused code

remove unused basename logic, avoid dereference of possibly NULL variable

12 years agoiptuntap: avoid double open
Dan McGee [Wed, 31 Aug 2011 19:14:51 +0000 (12:14 -0700)]
iptuntap: avoid double open

would leak a file handle

12 years agoiproute2: Fail "ip netns add" on existing network namespaces.
Eric W. Biederman [Fri, 15 Jul 2011 14:29:41 +0000 (14:29 +0000)]
iproute2: Fail "ip netns add" on existing network namespaces.

Use O_EXCL so that we only create and mount a new network namespace
if there is no chance an existing network namespace is present.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
12 years agoiproute2: Auto-detect the presence of setns in libc
Eric W. Biederman [Fri, 15 Jul 2011 14:26:59 +0000 (14:26 +0000)]
iproute2: Auto-detect the presence of setns in libc

If libc has setns present use that version instead of
rolling the syscall wrapper by hand.

Dan McGee found the following compile error:

    gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include
    -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\"   -c -o ipnetns.o ipnetns.c
    ipnetns.c:31:12: error: static declaration of ‘setns’ follows non-static
    declaration
    /usr/include/bits/sched.h:93:12: note: previous declaration of ‘setns’
    was here
    make[1]: *** [ipnetns.o] Error 1

Reported-by: Dan McGee <dan@archlinux.org>
Tested-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
12 years agoUpdate headers to 3.0.4
Stephen Hemminger [Wed, 31 Aug 2011 18:00:26 +0000 (11:00 -0700)]
Update headers to 3.0.4

Update the automatically generated sanitized headers

12 years agoMake iproute2 configure script more flexible
Dan McGee [Fri, 15 Jul 2011 08:52:24 +0000 (08:52 +0000)]
Make iproute2 configure script more flexible

On Arch Linux, we still install the iptables shared libraries in
/usr/lib/iptables/, even though the main library is installed to
/usr/lib/libxtables.so. This change checks all available locations to
correctly find the iptables library directory.

Signed-off-by: Dan McGee <dan@archlinux.org>
12 years agotc: filter: fix default 'protocol all' on little-endian platforms
Florian Westphal [Wed, 27 Jul 2011 06:47:05 +0000 (06:47 +0000)]
tc: filter: fix default 'protocol all' on little-endian platforms

when specifiying filters without 'protocol' keyword, tc will
default to 'protocol all'.

Unfortunately, this missed a byte-ordering conversion.

12 years agoiproute2: Remove ChangeLog
Dan McGee [Wed, 31 Aug 2011 17:51:42 +0000 (10:51 -0700)]
iproute2: Remove ChangeLog

This hasn't been updated since 2006.

12 years agoAdd LLDP to ethernet type table
Stephen Hemminger [Wed, 31 Aug 2011 17:45:04 +0000 (10:45 -0700)]
Add LLDP to ethernet type table

and make type table const.

12 years agotc: man: update sfq man page
Florian Westphal [Mon, 1 Aug 2011 11:23:37 +0000 (11:23 +0000)]
tc: man: update sfq man page

Document 'divisor' option and mention that external classifiers can be used.

12 years agotc: man: add man page for choke scheduler
Florian Westphal [Sun, 28 Aug 2011 10:35:43 +0000 (10:35 +0000)]
tc: man: add man page for choke scheduler

12 years agoip: fix typo in ip link manual page
Bin Li [Wed, 31 Aug 2011 17:42:00 +0000 (10:42 -0700)]
ip: fix typo in ip link manual page

Extra bracket

12 years agoiproute2: Remove "monitor" from "ip route help" output
Andreas Henriksson [Wed, 20 Jul 2011 15:08:14 +0000 (17:08 +0200)]
iproute2: Remove "monitor" from "ip route help" output

$ ip route help 2>&1 | grep monitor
ip route { add | del | change | append | replace | monitor } ROUTE
$ ip route monitor
Command "monitor" is unknown, try "ip route help".

(I guess what was really intended is "ip monitor route", so just remove
the argument from the help output.)

Originally reported by martin f krafft at http://bugs.debian.org/537681

While at it, also drop all non-existant (route,link,netns) monitor
arguments from the ip(8) man page.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
12 years agoip: fix display of prefix cache info
Christoph Biedl [Wed, 20 Jul 2011 23:02:50 +0000 (16:02 -0700)]
ip: fix display of prefix cache info

The "ip monitor" command does properly decode the "preferred" and
"valid" lifetime records in router advertisements from netlink
messages.

12 years agoAdd QFQ scheduler
Stephen Hemminger [Fri, 7 Jan 2011 17:43:27 +0000 (09:43 -0800)]
Add QFQ scheduler

Basic configuration support for QFQ.
Still need to add manual page.

12 years agoRemove redundant limits.h
Stephen Hemminger [Wed, 13 Jul 2011 16:49:17 +0000 (09:49 -0700)]
Remove redundant limits.h

redo.

12 years agoiproute2: Add processless network namespace support
Eric W. Biederman [Wed, 13 Jul 2011 16:48:26 +0000 (09:48 -0700)]
iproute2: Add processless network namespace support

The goal of this code change is to implement a mechanism such that it is
simple to work with a kernel that is using multiple network namespaces
at once.

This comes in handy for interacting with vpns where there may be rfc1918
address overlaps, and different policies default routes, name servers
and the like.

Configuration specific to a network namespace that would ordinarily be
stored under /etc/ is stored under /etc/netns/<name>.  For example if
the dns server configuration is different for your vpn you would create
a file /etc/netns/myvpn/resolv.conf.

File descriptors that can be used to manipulate a network namespace can
be created by opening /var/run/netns/<NAME>.

This adds the following commands to iproute.
ip netns add NAME
ip netns delete NAME
ip netns monitor
ip netns list
ip netns exec NAME cmd ....
ip link set DEV netns NAME

ip netns exec exists to cater the vast majority of programs that only
know how to operate in a single network namespace.  ip netns exec
changes the default network namespace, creates a new mount namespace,
remounts /sys and bind mounts netns specific configuration files to
their standard locations.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
12 years agoFix test for EOF on continuation line
Stephen Hemminger [Mon, 11 Jul 2011 17:38:10 +0000 (10:38 -0700)]
Fix test for EOF on continuation line

getline() returns -1 on EOF, need to not loose that by forcing
result to size_t (unsigned).

Reported-by: Petr Sabata
12 years agoUpdate kernel headers to 3.0
Stephen Hemminger [Mon, 11 Jul 2011 17:31:07 +0000 (10:31 -0700)]
Update kernel headers to 3.0

12 years agoUpdate .gitignore
Stephen Hemminger [Mon, 11 Jul 2011 17:29:12 +0000 (10:29 -0700)]
Update .gitignore