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

12 years agoiproute2: Fix building xt module against xtables version 6
Andreas Henriksson [Mon, 4 Jul 2011 05:17:42 +0000 (05:17 +0000)]
iproute2: Fix building xt module against xtables version 6

iptables/xtables apparently changed API again.... Now you need to pass
and extra parameter (orig_opts) which was not needed before.

Sprinkle some lovely pre-processor magic to be compatible with both older
and new versions. In the beginning of times XTABLES_VERSION_CODE didn't
exist. Then it was (0x10000 * major + 0x100 * minor + patch) when it was
first introduced (according to git), but now it's at 6...
Don't know what official iptables releases has defined it to over time.
Lets just hope none of the older versions with is has the define
higher then 6 is still around.... so only the "current" versioning
scheme is supported.... lets see how long this lasts now.

For the API change in xtables, see:
http://git.netfilter.org/cgi-bin/gitweb.cgi?p=iptables.git;a=commitdiff;h=600f38db82548a683775fd89b6e136673e924097

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
12 years agoiproute2: Remove unreachable code
Petr Sabata [Fri, 10 Jun 2011 03:19:07 +0000 (03:19 +0000)]
iproute2: Remove unreachable code

This patch removes unreachable, useless code.

Signed-off-by: Petr Sabata <contyk@redhat.com>
12 years agoxfrm: Update documentation
David Ward [Sat, 11 Jun 2011 16:13:30 +0000 (16:13 +0000)]
xfrm: Update documentation

The ip(8) man page and the "ip xfrm [ XFRM-OBJECT ] help" command output
are updated to include missing options, fix errors, and improve grammar.
There are no functional changes made.

The documentation for the ip command has many different meanings for the
same formatting symbols (which really needs to be fixed). This patch makes
consistent use of brackets [ ] to indicate optional parameters, pipes | to
mean "OR", braces { } to group things together, and dashes - instead of
underscores _ inside of parameter names. The parameters are listed in the
order in which they are parsed in the source code.

There are several parameters and options that are still not mentioned or
need to be described more thoroughly in the "COMMAND SYNTAX" section of
the ip(8) man page. I would appreciate help from the developers with this.

Signed-off-by: David Ward <david.ward@ll.mit.edu>
12 years agoiproute2: fix minor typo in comments
Gilles Espinasse [Sun, 10 Jul 2011 05:45:37 +0000 (05:45 +0000)]
iproute2: fix minor typo in comments

Signed-off-by: Gilles Espinasse <g.esp@free.fr>
12 years agov2.6.39
Stephen Hemminger [Wed, 29 Jun 2011 23:01:48 +0000 (16:01 -0700)]
v2.6.39

12 years agoxt match: fix set-never-used warning
Stephen Hemminger [Wed, 29 Jun 2011 22:59:41 +0000 (15:59 -0700)]
xt match: fix set-never-used warning

12 years agoskbedit: fix set-never-used warning
Stephen Hemminger [Wed, 29 Jun 2011 22:59:02 +0000 (15:59 -0700)]
skbedit: fix set-never-used warning

12 years agoss: check result of readlink
Stephen Hemminger [Wed, 29 Jun 2011 22:58:37 +0000 (15:58 -0700)]
ss: check result of readlink

Don't ignore readlink failure.

12 years agoFix set-never-used warning in ifstat
Stephen Hemminger [Wed, 29 Jun 2011 22:58:12 +0000 (15:58 -0700)]
Fix set-never-used warning in ifstat

12 years agolibnetlink: fix set never used warning
Stephen Hemminger [Mon, 20 Jun 2011 21:34:46 +0000 (14:34 -0700)]
libnetlink: fix set never used warning

12 years agotc: fix set never used warning in red
Stephen Hemminger [Mon, 20 Jun 2011 21:34:30 +0000 (14:34 -0700)]
tc: fix set never used warning in red

12 years agoip: iproute fix set never used warning
Stephen Hemminger [Mon, 20 Jun 2011 21:34:11 +0000 (14:34 -0700)]
ip: iproute fix set never used warning

12 years agoip: addrlabel fix set never used warning
Stephen Hemminger [Mon, 20 Jun 2011 21:33:55 +0000 (14:33 -0700)]
ip: addrlabel fix set never used warning

12 years agoss: fix autobound filter
Eric Dumazet [Mon, 20 Jun 2011 21:31:51 +0000 (14:31 -0700)]
ss: fix autobound filter

Fixes following error. We currently provide garbage data to kernel, that
can abort the validation process or produce unexpected results.

$ ss -a autobound
State      Recv-Q Send-Q      Local Address:Port          Peer Address:Port
TCPDIAG answers: Invalid argument

After patch:

$ misc/ss -a autobound
State      Recv-Q Send-Q      Local Address:Port          Peer Address:Port
LISTEN     0      128                     *:44624                    *:*
ESTAB      0      0            192.168.1.21:47141        74.125.79.109:imaps

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
12 years agotc filter: fix dport/sport in pretty print output
Stephen Hemminger [Thu, 19 May 2011 16:19:17 +0000 (09:19 -0700)]
tc filter: fix dport/sport in pretty print output

Problem reported by Peter Lebbing on Debian.
The decode of source and destination port filters in pretty print
mode was backwards.

12 years agoip: Support IFLA_TXQLEN in ip link command
Eric Dumazet [Thu, 22 Oct 2009 18:13:21 +0000 (18:13 +0000)]
ip: Support IFLA_TXQLEN in ip link command

Eric Dumazet a écrit :
> We currently use an expensive ioctl() to get device txqueuelen, while
> rtnetlink gave it to us for free. This patch speeds up ip link operation
> when many devices are registered.
>

Here is a 2nd version od this patch, not displaying "qlen 0" useless info

[PATCH iproute2] ip: Support IFLA_TXQLEN in ip link show command

We currently use an expensive ioctl() to get device txqueuelen, while
rtnetlink gave it to us for free. This patch speeds up ip link operation
when many devices are registered.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
13 years agoiproute2: improve mqprio inputs for queue offsets and counts
John Fastabend [Tue, 26 Apr 2011 19:44:42 +0000 (12:44 -0700)]
iproute2: improve mqprio inputs for queue offsets and counts

This changes mqprio input format to be more user friendly.

Old usage,

 # ./tc/tc qdisc add dev eth3 root mqprio help
Usage: ... mqprio [num_tc NUMBER] [map P0 P1...]
                  [offset txq0 txq1 ...] [count cnt0 cnt1 ...] [hw 1|0]

New usage,

 # ./tc/tc qdisc add dev eth3 root mqprio help
Usage: ... mqprio [num_tc NUMBER] [map P0 P1 ...]
                  [queues count1@offset1 count2@offset2 ...] [hw 1|0]

Suggested-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
13 years agoMerge branch 'for-2.6.39' of /home/shemminger/iproute2-net-next
Stephen Hemminger [Tue, 12 Apr 2011 21:42:20 +0000 (14:42 -0700)]
Merge branch 'for-2.6.39' of /home/shemminger/iproute2-net-next

Conflicts:
include/linux/xfrm.h
ip/iplink.c

13 years agoUse INIT_NETDEV_GROUP
Stephen Hemminger [Tue, 12 Apr 2011 21:40:14 +0000 (14:40 -0700)]
Use INIT_NETDEV_GROUP

Now that headers are sanitized, use the define.

13 years agoiproute2: parse flag XFRM_POLICY_ICMP
Ulrich Weber [Thu, 7 Apr 2011 07:37:05 +0000 (09:37 +0200)]
iproute2: parse flag XFRM_POLICY_ICMP

parse flag XFRM_POLICY_ICMP

Signed-off-by: Ulrich Weber <uweber@astaro.com>
13 years agoUpdate README information
Stephen Hemminger [Wed, 23 Mar 2011 19:29:17 +0000 (12:29 -0700)]
Update README information

Change url's and describe current kernel header values.

13 years agoiproute2: tc add mqprio qdisc support
John Fastabend [Tue, 12 Apr 2011 15:57:27 +0000 (08:57 -0700)]
iproute2: tc add mqprio qdisc support

Add mqprio qdisc support. Output matches the following,

qdisc mq 0: dev eth1 root
qdisc mq 0: dev eth2 root
qdisc mqprio 8001: dev eth3 root  tc 8 map 0 1 2 3 4 5 6 7 1 1 1 1 1 1 1 1
             queues:(0:7) (8:15) (16:23) (24:31) (32:39) (40:47) (48:55) (56:63)

And usage is,

Usage: ... mclass [num_tc NUMBER] [map P0 P1...]
                  [offset txq0 txq1 ...] [count cnt0 cnt1 ...] [hw 1|0]

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
13 years agodoc: add pdf targets
Brandon Philips [Fri, 25 Mar 2011 21:43:44 +0000 (14:43 -0700)]
doc: add pdf targets

Hello Stephen-

Here is one more patch that SUSE has been carrying.

Cheers, Brandon

13 years agotc : SFB flow scheduler
Juliusz Chroboczek [Thu, 24 Mar 2011 17:44:09 +0000 (18:44 +0100)]
tc : SFB flow scheduler

Supports SFB qdisc (included in linux-2.6.39)

1) Setup phase : accept non default parameters

2) dump information

qdisc sfb 11: parent 1:11 limit 1 max 25 target 20
  increment 0.00050 decrement 0.00005 penalty rate 10 burst 20 (600000ms 60000ms)
 Sent 47991616 bytes 521648 pkt (dropped 549245, overlimits 549245 requeues 0)
 rate 7193Kbit 9774pps backlog 0b 0p requeues 0
  earlydrop 0 penaltydrop 0 bucketdrop 0 queuedrop 549245 childdrop 0 marked 0
  maxqlen 0 maxprob 0.00000 avgprob 0.00000

Signed-off-by: Juliusz Chroboczek <Juliusz.Chroboczek@pps.jussieu.fr>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
13 years agoAdd README.devel
Stephen Hemminger [Wed, 23 Mar 2011 19:34:21 +0000 (12:34 -0700)]
Add README.devel

13 years agoUpdate email address of netem
Stephen Hemminger [Wed, 23 Mar 2011 19:29:06 +0000 (12:29 -0700)]
Update email address of netem

13 years agoip: fix memory leak in ipmaddr.c
Brandon Philips [Wed, 23 Mar 2011 19:03:49 +0000 (12:03 -0700)]
ip: fix memory leak in ipmaddr.c

If the continue is taken, then there is a memory leak.

https://bugzilla.novell.com/show_bug.cgi?id=538996

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Brandon Philips <bphilips@suse.de>
13 years agoFix warning in u32 from assignment in conditional
Stephen Hemminger [Wed, 9 Mar 2011 18:42:35 +0000 (10:42 -0800)]
Fix warning in u32 from assignment in conditional

13 years agoFix snprintf with non format
Stephen Hemminger [Wed, 9 Mar 2011 18:41:44 +0000 (10:41 -0800)]
Fix snprintf with non format

snprintf was being called with environment variable.
If variable had format string (like %s) then program would crash.

13 years agoAdd checks for fgets() when reading proc
Stephen Hemminger [Wed, 9 Mar 2011 18:41:09 +0000 (10:41 -0800)]
Add checks for fgets() when reading proc

If expected proc headers are missing, catch and print error.

13 years agoAdd no-strict-aliasing to genl
Stephen Hemminger [Wed, 9 Mar 2011 18:39:17 +0000 (10:39 -0800)]
Add no-strict-aliasing to genl

The genl code uses constructs which violate the strict aliasing
constraints of gcc 4.4. Disable the optimization to avoid warnings
and potential breakage.

13 years agoupdate to 2.6.39-rc3 headers
Stephen Hemminger [Tue, 12 Apr 2011 21:20:01 +0000 (14:20 -0700)]
update to 2.6.39-rc3 headers

13 years agoiproute2: support listing devices by group
Vlad Dogaru [Wed, 2 Feb 2011 18:23:40 +0000 (20:23 +0200)]
iproute2: support listing devices by group

User can specify device group to list by using the group keyword:

ip link show group test

If no group is specified, 0 (default) is implied.

Signed-off-by: Vlad Dogaru <ddvlad@rosedu.org>
13 years agov2.6.38.1
Stephen Hemminger [Thu, 17 Mar 2011 17:05:47 +0000 (10:05 -0700)]
v2.6.38.1

13 years agoiproute2: allow to specify truncation bits on auth algo
Nicolas Dichtel [Tue, 11 Jan 2011 06:32:46 +0000 (06:32 +0000)]
iproute2: allow to specify truncation bits on auth algo

Hi,

here is a patch against iproute2 to allow user to set a state with a specific
auth length.

Example:
$ ip xfrm state add src 10.16.0.72 dst 10.16.0.121 proto ah spi 0x10000000
auth-trunc "sha256" "azertyuiopqsdfghjklmwxcvbn123456" 96 mode tunnel
$ ip xfrm state
src 10.16.0.72 dst 10.16.0.121
         proto ah spi 0x10000000 reqid 0 mode tunnel
         replay-window 0
         auth-trunc hmac(sha256)
0x617a6572747975696f707173646667686a6b6c6d77786376626e313233343536 96
         sel src 0.0.0.0/0 dst 0.0.0.0/0

Regards,
Nicolas

>From 522ed7348cdf3b6f501af2a5a5d989de1696565a Mon Sep 17 00:00:00 2001
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date: Thu, 23 Dec 2010 06:48:12 -0500
Subject: [PATCH] iproute2: allow to specify truncation bits on auth algo

Attribute XFRMA_ALG_AUTH_TRUNC can be used to specify
truncation bits, so we add a new algo type: auth-trunc.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
13 years agoiproute2: fix man page whitespace
Vlad Dogaru [Wed, 26 Jan 2011 07:35:27 +0000 (07:35 +0000)]
iproute2: fix man page whitespace

Signed-off-by: Vlad Dogaru <ddvlad@rosedu.org>
13 years agoiproute: rename 'get_jiffies' since it uses msecs
Gerrit Renker [Fri, 25 Feb 2011 20:54:37 +0000 (12:54 -0800)]
iproute: rename 'get_jiffies' since it uses msecs

The get_jiffies() function retrieves rtt-type values in units of
milliseconds. This patch updates the function name accordingly,
following the pattern given by dst_metric() <=> dst_metric_rtt().

13 years agoiproute: fix unit conversion of rtt/rttvar/rto_min
Gerrit Renker [Fri, 25 Feb 2011 20:51:48 +0000 (12:51 -0800)]
iproute: fix unit conversion of rtt/rttvar/rto_min

Since July 2008 (2.6.27, c1e20f7c8b9), the kernel stores the values for
RTAX_{RTT{,VAR},RTO_MIN} in milliseconds. When using a kernel > 2.6.27 with
the current iproute2, conversion of these values is broken in either way.

This patch
 * updates the code to pass and retrieve milliseconds;
 * since values < 1msec would be rounded up, also drops the usec/nsec variants;
 * since there is no way to query kernel HZ, also drops the jiffies variant.

Arguments such as
rtt 3.23sec
rto_min 0xff
rto_min 0.200s
rttvar 25ms
now all work as expected when reading back previously set values.

13 years agoutils: get_jiffies always uses base=0
Gerrit Renker [Tue, 21 Dec 2010 11:54:09 +0000 (12:54 +0100)]
utils: get_jiffies always uses base=0

get_jiffies() is in all places called in the same manner, with base=0;
simplify argument list by putting the constant value into the function.