debian/0000755000000000000000000000000013211277746007200 5ustar debian/changelog0000644000000000000000000011746613211277746011071 0ustar iproute2 (3.12.0-2ubuntu1.2) trusty; urgency=medium * Fix ip maddr show (LP: #1732032): - d/p/1003-ip-maddr-fix-igmp-parsing.patch: fix igmp parsing when iface is long - d/p/1004-ip-maddr-avoid-uninitialized-data.patch: avoid accessing uninitialized data - d/p/1005-ip-maddr-fix-filtering-by-device.patch: fix filtering by device -- Andreas Hasenack Wed, 29 Nov 2017 17:15:25 -0200 iproute2 (3.12.0-2ubuntu1.1) trusty; urgency=medium * debian/patches/99-increase-receive-buffer-size.patch: Fix "Message truncated" issue with many VF's. Thanks to Phil Sutter . Closes LP: #1720126. -- Monique van den Berg Mon, 16 Oct 2017 09:26:42 +0200 iproute2 (3.12.0-2ubuntu1) trusty; urgency=low * Add Ubuntu FAN support V3. (LP: #1470091) -- Andy Whitcroft Mon, 29 Jun 2015 17:05:40 +0100 iproute2 (3.12.0-2) unstable; urgency=medium * Add build-dependency on texlive-fonts-recommended (Closes: #738397) -- Andreas Henriksson Wed, 12 Feb 2014 22:18:40 +0100 iproute2 (3.12.0-1) unstable; urgency=low * Improve removal comment in transitional packages descriptions (Closes: #708823) * Imported Upstream version 3.12.0 (aka snapshot 20131122) - ss now avoids negative numbers in malloc, partially fixes #511720 - gretap now listed in help output and manpage (Closes: #582675) -- Andreas Henriksson Tue, 26 Nov 2013 00:43:35 +0100 iproute2 (3.11.0-1) unstable; urgency=low * Imported Upstream version 3.11.0 (aka snapshot 20130903) -- Andreas Henriksson Wed, 04 Sep 2013 21:21:03 +0200 iproute2 (3.10.0-1) unstable; urgency=low * Imported Upstream version 3.10.0 (aka. snapshot 20130716) * Let "gbp-pq rebase && gbp-pq export" drop upstreamed patches - 0003-iproute2-fix-build-failure-on-sparc-due-to-Wformat-a.patch - 0004-iproute2-patch-against-GCC-4.8.0.patch - 0005-ip-fix-build-failure-if-time_t-is-not-long-int.patch -- Andreas Henriksson Wed, 24 Jul 2013 12:23:53 +0200 iproute2 (3.9.0-5) unstable; urgency=low * Cherry-pick patch from upstream to fix build on x32. Thanks to Adam Borowski (Closes: #714172) -- Andreas Henriksson Wed, 26 Jun 2013 21:04:16 +0200 iproute2 (3.9.0-4) unstable; urgency=low * Cherry-pick upstream patch to build with gcc 4.8.0 (Closes: #713998) -- Andreas Henriksson Mon, 24 Jun 2013 19:54:41 +0200 iproute2 (3.9.0-3) unstable; urgency=low * Cherry-pick sparc build failure fix from upstream (Closes: #711540) - 0003-iproute2-fix-build-failure-on-sparc-due-to-Wformat-a.patch: -- Andreas Henriksson Mon, 10 Jun 2013 11:59:42 +0200 iproute2 (3.9.0-2) unstable; urgency=low * Give up and just use an epoch for the transitional packages * Add misc:Depends to transitional packages to please lintian -- Andreas Henriksson Wed, 08 May 2013 14:27:12 +0200 iproute2 (3.9.0-1) experimental; urgency=low * debian/copyright: List additional copyright holders * debian/copyright: say GPLv2 (only) as not all files are "or later". * Imported Upstream version 3.9.0 * Please lintian with dummy copyright lines for transitional packages * Bump standards-version to 3.9.4 -- Andreas Henriksson Fri, 03 May 2013 15:32:09 +0200 iproute2 (3.8.0-2) experimental; urgency=low * Add dummy copyright and changelog for iproute and iproute-doc - bump iproute and iproute-doc packag version to 20130000-2 and make their only content static to hopefully allow us to reupload new versions of the package with the transitional packages still on the same old version, to avoid having to bump it each time. -- Andreas Henriksson Thu, 21 Feb 2013 21:09:28 +0100 iproute2 (3.8.0-1) experimental; urgency=low * Imported Upstream version 3.8.0 - ip: handle flush with table > 2^31 (Closes: #700434) * Refresh patches to apply without fuzz and offset -- Andreas Henriksson Thu, 21 Feb 2013 20:16:18 +0100 iproute2 (3.7.0-1) experimental; urgency=low * Add additional meta-info to previous changelog entries * Rename the package and adopt new versioning scheme! (Closes: #693575) - iproute renamed to iproute2 to properly match upstream name. - iproute-doc renamed to iproute2-doc - iproute-dev dropped. It only shipped libnetlink static library which is actively discuraged. See libmnl instead. - add transitional packages iproute and iproute-doc. * Add debian/watch file to track upstream releases * Make iproute2 and iproute2-doc conflict and replace older equivalents -- Andreas Henriksson Mon, 18 Feb 2013 19:04:12 +0100 iproute (20121211-2) experimental; urgency=low [ Kamal Mostafa ] * Enable cross-compile support in debian/rules (Closes: #670660) -- Andreas Henriksson Wed, 12 Dec 2012 12:29:03 +0100 iproute (20121211-1) experimental; urgency=low * Imported Upstream version 3.7.0 (aka. snapshot 20121211) - this version has the fix for cross-compile - fixes it's vs its in manpages (Closes: #693043) * Revert "List interfaces without net address by default" - patch from upstream now part of latest release. -- Andreas Henriksson Wed, 12 Dec 2012 11:59:52 +0100 iproute (20121001-2) experimental; urgency=low * Generate recommends for optional module dependencies This makes the optional module dependency on libxtables more visible, to hopefully get iproute rebuilt whenever libxtables bumps soname. Thanks to iptables maintainer for splitting libxtables9 into a separate package in version 1.4.16.3-2. * 0001-iproute2-List-interfaces-without-net-address-by-defa.patch: List interfaces without net address by default. This fixes regression in iproute2-3.5.1 when `ip addr show' skipped interfaces without network layer address. Patch from upstream (git 7f747fd9377b8538ad). -- Andreas Henriksson Fri, 09 Nov 2012 15:49:24 +0100 iproute (20121001-1) experimental; urgency=low * Imported Upstream version 3.6.0 (aka snapshot 20121001) -- Andreas Henriksson Tue, 02 Oct 2012 23:49:00 +0200 iproute (20120813-1) experimental; urgency=low * Add references to fixed bugs in changelog entry for 20120801-1 * Fix download url in debian/copyright * Imported Upstream version 20120813 -- Andreas Henriksson Tue, 14 Aug 2012 17:11:20 +0200 iproute (20120801-1) experimental; urgency=low * Imported Upstream version 20120801 aka v3.5.0 - includes new tc codel support (Closes: #675942) - support both del and delete in all cases (Closes: #673355) - manpage fixes from Bjarni Ingi Gislason (Closes: #674704, #674706) * debian/iproute.install: Install new bridge tool to /sbin -- Andreas Henriksson Thu, 02 Aug 2012 02:03:07 +0200 iproute (20120521-3) unstable; urgency=low [ Helmut Grohne ] * Mark iproute as Multi-Arch: foreign. (Closes: #676175) -- Andreas Henriksson Thu, 21 Jun 2012 12:33:31 +0200 iproute (20120521-2) unstable; urgency=low * Revert "Apply hardening build flags" - hardening simply breaks iproute2 in too many ways. (Closes: #674730, #674847) (Reopens: #672828) -- Andreas Henriksson Mon, 28 May 2012 12:31:29 +0200 iproute (20120521-1) unstable; urgency=low * Imported Upstream version 3.4 (aka snapshot 20120521) - trivial fix of ip link syntax in manpage (Closes: #673171) * Apply hardening build flags (Closes: #672828) * debian/iproute.manpages: fix path to manpages. -- Andreas Henriksson Tue, 22 May 2012 14:21:27 +0200 iproute (20120319-1) unstable; urgency=low * Build-depend on pkg-config (Closes: #657062) * Imported Upstream version 3.3.0 (aka snapshot 20120319) This release includes, among other things, the following bug fixes: - C++ compatible netlink headers (Closes: #658903) - ip link sorted before l2tp (Closes: #656585) - Improved tuntap documentation (Closes: #629630) - Router advertisement decoding fix (Closes: #634170) - tc iec rates decoding fix (Closes: #662979) - Drop ip route monitor from help syntax and manpage (Closes: #537681) * Revert "Add patch to avoid the need for libnl-dev build dependency" - now included upstream. -- Andreas Henriksson Tue, 20 Mar 2012 16:51:52 +0100 iproute (20120105-1) unstable; urgency=low * Imported Upstream version 3.2 (aka snapshot 20120105) * better manual pages * L2TPv3 support * improved RED options * netem additions for loss models * iptables integration fixes * Don't install (outdated) RELNOTES, dropped upstream. * Refresh debian patches * Bump standards version * debian/patches/ipl2tp-avoid-libnl.diff: Add patch to avoid the need for libnl-dev build dependency -- Andreas Henriksson Tue, 10 Jan 2012 12:59:15 +0100 iproute (20111117-1) unstable; urgency=low * Imported Upstream version 3.1.0 (aka snapshot 20111117) * Update download location in debian/copyright - tarballs now available from kernel.org * Drop debian/patches/xt-v6.diff, fixed upstream. * Refresh patches: debian/patches/moo.diff and txtdocs.diff -- Andreas Henriksson Wed, 23 Nov 2011 22:15:38 +0100 iproute (20110629-1) unstable; urgency=low [ Alexander Wirt ] * Install ss to /bin instead of /sbin. [ Andreas Henriksson ] * Imported Upstream version 2.6.39 (aka snapshot 20110629) - tc filter: fix dport/sport in pretty print output (Closes: #627312) * Finally drop the patch adding the wrr qdisc scheduler to tc * Fix txtdocs patch to apply again * Add patch to build against xtables version 6 -- Andreas Henriksson Mon, 04 Jul 2011 17:29:04 +0200 iproute (20110315-1) unstable; urgency=low * Imported Upstream version 2.6.38 (snapshot 20110315) -- Andreas Henriksson Thu, 07 Apr 2011 13:26:51 +0200 iproute (20110107-2) unstable; urgency=low * Upload to unstable. -- Andreas Henriksson Mon, 07 Feb 2011 11:10:01 +0100 iproute (20110107-1) experimental; urgency=low * Imported Upstream version 2.6.35 (snapshot 20100804) Changes since last release (2.6.34): Andreas Henriksson (1): tc: make symbols loaded from tc action modules global. Arnd Hannemann (1): iproute2: Add dsfield as alias for tos for ip rules Ben Greear (1): iproute2: Fix batch-mode for mrules. Jan Engelhardt (1): Add IFLA_STATS64 support Mike Frysinger (3): tc: revert "echo" in install target dnet: fix strict aliasing warnings netem: fix installs of dist files Patrick McHardy (1): ip: add support for multicast rules Petr Lautrbach (1): iproute: fix tc generating ipv6 priority filter Stephen Hemminger (5): Update kernel derived headers Update ARP header type table Fix NULL pointer reference when using basic match Fix byte order of ether address match for u32 snapshot 100804 Steve Fink (1): ss -p is much too slow Ulrich Weber (3): iproute2: filter routing entries based on clone flag iproute2: use get_user_hz() for IPv6 print_route iproute2: use int instead of long for RTAX_HOPLIMIT compare * debian/source/format: use 3.0 (quilt) * debian/patches: convert from dpatch to quilt style * debian/patches/*.diff: refresh and use DEP-3 description * debian/rules: drop dpatch usage. * debian/control: drop dpatch build dependency. * debian/README.source: replace with /usr/share/doc/quilt/README.source - could have been dropped since we only use dpkg standard features... * Update .gitignore * debian/patches/fix-ip-route-get.diff: fix failing route matching. * debian/copyright: Update download location * packaging: automatically unapply patches after build * packaging: ignore if stamp-build and stamp-doc doesn't exist on clean * packaging: clean up generated txt docs when cleaning unpatched * packaging: bump debhelper compatibility and dependency to v8 * packaging: switch debian/rules to dh * debian/control: bump to policy 3.9.1 * remove manual symlinking of manpages * Imported Upstream version 2.6.37 (snapshot 20110107) Changes since last release (2.6.35): Andreas Schwab (1): iproute2: remove useless use of buffer Ben Greear (2): iproute2: Fix filtering related to flushing IP addresses. Allow 'ip addr flush' to loop more than 10 times Changli Gao (1): iproute2: tc: f_flow: add key rxhash Dan Smith (1): Add ip route save/restore Eric Dumazet (2): ip: add RTA_MARK support iproute2: add 64bit support to ifstat Gerrit Renker (1): tc-red: typo in man page Gregoire Baron (1): tc: add ACT_CSUM action support (csum) Mike Frysinger (1): m_xt: stop using xtables_set_revision() Octavian Purdila (1): iproute2: initialize the ll_map only once Petr Sabata (3): ss(8) improvements by Jiri Popelka ss: Change "do now" to "do not" in ss(8), -n option ip: Few typo and grammar errors fixes for ip(8) manpage Sridhar Samudrala (1): Support 'mode' parameter when creating macvtap device Stephen Hemminger (11): Snapshot for 2.6.35.1 Update kernel headers to 2.6.36-rc2 Use correct rt_link_statistics Fix GRED options clearing Update to 2.6.36 headers Workaround for repeated distclean Use standard routines for interface name to index etc Increase size of ifindex hash heads Cleanup ll_map Update to 2.6.37-rc8 headers v2.6.37 Timo Teräs (2): iproute2: treat gre key as number iproute2: support xfrm upper protocol gre key Ulrich Weber (2): iproute2: dont filter cached routes on iproute_get iproute2: display xfrm socket policy direction * Revert "debian/patches/fix-ip-route-get.diff" - fixed upstream. -- Andreas Henriksson Wed, 12 Jan 2011 10:56:53 +0100 iproute (20100519-3) unstable; urgency=low [ Alexander Wirt ] * Add README.source [ Andreas Henriksson ] * tc: make symbols loaded from tc action modules global. (Closes: #584898) -- Andreas Henriksson Tue, 06 Jul 2010 12:02:39 +0200 iproute (20100519-2) unstable; urgency=low * Describe upstream changes between v2.6.33..v2.6.34 in debian changelog. (Closes: #582667) -- Andreas Henriksson Mon, 24 May 2010 11:22:20 +0200 iproute (20100519-1) unstable; urgency=low * New upstream release. + Detect 6rd kernel missing support / 6rd tunnel scope + iproute2: detect iptables modules dir in configure. + iproute2: add option to build m_xt as a tc module (v3) + fix build issues with flex ver 2.5 + ip: document initcwnd + iproute2: rework SR-IOV VF support + Add 'ip tuntap' support. + iproute2: fix addrlabel interface names handling + tc: add new queue discipline: head drop fifo + xfrm: policy by mark + xfrm: Introduce xfrm by mark + xfrm: add support for SA by mark + ip: correctly report tunnel link type + Continue after errors in -batch + Update headers for 2.6.33-net-next + Fix line numbering on batch commands + Workaround missing ALIGN() macro + Remove mirred debug message + Workaround missing ALIGN() macro. + Update ip.8 man page to describe route table id values + Update kernel headers to 2.6.34 final version + Add documentation for ip link add/delete sub-commands + ip: add documentation for initrwnd + v2.6.34 + Update man page to indicate current options + ip: Add support for setting and showing SR-IOV virtual funtion link params + libnetlink: Modify the parser to track first duplicated attributes + iproute2: netlink support for bus-error reporting and counters + gaiconf: /etc/gai.conf configuration helper. + skbedit: use get_u32 for parsing mark + Add initrwnd to iproute2 * drop debian/patches/disable-ifstat.dpatch: - ifstat is not installed anyway, no need for this patch. -- Andreas Henriksson Thu, 20 May 2010 10:19:14 +0200 iproute (20100224-5) unstable; urgency=low * Add patch (applied upstream): build m_xt as a tc module * Install /usr/lib/tc/m_ipt.so symlink (to m_xt.so) * Exclude m_ipt.so / m_xt.so from dh_shlibdeps * Add note about tc filter action ipt needs iptables installed to README.Debian. (the above changes closes: #576953) -- Andreas Henriksson Sun, 18 Apr 2010 18:51:12 +0200 iproute (20100224-4) unstable; urgency=low [ Andreas Henriksson ] * Use multi-line build-depends. * Add iptables-dev build dependency - needed to detect which tc ipt/xt module to build. - also makes autodetecting IPT_LIB_DIR possible.... * Revert "explicitly set IPT_LIB_DIR=/lib/xtables when building." * Add patch by Alexandre Cassen (Closes: #575970) [ Alexandre Cassen ] * Detect 6rd kernel missing support / 6rd tunnel scope -- Andreas Henriksson Wed, 07 Apr 2010 21:36:57 +0200 iproute (20100224-3) unstable; urgency=low * The "Brown paper bag" release, sorry. * explicitly set IPT_LIB_DIR=/lib/xtables when building. - the configure script auto-detection won't work in clean build environments since we don't have a build-depedency on iptables! * Fix tc/Makefile to include the "" in the IPT_LIB_DIR define. -- Andreas Henriksson Thu, 11 Mar 2010 21:18:27 +0100 iproute (20100224-2) unstable; urgency=low * Drop debian/patches/tc_modules.dpatch - /lib/iptables isn't correct anymore. * Try to automatically detect correct iptables modules directory in configure script. * Bump Standards-Version and add ${misc:Depends} -- Andreas Henriksson Thu, 11 Mar 2010 20:35:56 +0100 iproute (20100224-1) unstable; urgency=low * New upstream release v2.6.33 - Really dropped equalize command since kernel never supported it. (Closes: #149897) -- Andreas Henriksson Thu, 25 Feb 2010 12:36:02 +0100 iproute (20091226-1) unstable; urgency=low * New upstream release v2.6.31 - dropped equalize command since kernel never supported it. (Closes: #149897) - avoid segfault on incorrect lladdr. (Closes: #526329) - fix manpage typo. (Closes: #539830) - support xtables >= 1.4.5 api. (Closes: #532727, #559022) - ss help to stdout (Closes: #545008) - add -fPIC to lib/Makefile (Closes: #547602) - fix parsing of interfaces for mroute. (Closes: #550097) - don't fail flush with secondary addresses. (Closes: #532152) * hoplimit.dpatch: dropped in favor of other/improved version merged upstream. * Update lynx build-dependency to include lynx-cur * Add patch to avoid using bashisms in configure script. -- Andreas Henriksson Fri, 01 Jan 2010 22:48:45 +0100 iproute (20090324-1) unstable; urgency=low * New upstream release v2.6.29-1 (includes "Fix headers needed for gre") - fixed to link against xtables rather then ipt. (Closes: #510924) * Make sure clean drops any potential left-over files from WRR qdisc patch. * Bump standards version to policy 3.8.1, no changes needed. -- Andreas Henriksson Thu, 26 Mar 2009 12:36:10 +0100 iproute (20090115-1) unstable; urgency=low [ Andreas Henriksson ] * debian/rules: Make stamp-doc target depend on patch target. - package fails to build binary-indep because of missing txt target in doc/Makefile if invoked manually. Reported by Dean Gaudet. * New upstream release v2.6.27 (aka 081027, tagged but no tarballs). - old ipv4 abbrevation compatibility restored. (Closes: #497011) - make it possible to use tunnel names matching "help", if specified with explicit "name" parameter before name. (Closes: #497278) - add new ip link parameters in usage text when running on a kernel that supports them. (Closes: #504064) - only print "Nothing to flush" when told to show stats. (Closes: #492196) * New upstream release v2.6.28 (aka 090115). -- Andreas Henriksson Wed, 20 Aug 2008 23:01:17 +0200 iproute (20080725-2) unstable; urgency=low [ Andreas Henriksson ] * Oops, only set Priority: important on the binary iproute package, the -dev and -doc packages should still be optional. -- Andreas Henriksson Sun, 27 Jul 2008 14:38:07 +0200 iproute (20080725-1) unstable; urgency=low [ Andreas Henriksson ] * New upstream release, v2.6.26 a.k.a. snapshot 080725. * Actually bump Priority in debian/control, which we claimed to do in 20071016-3. The real bumping is apparently done by the ftpmaster though. (See: #487533) * Fix syntax errors in ip(8) manpage. [ Alexander Wirt ] * bump standards version (no changes) -- Alexander Wirt Sun, 27 Jul 2008 14:02:50 +0200 iproute (20080417-1) unstable; urgency=low [ Andreas Henriksson ] * New upstream release, v2.6.25 a.k.a. snapshot 20080417. - Initial documentation for xfrm (Partially fixes #451337) - Fixes manpage error caught by lintian! * Fix typos (syntax error) in ip(8) manpage. - Introduced by upstream, caught by lintian yet again! * Don't ship useless headers in iproute-dev (Closes: #467557) * Cherry-pick "Fix bad hash calculation because of signed address" from upstream. (Closes: #480173) [ Justin B Rye ] * Update package description (Closes: #464521) [ Alexander Wirt ] * Fix typo in short package description. -- Alexander Wirt Sun, 11 May 2008 11:18:29 +0200 iproute (20080108-1) unstable; urgency=low [ Andreas Henriksson ] * New upstream release v2.6.24-080108 * Drop debian/patches merged upstream. fix_ss_typo.dpatch ip.8-typo ip_address libnetlink_typo.dpatch manpages-typo.dpatch tcb_htb_typo.dpatch tc_cbq_details_typo.dpatch ip_route_usage.dpatch remove_tc_filters_reference.dpatch * Drop some of the unused debian/patches. esfq-support.dpatch heap_corruptionfix tc_sample_fix * Split out direct source edit and put in debian/patches instead for: - disabling build of ifstat (disable-ifstat.dpatch) - building txt documentation (txtdocs.dpatch) - hoplimit option (hoplimit.dpatch) * Add patch to document the "promote secondaries" option. (#429689) * Update debian/rules for arch-indep (iproute-doc). (Closes: #459652) * Drop debian/man/rtmon.8 (use upstreams version instead). [ Alexander Wirt ] * Update maintainer address * Remove Andreas Barth from uploaders - aba: Thanks for your work! -- Alexander Wirt Sat, 19 Jan 2008 09:22:11 +0100 iproute (20071016-3) unstable; urgency=low [ Alexander Wirt ] * Prevent q_atm from being scanned by dh_shlibdeps * Bump priority to important (Closes: #414086) * Make iproute-doc architecture all [ Andreas Henriksson ] * Revert "fix dotted-quad support patch to work on big-endian", and cherry-pick official upstream fix. * Revert "TC action parsing bug fix" (Closes: #458539) * Add synonyms for ip rule options to ip(8) manpage, and drop ip_rule_usage.dpatch (Closes: #433507) * Add routel and routef man page. (Closes: #325290) -- Alexander Wirt Fri, 04 Jan 2008 23:04:36 +0100 iproute (20071016-2) unstable; urgency=low [ Andreas Henriksson ] * fix incompatibility with older kernels (Closes: #457161) (Cherry picked from upstream) -- Alexander Wirt Thu, 20 Dec 2007 23:05:25 +0100 iproute (20071016-1) unstable; urgency=low [ Andreas Henriksson ] * New upstream release (v2.6.23 aka snapshot 071016) (Closes: #445944) - time2tick overflow patch applied upstream (Closes: #175462) - tc ematch cmp/nbyte help patch applied upstream (Closes: #438653) - mpath support dropped upstream (Closes: #428440, #428442) - new manpages included upstream (Closes: #438994) - linux header files updated to v2.6.23 (Closes: #409047) * Drop patches which has been applied upstream or deprecated by upstream changes. - debian/patches/lartc applied upstream. - debian/patches/netbug_fix deprecated, upstream dropped netbug script. - debian/patches/empty_linkname.dpatch deprecated, fixed upstream. * Add .dpatch suffix to wrr-qdisc patch to make dpatch-edit-patch work. * Update patches to apply: - wrr-qdisc, moo, ip_route_usage * Don't install removed netbug script. * Fix corruption when using batch files with comments and broken lines. (cherry-picked from upstream. Closes: #398912) * Update build-dependencies: - libdb4.3-dev -> libdb-dev. (Closes: #442653) - linux-kernel-headers -> linux-libc-dev. * Drop debian/patches/ip_address_flush_loop.dpatch, instead we'll use Daniel Silverstones patch imported from Ubuntu. * Add Homepage and Vcs-{Browser,Git} fields to debian/control. * Remove dead/leftover code from tc/q_htb.c, include/linux/pkt_sched.h * Remove outdated README.Debian. * Drop our own (buggy) RTAX_INITCWND support, in favor of upstreams. * fix dotted-quad support patch to work on big-endian. (upstream applied a broken patch, which we cherry-picked for #357172) [ Ben Finney ] * Add dh_md5sums to generate md5sums control file (Closes: #439439) [ Justin Pryzby ] * ss(8) manpage formatting breaks EXAMPLE (Closes: #443071) [ Daniel Silverstone ] * Avoid infinite loop in ip addr flush. [ Alexander Wirt ] * Add Andreas Henriksson to uploaders * Bump standards version * Support dotted-quad netmasks in iproute (Closes: #357172) (Cherry picked from upstream) -- Alexander Wirt Sun, 16 Dec 2007 14:30:31 +0100 iproute (20070313-1) unstable; urgency=low * New upstream release * Make iproute-doc a suggest (Closes: #424967) * Add tc_cbq_details_typo.dpatch (Closes: #387083) * Add libnetlink_typo.dpatch (Closes: #396124) * Add tcb_htb_typo.dpatch (Closes: #396317) * Remove references to non-existing tc-filters manpage (Closes: #298715) * Fix bad phrased sentence in ss manpage (Closes: #401552) -- Alexander Wirt Sun, 10 Jun 2007 19:36:48 +0200 iproute (20061002-4) unstable; urgency=low * Add distribution tables (used by netem). (Closes: #408313) -- Alexander Wirt Wed, 24 Jan 2007 22:55:26 +0100 iproute (20061002-3) unstable; urgency=low * Added a patch from Nikolai Kondrashov that fixes unknown symbols in ip_common.h. (Closes: #397584) -- Alexander Wirt Thu, 14 Dec 2006 20:11:55 +0100 iproute (20061002-2) unstable; urgency=medium * Add manpage for ss, rtmon and lnstat (Thanks to Michael Prokop for that) * Fix metric output of iproute (backported from git) (http://bugs.archlinux.org/task/5669) * medium as this bug breaks other packages such as vpnc -- Alexander Wirt Thu, 19 Oct 2006 06:39:05 +0200 iproute (20061002-1) unstable; urgency=low * New upstream release - This fixes the xfrm monitor mode (Closes: #383133) * Fix typos in manpages (Closes: #387082, #387083) * Split docs in a seperate package -- Alexander Wirt Sun, 15 Oct 2006 16:40:34 +0200 iproute (20060323-1) unstable; urgency=low * New upstream release (Closes: #370699) * Removed reenable_short_matches, tc_sample_fix, f_u32 patches (included upstream) * Add manpage for pfifo (Closes: #359971) * Add moo object (Closes: #312843) * Add src option to ip_route usage (Closes: #226142) * Prevent users from renaming an interface to "" (Closes: #241904) * Added timout for ip a f (Closes: #386288) -- Alexander Wirt Fri, 8 Sep 2006 16:43:20 +0200 iproute (20051007-4) unstable; urgency=low * Moved *stat binaries to /usr/bin/ (Closes: #350703) * Fixed some manpage typos (Closes: #350671, #350672, #350673, #350674, #350675) * Conflicts with arpd * Fixes u32 bucket hashing calucation. (Closes: #351751) Thanks to Russel Stuart for the patch * Moved to libdb4.3 * Fixed ip help output (Closes: #354909) * Fixed hardcoded module paths for tc (Closes: #290315) -- Alexander Wirt Sun, 5 Feb 2006 09:47:36 +0100 iproute (20051007-3) unstable; urgency=low * New upstream release (Closes: #333643) * Added a patch for tc that add u32 get parsed correct Thanks Russell Stuart for the patch (Closes: #347699) * We now have a manpage for tc-bfifo (Closes: #319871) * "get" is no longer mentioned in tc's usage (Closes: #167314) * We now build arpd (Closes: #296200) * Include htb docs (Closes: #204629) * Added flex to build-deps (Closes: #340004, #339119) * Added symlinks for lnstat (Closes: #302589) * Acknowledge heap correction nmu (Closes: #326961) * Acknowledge douple free fix nmu (Closes: #338575) * Fixed allmulticast mention in ip manpage (Closes: #305338) * Add [ prio NUMBER ] to ip_rule.c (Closes: #213673) -- Alexander Wirt Sun, 5 Feb 2006 09:37:01 +0100 iproute (20051007-2) experimental; urgency=low * Added flex to build-deps -- Alexander Wirt Sun, 20 Nov 2005 10:46:39 +0100 iproute (20051007-1) experimental; urgency=low * The "lets break other peoples networking release" + New upstream release + New maintainer + Fix netbug script + Reenable short iproute commands -- Alexander Wirt Tue, 1 Nov 2005 10:22:05 +0100 iproute (20041019-4.1) unstable; urgency=low * Non-maintainer upload. * Fix size of table allocation (closes: #326961, #338575) -- Blars Blarson Sat, 14 Jan 2006 02:07:18 +0000 iproute (20041019-4) unstable; urgency=low * New maintainer, closes: #295122. * Included iproute2 homepage in debian/control and updated it in debian/copyright. * Updated FSF mail address in debian/copyright. * Set Standards-Version to 3.6.2 in debian/control. * Fixed "FTBFS: normal.c heap corrution due to table overflow", closes: #326961. Patch by LaMont Jones . * Fixed "Netbug script gives syntax error", closes: #313540. Patch by Allard Hoeve . * Fixed "Netbug creates uuencoded file with wrong suffix", closes: #313541. Patch by Allard Hoeve . * Fixed "Netbug warns about intended stripping of trailing '/'", closes: #313544. Patch by Allard Hoeve . -- Anibal Monsalve Salazar Fri, 11 Nov 2005 13:22:15 +1100 iproute (20041019-3) unstable; urgency=medium * fix insecure file creation in netbug. Closes: #289541 * remove bogus reference to tc-filters from tc's manpage. Closes: #289225 * add support for "hoplimit" and "initcwnd" route metrics. Closes: #221893 * ikey for GRE works. Closes: #200714 * include wrr qdisc. Closes: #198414 -- Andreas Barth Sun, 9 Jan 2005 11:51:09 +0000 iproute (20041019-2) unstable; urgency=low * build fails if subdir fails. Closes: #283797 * include q_netem.so. Closes: #283968 * fix typo in man page. Closes: #285507 * removed the 2. and 3. copy of the man pages. * start using dpatch. * add reference to Advanced Routing HOWTO. Closes: #150087 -- Andreas Barth Wed, 5 Jan 2005 21:20:44 +0000 iproute (20041019-1) unstable; urgency=low * New maintainer. * packaging changes: + using debhelper + add all manpages. Closes: #57829, #138432, #203797, #246521 + add documentation text and html doc, and adding lynx as build-dep. Closes: #121978, #57828 + include all tex-files in the doc. Closes: #107117 * get straight with the kernel. Closes: #186808 * add header files and libnetlink to new development package. Closes: #128162, #139309 * build-depend on libatm1-dev | atm-dev instead of atm-dev -- Andreas Barth Sun, 28 Nov 2004 01:07:30 +0000 iproute (20041019-0.2) unstable; urgency=low * NMU, uploading to unstable. -- Andreas Barth Mon, 22 Nov 2004 19:43:17 +0200 iproute (20041019-0.1) experimental; urgency=low * NMU, fixing only most urgent issues. * New upstream package, fixes: + compatibility with 2.6.7 and above. Closes: #262698 + no longer with netinet/in.h. Closes: #221877 -- Andreas Barth Mon, 8 Nov 2004 07:50:35 +0100 iproute (20010824-13.1) unstable; urgency=high * NMU for a security fix. * [CAN-2003-0856] Fix a local denial of service vulnerability via spoofed messages to the kernel's Netlink interface. (Closes: #242994) -- Joshua Kwan Sun, 16 May 2004 20:28:43 -0700 iproute (20010824-13) unstable; urgency=low * debian/rules: Run dpkg-shlibdeps with all the executables, to fix dependency problem (closes: Bug#224063) * Really removed references to obsolete include files (Bug#223165 was not fixed properly) -- Juan Cespedes Sun, 25 Jan 2004 23:04:20 +0100 iproute (20010824-12) unstable; urgency=low * Updated README.Debian and copyright file * Added two new manpages from http://lartc.org/manpages/: ip(8) and tc-cbq-details(8). * Removed references to obsolete include files which made compilation fail (closes: Bug#223165) -- Juan Cespedes Sun, 14 Dec 2003 00:40:10 +0100 iproute (20010824-11) unstable; urgency=low * Changed priority to "optional" * Fixed "tc -s qdisc" on sparc (patch by "Nicolas S. Dade" ) (closes: Bug#194128) -- Juan Cespedes Sun, 17 Aug 2003 00:22:47 +0200 iproute (20010824-10) unstable; urgency=low * Updated manual pages from http://www.lartc.org/manpages/ (closes: Bug#156353, Bug#175313, Bug#176989, Bug#189095) * New Standards-Version * Don't "rm -rf /etc/iproute2" on purge (closes: Bug#202862) * Include "iproute2" in the description (closes: Bug#182999) -- Juan Cespedes Sat, 16 Aug 2003 18:29:27 +0200 iproute (20010824-9) unstable; urgency=medium * Added patch for HTB v3.6 to be able to work with kernel 2.4.20 (from http://luxik.cdi.cz/~devik/qos/htb/v3/htb3.6-020525.tgz) (closes: Bug#147550, Bug#167149, Bug#167597, Bug#171277) -- Juan Cespedes Thu, 05 Dec 2002 13:44:10 +0100 iproute (20010824-8) unstable; urgency=medium * Added support for HTB queuing discipline (closes: Bug#133381) NOTE: you need a patched kernel in order to use it -- Juan Cespedes Tue, 2 Apr 2002 20:29:40 +0200 iproute (20010824-7) unstable; urgency=medium * Move `ip' binary to /bin to fix FHS violation (closes: Bug#134812) -- Juan Cespedes Mon, 4 Mar 2002 00:20:30 +0100 iproute (20010824-6) unstable; urgency=low * Added a couple of #ifdef's to be able to compile with older kernel headers (needed for arm) (closes: Bug#131695) -- Juan Cespedes Sat, 16 Feb 2002 19:27:15 +0100 iproute (20010824-5) unstable; urgency=low * Really fix Bug#121589 (dead gateway bug); apparently I forgot to include the patch in 20010824-2 -- Juan Cespedes Tue, 29 Jan 2002 23:22:24 +0100 iproute (20010824-4) unstable; urgency=low * Added support for DIFFSERV and ATM in tc -- Juan Cespedes Sun, 13 Jan 2002 03:01:47 +0100 iproute (20010824-3) unstable; urgency=low * Updated tc* man pages (thanks to bert hubert ) * Fixed spurious space in `tc -s qdisc' output (closes: Bug#128501) -- Juan Cespedes Thu, 10 Jan 2002 22:18:25 +0100 iproute (20010824-2) unstable; urgency=low * Fixed the following important and serious bugs: + iproute doesn't compile on Alpha (closes: Bug#118113, Bug#123224) + iproute doesn't compile on MIPS (closes: Bug#118424) + iproute doesn't compile on powerpc (closes: Bug#119601) * Added man pages for tc (closes: Bug#124230), tc-cbq, tc-red, tc-tbf, tc-prio and tc-sfq * Removed references to old programs from iproute(7) (closes: Bug#99536) * Fixed bug which presented first hop as dead in equal cost multipath (closes: Bug#121589) * Do not process .ps with through `psnup' (closes: Bug#119820) -- Juan Cespedes Tue, 8 Jan 2002 16:07:27 +0100 iproute (20010824-1) unstable; urgency=low * New upstream version * Make ingress qdisc work again with tc (closes: Bug#84444) * Make it compile properly with new include files (closes: Bug#113112) -- Juan Cespedes Sun, 28 Oct 2001 16:38:00 +0100 iproute (20001007-1) unstable; urgency=low * New upstream version (closes: Bug#63701) * Remove /etc/iproute2 on purge (closes: Bug#72743) * Fixed Lintian warnings (no-priority-field and no-section-field) -- Juan Cespedes Sat, 14 Oct 2000 19:27:12 +0200 iproute (991023-2) unstable; urgency=low * New Standards-Version (3.1.1) (closes: Bug#47923) * Modified description of package to show which kernel options are necessary to use the package (closes: Bug#47922) * Updated manual page to point at /usr/share/doc/iproute (closes: Bug#47924) -- Juan Cespedes Sun, 19 Dec 1999 04:00:21 +0100 iproute (991023-1) unstable; urgency=low * New upstream version (closes: Bug#48733) -- Juan Cespedes Tue, 2 Nov 1999 16:29:37 +0100 iproute (990824-1) unstable; urgency=low * New maintainer * New upstream version * New Standards-Version: 3.1.0 * Minor fix in "ip rule list": mask in "from" address was not shown correctly * Removed obsoleted documentation from "debian/" directory -- Juan Cespedes Sun, 24 Oct 1999 19:02:56 +0200 iproute (990630-1) unstable; urgency=low * New upstream version. * FHS and standards 3.0.1.0. -- Roberto Lumbreras Tue, 3 Aug 1999 02:49:28 +0200 iproute (990530-1) unstable; urgency=low * New upstream version. * Build with 2.2.10 kernel headers. * Install new scripts ip/routef ip/routel, but not ip/ifcfg ip/rtpr by now, I don't know who/what needs rtpr; ifcfg uses arping, and it isn't available in debian for now. -- Roberto Lumbreras Tue, 22 Jun 1999 02:28:53 +0200 iproute (990329-1) unstable; urgency=low * New upstream version. * Build with 2.2.5 kernel headers. -- Roberto Lumbreras Sun, 4 Apr 1999 18:50:39 +0200 iproute (980630-1) unstable; urgency=low * New upstream version. * Build with 2.1.112 kernel headers. * Rewrote the rules file. -- Roberto Lumbreras Wed, 29 Jul 1998 23:37:52 +0200 iproute (980119-1) unstable; urgency=low * Outdated documentation. Upstream docs are scarce. * Non-Maintainer release * This package has no correct copyright file! * Include all the README.* docs from the upstream site. * Modified to build under glibc * Build with 2.1.85 kernel headers. * produce a correct diff. * Reworked the rules file to utilize debmake fully * Newest upstream release * glibc compilation -- Christoph Lameter Wed, 4 Feb 1998 13:37:28 -0800 iproute (961225-2) unstable frozen; urgency=low * Added a man page for iproute. (Fixes #8080). * Removed out-of-date patches. * Added routing.txt from /usr/src/linux/Documentation/networking/routing.txt * Newer version of debmake. -- Tom Lees Mon, 17 Apr 1997 17:00:36 +0100 iproute (961225-1) unstable; urgency=low * Initial Release. -- Tom Lees Mon, 30 Dec 1996 11:12:23 +0000 Local variables: mode: debian-changelog End: debian/watch0000644000000000000000000000011613211277746010227 0ustar version=3 http://kernel.org/pub/linux/utils/net/iproute2/iproute2-(.+).tar.xz debian/patches/0000755000000000000000000000000013211277746010627 5ustar debian/patches/f_u320000644000000000000000000000336713211277746011501 0ustar #! /bin/sh -e ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Fixes the u32 calculation for 2.6 kernel - by Russell Stuart [ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts patch_opts="${patch_opts:--f --no-backup-if-mismatch}" if [ $# -ne 1 ]; then echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" exit 1 fi case "$1" in -patch) patch $patch_opts -p1 < $0;; -unpatch) patch $patch_opts -p1 -R < $0;; *) echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" exit 1;; esac exit 0 @DPATCH@ diff -Nur iproute-20051007.keep/tc/f_u32.c iproute-20051007/tc/f_u32.c --- iproute-20051007.keep/tc/f_u32.c 2006-01-12 17:34:37.000000000 +1000 +++ iproute-20051007/tc/f_u32.c 2006-02-07 17:10:29.000000000 +1000 @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -874,6 +875,7 @@ htid = (handle&0xFFFFF000); } else if (strcmp(*argv, "sample") == 0) { __u32 hash; + struct utsname utsname; struct { struct tc_u32_sel sel; struct tc_u32_key keys[4]; @@ -889,8 +891,19 @@ return -1; } hash = sel2.sel.keys[0].val&sel2.sel.keys[0].mask; - hash ^= hash>>16; - hash ^= hash>>8; + uname(&utsname); + if (strncmp(utsname.release, "2.4.", 4) == 0) { + hash ^= hash>>16; + hash ^= hash>>8; + } + else { + __u32 mask = sel2.sel.keys[0].mask; + while (mask && !(mask & 1)) { + mask >>= 1; + hash >>= 1; + } + hash &= 0xFF; + } htid = ((hash<<12)&0xFF000)|(htid&0xFFF00000); sample_ok = 1; continue; debian/patches/1003-ip-maddr-fix-igmp-parsing.patch0000644000000000000000000000200113211277746017076 0ustar Description: fix igmp parsing when iface is long Entries with long vhost names in /proc/net/igmp have no whitespace between name and colon, so sscanf() adds it to vhost and 'ip maddr show iface' doesn't include inet result. Author: Petr Vorel Origin: upstream, https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git/commit/?id=530903dd9003492edb0714e937ad4a5d1219e376 Bug-Ubuntu: https://launchpad.net/bugs/1732032 Last-Update: 2017-11-29 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/ip/ipmaddr.c +++ b/ip/ipmaddr.c @@ -140,13 +140,17 @@ while (fgets(buf, sizeof(buf), fp)) { struct ma_info *ma; + size_t len; if (buf[0] != '\t') { sscanf(buf, "%d%s", &m.index, m.name); + len = strlen(m.name); + if (m.name[len - 1] == ':') + len--; continue; } - if (filter.dev && strcmp(filter.dev, m.name)) + if (filter.dev && strncmp(filter.dev, m.name, len)) continue; sscanf(buf, "%08x%d", (__u32*)&m.addr.data, &m.users); debian/patches/series0000644000000000000000000000042713211277746012047 0ustar 0001-Add-moo-feature.patch 0002-txtdocs.patch 1000-ubuntu-poc-fan-driver.patch 1001-ubuntu-poc-fan-driver-v3.patch 99-increase-receive-buffer-size.patch 1003-ip-maddr-fix-igmp-parsing.patch 1004-ip-maddr-avoid-uninitialized-data.patch 1005-ip-maddr-fix-filtering-by-device.patch debian/patches/0002-txtdocs.patch0000644000000000000000000000202113211277746013712 0ustar From: Debian iproute2 Maintainers Date: Mon, 10 Jun 2013 11:47:00 +0200 Subject: txtdocs --- doc/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/Makefile b/doc/Makefile index b92957e..e1993b4 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -14,6 +14,7 @@ PAGESIZE=a4 PAGESPERPAGE=2 HTMLFILES=$(subst .sgml,.html,$(shell echo *.sgml)) +TXTFILES=$(subst .sgml,.txt,$(shell echo *.sgml)) DVIFILES=$(subst .ps,.dvi,$(PSFILES)) PDFFILES=$(subst .ps,.pdf,$(PSFILES)) @@ -28,6 +29,8 @@ dvi: $(DVIFILES) pdf: $(PDFFILES) +txt: $(TXTFILES) + print: $(PSFILES) $(LPR) $(PSFILES) @@ -65,9 +68,13 @@ print: $(PSFILES) %.html: %.sgml $(SGML2HTML) $< +%.txt: %.html + lynx -nolist -dump $< > $@ + + install: install -m 0644 $(shell echo *.tex) $(DESTDIR)$(DOCDIR) install -m 0644 $(shell echo *.sgml) $(DESTDIR)$(DOCDIR) clean: - rm -f *.aux *.log *.toc $(PSFILES) $(DVIFILES) *.html + rm -f *.aux *.log *.toc $(PSFILES) $(DVIFILES) *.html $(TXTFILES) debian/patches/0001-Add-moo-feature.patch0000644000000000000000000000156113211277746015142 0ustar From: Alexander Wirt Date: Mon, 10 Jun 2013 11:47:00 +0200 Subject: Add moo feature --- ip/ip.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ip/ip.c b/ip/ip.c index e10ddb2..962fd87 100644 --- a/ip/ip.c +++ b/ip/ip.c @@ -61,6 +61,20 @@ static int do_help(int argc, char **argv) return 0; } +static int do_moo(int argc, char **argv) +{ + +fprintf(stderr, +"\n" +" _ __ ___ ___ ___\n" +"| '_ ` _ \\ / _ \\ / _ \\\n" +"| | | | | | (_) | (_) |\n" +"|_| |_| |_|\\___/ \\___/\n" +"\n\n" +"P.S. no real cows were harmed for this moo\n"); + exit(1); +} + static const struct cmd { const char *cmd; int (*func)(int argc, char **argv); @@ -89,6 +103,7 @@ static const struct cmd { { "netns", do_netns }, { "netconf", do_ipnetconf }, { "help", do_help }, + { "moo", do_moo }, { 0 } }; debian/patches/99-increase-receive-buffer-size.patch0000644000000000000000000000106213211277746017536 0ustar Description: Fix "Message truncated" issue with many VF's Author: Phil Sutter Origin: https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git/commit/?id=72b365e8e Applied-Upstream: 4.5.0 Bug-Ubuntu: https://bugs.launchpad.net/bugs/1720126 Last-Update: 2017-10-19 --- iproute2-3.12.0.orig/lib/libnetlink.c +++ iproute2-3.12.0/lib/libnetlink.c @@ -193,7 +193,7 @@ int rtnl_dump_filter_l(struct rtnl_handl .msg_iov = &iov, .msg_iovlen = 1, }; - char buf[16384]; + char buf[32768]; int dump_intr = 0; iov.iov_base = buf; debian/patches/1000-ubuntu-poc-fan-driver.patch0000644000000000000000000000343113211277746016363 0ustar Description: POC fan driver support POC Fan driver support Author: Jay Vosburgh Index: iproute2-3.12.0/include/linux/if_tunnel.h =================================================================== --- iproute2-3.12.0.orig/include/linux/if_tunnel.h +++ iproute2-3.12.0/include/linux/if_tunnel.h @@ -53,6 +53,9 @@ enum { IFLA_IPTUN_6RD_RELAY_PREFIX, IFLA_IPTUN_6RD_PREFIXLEN, IFLA_IPTUN_6RD_RELAY_PREFIXLEN, + + IFLA_IPTUN_FAN_UNDERLAY = 32, + __IFLA_IPTUN_MAX, }; #define IFLA_IPTUN_MAX (__IFLA_IPTUN_MAX - 1) Index: iproute2-3.12.0/ip/link_iptnl.c =================================================================== --- iproute2-3.12.0.orig/ip/link_iptnl.c +++ iproute2-3.12.0/ip/link_iptnl.c @@ -58,6 +58,7 @@ static int iptunnel_parse_opt(struct lin __u32 link = 0; __u32 laddr = 0; __u32 raddr = 0; + __u32 underlay = 0; __u8 ttl = 0; __u8 tos = 0; __u8 pmtudisc = 1; @@ -154,6 +155,9 @@ get_failed: raddr = get_addr32(*argv); else raddr = 0; + } else if (strcmp(*argv, "underlay") == 0) { + NEXT_ARG(); + underlay = get_addr32(*argv); } else if (strcmp(*argv, "local") == 0) { NEXT_ARG(); if (strcmp(*argv, "any")) @@ -258,6 +262,9 @@ get_failed: } } + if (underlay) + addattr32(n, 1024, IFLA_IPTUN_FAN_UNDERLAY, underlay); + return 0; } @@ -289,6 +296,14 @@ static void iptunnel_print_opt(struct li fprintf(f, "local %s ", local); + if (tb[IFLA_IPTUN_FAN_UNDERLAY]) { + unsigned addr = rta_getattr_u32(tb[IFLA_IPTUN_FAN_UNDERLAY]); + + if (addr) + fprintf(f, "underlay %s ", + format_host(AF_INET, 4, &addr, s1, sizeof(s1))); + } + if (tb[IFLA_IPTUN_LINK] && rta_getattr_u32(tb[IFLA_IPTUN_LINK])) { unsigned link = rta_getattr_u32(tb[IFLA_IPTUN_LINK]); const char *n = if_indextoname(link, s2); debian/patches/1004-ip-maddr-avoid-uninitialized-data.patch0000644000000000000000000000125713211277746020611 0ustar Description: ipmaddr: Avoid accessing uninitialized data Looks like this can only happen if /proc/net/igmp is malformed, but better be sure. Author: Phil Sutter Origin: upstream, https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git/commit/?id=b48a1161f5f9b6a0cda399a224bbbf72eba4a5c6 Bug-Ubuntu: https://launchpad.net/bugs/1732032 Last-Update: 2017-11-29 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/ip/ipmaddr.c +++ b/ip/ipmaddr.c @@ -140,7 +140,7 @@ while (fgets(buf, sizeof(buf), fp)) { struct ma_info *ma; - size_t len; + size_t len = 0; if (buf[0] != '\t') { sscanf(buf, "%d%s", &m.index, m.name); debian/patches/1005-ip-maddr-fix-filtering-by-device.patch0000644000000000000000000000312613211277746020344 0ustar Description: ip maddr: fix filtering by device Commit 530903dd9003 ("ip: fix igmp parsing when iface is long") uses variable len to keep trailing colon from interface name comparison. This variable is local to loop body but we set it in one pass and use it in following one(s) so that we are actually using (pseudo)random length for comparison. This became apparent since commit b48a1161f5f9 ("ipmaddr: Avoid accessing uninitialized data") always initializes len to zero so that the name comparison is always true. As a result, "ip maddr show dev eth0" shows IPv4 multicast addresses for all interfaces. . Instead of keeping the length, let's simply replace the trailing colon with a null byte. The bonus is that we get correct interface name in ma.name. Author: Michal Kubecek Origin: upstream, https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git/commit/?id=21503ed2af233ffe795926f6641ac84ec1b15bf9 Bug-Ubuntu: https://launchpad.net/bugs/1732032 Last-Update: 2017-11-29 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/ip/ipmaddr.c +++ b/ip/ipmaddr.c @@ -140,17 +140,18 @@ while (fgets(buf, sizeof(buf), fp)) { struct ma_info *ma; - size_t len = 0; if (buf[0] != '\t') { + size_t len; + sscanf(buf, "%d%s", &m.index, m.name); len = strlen(m.name); if (m.name[len - 1] == ':') - len--; + m.name[len - 1] = '\0'; continue; } - if (filter.dev && strncmp(filter.dev, m.name, len)) + if (filter.dev && strcmp(filter.dev, m.name)) continue; sscanf(buf, "%08x%d", (__u32*)&m.addr.data, &m.users); debian/patches/1001-ubuntu-poc-fan-driver-v3.patch0000644000000000000000000000677113211277746016724 0ustar Description: Fan driver support v3 Fan driver support v3 Author: Jay Vosburgh Index: iproute2-3.12.0/include/linux/if_tunnel.h =================================================================== --- iproute2-3.12.0.orig/include/linux/if_tunnel.h +++ iproute2-3.12.0/include/linux/if_tunnel.h @@ -55,6 +55,7 @@ enum { IFLA_IPTUN_6RD_RELAY_PREFIXLEN, IFLA_IPTUN_FAN_UNDERLAY = 32, + IFLA_IPTUN_FAN_MAP = 33, __IFLA_IPTUN_MAX, }; @@ -116,4 +117,20 @@ enum { }; #define IFLA_VTI_MAX (__IFLA_VTI_MAX - 1) + +enum { + IFLA_FAN_UNSPEC, + IFLA_FAN_MAPPING, + __IFLA_FAN_MAX, +}; + +#define IFLA_FAN_MAX (__IFLA_FAN_MAX - 1) + +struct ip_tunnel_fan_map { + __be32 underlay; + __be32 overlay; + __u16 underlay_prefix; + __u16 overlay_prefix; +}; + #endif /* _IF_TUNNEL_H_ */ Index: iproute2-3.12.0/ip/link_iptnl.c =================================================================== --- iproute2-3.12.0.orig/ip/link_iptnl.c +++ iproute2-3.12.0/ip/link_iptnl.c @@ -41,6 +41,42 @@ static void usage(int sit) fprintf(stderr, " TTL := { 1..255 | inherit }\n"); exit(-1); } +static int fan_parse_map(int *argcp, char ***argvp, struct nlmsghdr *n) +{ + inet_prefix underlay, overlay; + struct ip_tunnel_fan_map map; + struct rtattr *nest; + char **argv = *argvp; + int argc = *argcp; + + nest = addattr_nest(n, 1024, IFLA_IPTUN_FAN_MAP); + while (argc > 0) { + char *colon = strchr(*argv, ':'); + + if (!colon) + break; + *colon = '\0'; + + if (get_prefix(&overlay, *argv, AF_INET)) + invarg("invalid fan-map overlay", *argv); + if (get_prefix(&underlay, colon + 1, AF_INET)) + invarg("invalid fan-map underlay", colon + 1); + + memcpy(&map.underlay, underlay.data, 4); + map.underlay_prefix = underlay.bitlen; + memcpy(&map.overlay, overlay.data, 4); + map.overlay_prefix = overlay.bitlen; + + argc--, argv++; + + addattr_l(n, 1024, IFLA_FAN_MAPPING, &map, sizeof(map)); + } + addattr_nest_end(n, nest); + + *argcp = argc; + *argvp = argv; + return 0; +} static int iptunnel_parse_opt(struct link_util *lu, int argc, char **argv, struct nlmsghdr *n) @@ -158,6 +194,10 @@ get_failed: } else if (strcmp(*argv, "underlay") == 0) { NEXT_ARG(); underlay = get_addr32(*argv); + } else if (strcmp(*argv, "fan-map") == 0) { + NEXT_ARG(); + if (fan_parse_map(&argc, &argv, n)) + invarg("invalid fan-map", *argv); } else if (strcmp(*argv, "local") == 0) { NEXT_ARG(); if (strcmp(*argv, "any")) @@ -268,6 +308,28 @@ get_failed: return 0; } +static void fan_print_map(FILE *f, struct rtattr *attr) +{ + char b1[INET_ADDRSTRLEN], b2[INET_ADDRSTRLEN]; + struct ip_tunnel_fan_map *m; + struct rtattr *i; + int rem; + int p; + + fprintf(f, "fan-map "); + + rem = RTA_PAYLOAD(attr); + for (i = RTA_DATA(attr); RTA_OK(i, rem); i = RTA_NEXT(i, rem)) { + p = RTA_PAYLOAD(i); + m = RTA_DATA(i); + fprintf(f, "%s/%d:%s/%d ", + rt_addr_n2a(AF_INET, p, &m->overlay, b1, INET_ADDRSTRLEN), + m->overlay_prefix, + rt_addr_n2a(AF_INET, p, &m->underlay, b2, INET_ADDRSTRLEN), + m->underlay_prefix); + } +} + static void iptunnel_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[]) { char s1[1024]; @@ -304,6 +366,9 @@ static void iptunnel_print_opt(struct li format_host(AF_INET, 4, &addr, s1, sizeof(s1))); } + if (tb[IFLA_IPTUN_FAN_MAP]) + fan_print_map(f, tb[IFLA_IPTUN_FAN_MAP]); + if (tb[IFLA_IPTUN_LINK] && rta_getattr_u32(tb[IFLA_IPTUN_LINK])) { unsigned link = rta_getattr_u32(tb[IFLA_IPTUN_LINK]); const char *n = if_indextoname(link, s2); debian/iproute2-doc.install0000644000000000000000000000006113211277746013101 0ustar debian/doc/htb/* /usr/share/doc/iproute2-doc/htb debian/iproute2.links0000644000000000000000000000016513211277746012015 0ustar /usr/bin/lnstat usr/bin/rtstat /usr/bin/lnstat usr/bin/ctstat bin/ip sbin/ip /usr/lib/tc/m_xt.so usr/lib/tc/m_ipt.so debian/iproute2.install0000644000000000000000000000031413211277746012337 0ustar misc/ss ip/ip /bin ip/rtmon tc/tc misc/rtacct bridge/bridge /sbin misc/lnstat misc/nstat /usr/bin/ ip/routef ip/routel /usr/bin etc/* /etc tc/*.so /usr/lib/tc misc/arpd /usr/sbin netem/*.dist /usr/lib/tc debian/README.source0000644000000000000000000000353513211277746011365 0ustar This package uses quilt to manage all modifications to the upstream source. Changes are stored in the source package as diffs in debian/patches and applied during the build. To configure quilt to use debian/patches instead of patches, you want either to export QUILT_PATCHES=debian/patches in your environment or use this snippet in your ~/.quiltrc: for where in ./ ../ ../../ ../../../ ../../../../ ../../../../../; do if [ -e ${where}debian/rules -a -d ${where}debian/patches ]; then export QUILT_PATCHES=debian/patches break fi done To get the fully patched source after unpacking the source package, cd to the root level of the source package and run: quilt push -a The last patch listed in debian/patches/series will become the current patch. To add a new set of changes, first run quilt push -a, and then run: quilt new where is a descriptive name for the patch, used as the filename in debian/patches. Then, for every file that will be modified by this patch, run: quilt add before editing those files. You must tell quilt with quilt add what files will be part of the patch before making changes or quilt will not work properly. After editing the files, run: quilt refresh to save the results as a patch. Alternately, if you already have an external patch and you just want to add it to the build system, run quilt push -a and then: quilt import -P /path/to/patch quilt push -a (add -p 0 to quilt import if needed). as above is the filename to use in debian/patches. The last quilt push -a will apply the patch to make sure it works properly. To remove an existing patch from the list of patches that will be applied, run: quilt delete You may need to run quilt pop -a to unapply patches first before running this command. debian/README.Debian0000644000000000000000000000041313211277746011237 0ustar iproute2 for Debian ------------------ If you want use tc with the atm based queue you have to install libatm1 first. Same applies to the tc filter action ipt which needs iptables installed. -- Alexander Wirt Fri, 28 Dec 2007 11:56:28 +0100 debian/doc/0000755000000000000000000000000013211277746007745 5ustar debian/doc/htb/0000755000000000000000000000000013211277746010522 5ustar debian/doc/htb/htbfaq.htm0000644000000000000000000001225413211277746012505 0ustar HTB FAQ

HTB FAQ

Martin Devera aka devik (devik@cdi.cz)
Last updated: 7.7.2003

How to set single HTB up for more interfaces or for incoming packets

You need IMQ for this because all qdisc can handle only outgoing traffic on single interface. See http://www.linuximq.net/.

When HTB is used on machine with Apache (FTP, Samba, ...) server running then downloading from it can't be limited precisely

Try to add PFIFO with limit 10 under HTB classes. When you use default (much larger PFIFO) or SFQ then TCP stack will back off itself as it see too large memory used for outgoing packets. You can also play with /proc/sys/net/ipv4/tcp_wmem.

"HTB: mindelay=500, report it please !" messages in syslog

This means that all indicated that some class should be ready soon but when we looked for it we haven't found one which will be ready in 5 seconds.
After this message you can see lines like

kernel: htb*g j=154480191
kernel: htb*r7 m=0
kernel: htb*r6 m=0
kernel: htb*r5 m=0
kernel: htb*r4 m=0
kernel: htb*r3 m=0
kernel: htb*r2 m=0
kernel: htb*r1 m=0
kernel: htb*r0 m=0
kernel: htb*c20110 m=2 t=636487 c=17888 pq=0 df=483328 ql=0 pa=0 f:
kernel: htb*c20220 m=1 t=-59999999 c=42404 pq=154487461 df=450560 ql=14 pa=40 f:
kernel: htb*c20001 m=2 t=5131 c=6439 pq=0 df=8192 ql=0 pa=0 f:
If you decide to treat is as real bug then I'll need all of these. They are logged under kernel.debug facility so often you need to add it so your syslog.conf. These "htb*" are dump of internal state of all classes. c20110 means class 2:110. *r lines are states of row activity bitsmasks. *c indicates stet of all classes. You are interested in classes with m=1 resp. m=0. These will become ready after time -c resp. -t whatever is negative and smaller. It is 59999999 us for class 2:110 above which is 59sec. It is way too much and HTB will spill that error because it is > 5 sec.

So what is the problem ? Probably you have too small rate or ceil for such class - you should use at least 4kbit for realiable operation of HTB - it leads to max 3sec of delay for 1500 byte packets which seems as reasonable value.
Also try this patch against 2.4.20. (works against older too with one reject). It increases timeout to 10secs and makes errors more readable. I'm interested in your experiences (good or bad) with the patch !
If you think it is not the case and you still get weird errors, contact me with syslog data above and output of commands

tc -s -d qdisc
tc -s -d class show dev your_htb_device1_here
tc -s -d class show dev your_htb_device2_here
...

Why HTB sharing setup works with eth0 but on lo (loopback) it exhibits weird rates ?

Try to execute

ifconfig lo mtu 1500
or use parameter mtu 16400 on "tc qdisc add" line. It is because HTB reserves rate table for 1500 bytes long packets and loopback uses 16384 as default.

What's difference between kbps and kbit ?

1kbps=8kbit. Don't forget it !

What if sum of child rates is smaller than parent rate ?

It is like if you create unused child with remaining rate - the rate difference is divided between other children.

What if sum of child rates is greater than parent rate ?

Then interesting things can happen. Total rate delivered by children can be higher that parent's rate (thus its rate is not respected). However when sum of actual child rates are under parent's rate then borrowing will occur like in regular case.

I use setup with 4 classes, parent has rate=ceil=6kbps, child "mail" has rate=1kbps ceil=4kbps, "web" has rate=ceil=15kbps and "other" has rate=2kbps ceil=4kbps. HTB is attached to an PPP interface with compressed multilink pair of modems which can go from 6kbps to cca 16kbps (depends on compresability of data). When "web" traffic is present it can go as high as compression allows while still allowing mail 1kbps and other 2kbps.
When "web" traffic is smaller than 6kbps then "mail" and "other" can borrow more bw up to 4k each. Parent's class it not set to 18k because then "mail" and "other" could get as much as 8k which is more that link's minimum and would saturate the link. Thus I set parent to 6k so that "mail"+"other" are limited to 6k while "web" can go over.

You can do similar setup by using one more class and deeper hierarchy but this is just to show you the possibility.

"RTNETLINK answers: Invalid argument" and tc parameters are correct

Probably you use tc tool not suited for HTB in kernel. Reread main HTB page section Downloads.

All packets are dropped when "default" is set to nonleaf

Yes. Default kwyword must point to leaf or be 0 (so unclassified packets go thru directly). If you want to "direct" other packets to non-leaf do it by catch all filter with the largest "pref".

What tool was used to create graphs in HTB manual ?

It is proprietary tool called ethloop (luxik.cdi.cz/~devik/qos/ethloop/). debian/doc/htb/userg.htm0000644000000000000000000005411013211277746012362 0ustar HTB manual - user guide

HTB Linux queuing discipline manual - user guide

Martin Devera aka devik (devik@cdi.cz)
Manual: devik and Don Cohen
Last updated: 5.5.2002

New text is in red color. Coloring is removed on new text after 3 months. Currently they depicts HTB3 changes

1. Introduction

HTB is meant as a more understandable, intuitive and faster replacement for the CBQ qdisc in Linux. Both CBQ and HTB help you to control the use of the outbound bandwidth on a given link. Both allow you to use one physical link to simulate several slower links and to send different kinds of traffic on different simulated links. In both cases, you have to specify how to divide the physical link into simulated links and how to decide which simulated link to use for a given packet to be sent.

This document shows you how to use HTB. Most sections have examples, charts (with measured data) and discussion of particular problems.

This release of HTB should be also much more scalable. See comparison at HTB home page.

Please read: tc tool (not only HTB) uses shortcuts to denote units of rate. kbps means kilobytes and kbit means kilobits ! This is the most FAQ about tc in linux.

2. Link sharing

Problem: We have two customers, A and B, both connected to the internet via eth0. We want to allocate 60 kbps to B and 40 kbps to A. Next we want to subdivide A's bandwidth 30kbps for WWW and 10kbps for everything else. Any unused bandwidth can be used by any class which needs it (in proportion of its allocated share).

HTB ensures that the amount of service provided to each class is at least the minimum of the amount it requests and the amount assigned to it. When a class requests less than the amount assigned, the remaining (excess) bandwidth is distributed to other classes which request service.

Also see document about HTB internals - it describes goal above in greater details.

Note: In the literature this is called "borrowing" the excess bandwidth. We use that term below to conform with the literature. We mention, however, that this seems like a bad term since there is no obligation to repay the resource that was "borrowed".

The different kinds of traffic above are represented by classes in HTB. The simplest approach is shown in the picture at the right.
Let's see what commands to use:

tc qdisc add dev eth0 root handle 1: htb default 12
This command attaches queue discipline HTB to eth0 and gives it the "handle" 1:. This is just a name or identifier with which to refer to it below. The default 12 means that any traffic that is not otherwise classified will be assigned to class 1:12.

Note: In general (not just for HTB but for all qdiscs and classes in tc), handles are written x:y where x is an integer identifying a qdisc and y is an integer identifying a class belonging to that qdisc. The handle for a qdisc must have zero for its y value and the handle for a class must have a non-zero value for its y value. The "1:" above is treated as "1:0".

tc class add dev eth0 parent 1: classid 1:1 htb rate 100kbps ceil 100kbps 
tc class add dev eth0 parent 1:1 classid 1:10 htb rate 30kbps ceil 100kbps
tc class add dev eth0 parent 1:1 classid 1:11 htb rate 10kbps ceil 100kbps
tc class add dev eth0 parent 1:1 classid 1:12 htb rate 60kbps ceil 100kbps

The first line creates a "root" class, 1:1 under the qdisc 1:. The definition of a root class is one with the htb qdisc as its parent. A root class, like other classes under an htb qdisc allows its children to borrow from each other, but one root class cannot borrow from another. We could have created the other three classes directly under the htb qdisc, but then the excess bandwidth from one would not be available to the others. In this case we do want to allow borrowing, so we have to create an extra class to serve as the root and put the classes that will carry the real data under that. These are defined by the next three lines. The ceil parameter is described below.

Note: Sometimes people ask me why they have to repeat dev eth0 when they have already used handle or parent. The reason is that handles are local to an interface, e.g., eth0 and eth1 could each have classes with handle 1:1.

We also have to describe which packets belong in which class. This is really not related to the HTB qdisc. See the tc filter documentation for details. The commands will look something like this:

tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 \
   match ip src 1.2.3.4 match ip dport 80 0xffff flowid 1:10
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 \
   match ip src 1.2.3.4 flowid 1:11
(We identify A by its IP address which we imagine here to be 1.2.3.4.)

Note: The U32 classifier has an undocumented design bug which causes duplicate entries to be listed by "tc filter show" when you use U32 classifiers with different prio values.

You may notice that we didn't create a filter for the 1:12 class. It might be more clear to do so, but this illustrates the use of the default. Any packet not classified by the two rules above (any packet not from source address 1.2.3.4) will be put in class 1:12.

Now we can optionally attach queuing disciplines to the leaf classes. If none is specified the default is pfifo.

tc qdisc add dev eth0 parent 1:10 handle 20: pfifo limit 5
tc qdisc add dev eth0 parent 1:11 handle 30: pfifo limit 5
tc qdisc add dev eth0 parent 1:12 handle 40: sfq perturb 10
That's all the commands we need. Let's see what happens if we send packets of each class at 90kbps and then stop sending packets of one class at a time. Along the bottom of the graph are annotations like "0:90k". The horizontal position at the center of the label (in this case near the 9, also marked with a red "1") indicates the time at which the rate of some traffic class changes. Before the colon is an identifier for the class (0 for class 1:10, 1 for class 1:11, 2 for class 1:12) and after the colon is the new rate starting at the time where the annotation appears. For example, the rate of class 0 is changed to 90k at time 0, 0 (= 0k) at time 3, and back to 90k at time 6.

Initially all classes generate 90kb. Since this is higher than any of the rates specified, each class is limited to its specified rate. At time 3 when we stop sending class 0 packets, the rate allocated to class 0 is reallocated to the other two classes in proportion to their allocations, 1 part class 1 to 6 parts class 2. (The increase in class 1 is hard to see because it's only 4 kbps.) Similarly at time 9 when class 1 traffic stops its bandwidth is reallocated to the other two (and the increase in class 0 is similarly hard to see.) At time 15 it's easier to see that the allocation to class 2 is divided 3 parts for class 0 to 1 part for class 1. At time 18 both class 1 and class 2 stop so class 0 gets all 90 kbps it requests.

It might be good time to touch concept of quantums now. In fact when more classes want to borrow bandwidth they are each given some number of bytes before serving other competing class. This number is called quantum. You should see that if several classes are competing for parent's bandwidth then they get it in proportion of their quantums. It is important to know that for precise operation quantums need to be as small as possible and larger than MTU.
Normaly you don't need to specify quantums manualy as HTB chooses precomputed values. It computes classe's quantum (when you add or change it) as its rate divided by r2q global parameter. Its default value is 10 and because typical MTU is 1500 the default is good for rates from 15 kBps (120 kbit). For smaller minimal rates specify r2q 1 when creating qdisc - it is good from 12 kbit which should be enough. If you will need you can specify quantum manualy when adding or changing the class. You can avoid warnings in log if precomputed value would be bad. When you specify quantum on command line the r2q is ignored for that class.

This might seem like a good solution if A and B were not different customers. However, if A is paying for 40kbps then he would probably prefer his unused WWW bandwidth to go to his own other service rather than to B. This requirement is represented in HTB by the class hierarchy.

3. Sharing hierarchy

The problem from the previous chapter is solved by the class hierarchy in this picture. Customer A is now explicitly represented by its own class. Recall from above that the amount of service provided to each class is at least the minimum of the amount it requests and the amount assigned to it. This applies to htb classes that are not parents of other htb classes. We call these leaf classes. For htb classes that are parents of other htb classes, which we call interior classes, the rule is that the amount of service is at least the minumum of the amount assigned to it and the sum of the amount requested by its children. In this case we assign 40kbps to customer A. That means that if A requests less than the allocated rate for WWW, the excess will be used for A's other traffic (if there is demand for it), at least until the sum is 40kbps.

Notes: Packet classification rules can assign to inner nodes too. Then you have to attach other filter list to inner node. Finally you should reach leaf or special 1:0 class. The rate supplied for a parent should be the sum of the rates of its children.

The commands are now as follows:

tc class add dev eth0 parent 1: classid 1:1 htb rate 100kbps ceil 100kbps
tc class add dev eth0 parent 1:1 classid 1:2 htb rate 40kbps ceil 100kbps
tc class add dev eth0 parent 1:2 classid 1:10 htb rate 30kbps ceil 100kbps
tc class add dev eth0 parent 1:2 classid 1:11 htb rate 10kbps ceil 100kbps
tc class add dev eth0 parent 1:1 classid 1:12 htb rate 60kbps ceil 100kbps

We now turn to the graph showing the results of the hierarchical solution. When A's WWW traffic stops, its assigned bandwidth is reallocated to A's other traffic so that A's total bandwidth is still the assigned 40kbps.
If A were to request less than 40kbs in total then the excess would be given to B.

4. Rate ceiling

The ceil argument specifies the maximum bandwidth that a class can use. This limits how much bandwidth that class can borrow. The default ceil is the same as the rate. (That's why we had to specify it in the examples above to show borrowing.) We now change the ceil 100kbps for classes 1:2 (A) and 1:11 (A's other) from the previous chapter to ceil 60kbps and ceil 20kbps.

The graph at right differs from the previous one at time 3 (when WWW traffic stops) because A/other is limited to 20kbps. Therefore customer A gets only 20kbps in total and the unused 20kbps is allocated to B.
The second difference is at time 15 when B stops. Without the ceil, all of its bandwidth was given to A, but now A is only allowed to use 60kbps, so the remaining 40kbps goes unused.

This feature should be useful for ISPs because they probably want to limit the amount of service a given customer gets even when other customers are not requesting service. (ISPs probably want customers to pay more money for better service.) Note that root classes are not allowed to borrow, so there's really no point in specifying a ceil for them.

Notes: The ceil for a class should always be at least as high as the rate. Also, the ceil for a class should always be at least as high as the ceil of any of its children.

5. Burst

Networking hardware can only send one packet at a time and only at a hardware dependent rate. Link sharing software can only use this ability to approximate the effects of multiple links running at different (lower) speeds. Therefore the rate and ceil are not really instantaneous measures but averages over the time that it takes to send many packets. What really happens is that the traffic from one class is sent a few packets at a time at the maximum speed and then other classes are served for a while. The burst and cburst parameters control the amount of data that can be sent at the maximum (hardware) speed without trying to serve another class.

If cburst is smaller (ideally one packet size) it shapes bursts to not exceed ceil rate in the same way as TBF's peakrate does.

When you set burst for parent class smaller than for some child then you should expect the parent class to get stuck sometimes (because child will drain more than parent can handle). HTB will remember these negative bursts up to 1 minute.

You can ask why I want bursts. Well it is cheap and simple way how to improve response times on congested link. For example www traffic is bursty. You ask for page, get it in burst and then read it. During that idle period burst will "charge" again.

Note: The burst and cburst of a class should always be at least as high as that of any of it children.

On graph you can see case from previous chapter where I changed burst for red and yellow (agency A) class to 20kb but cburst remained default (cca 2 kb).
Green hill is at time 13 due to burst setting on SMTP class. A class. It has underlimit since time 9 and accumulated 20 kb of burst. The hill is high up to 20 kbps (limited by ceil because it has cburst near packet size).
Clever reader can think why there is not red and yellow hill at time 7. It is because yellow is already at ceil limit so it has no space for furtner bursts.
There is at least one unwanted artifact - magenta crater at time 4. It is because I intentionaly "forgot" to add burst to root link (1:1) class. It remembered hill from time 1 and when at time 4 blue class wanted to borrow yellow's rate it denied it and compensated itself.

Limitation: when you operate with high rates on computer with low resolution timer you need some minimal burst and cburst to be set for all classes. Timer resolution on i386 systems is 10ms and 1ms on Alphas. The minimal burst can be computed as max_rate*timer_resolution. So that for 10Mbit on plain i386 you needs burst 12kb.

If you set too small burst you will encounter smaller rate than you set. Latest tc tool will compute and set the smallest possible burst when it is not specified.

6. Priorizing bandwidth share

Priorizing traffic has two sides. First it affects how the excess bandwidth is distributed among siblings. Up to now we have seen that excess bandwidth was distibuted according to rate ratios. Now I used basic configuration from chapter 3 (hierarchy without ceiling and bursts) and changed priority of all classes to 1 except SMTP (green) which I set to 0 (higher).
From sharing view you see that the class got all the excess bandwidth. The rule is that classes with higher priority are offered excess bandwidth first. But rules about guaranted rate and ceil are still met.

There is also second face of problem. It is total delay of packet. It is relatively hard to measure on ethernet which is too fast (delay is so neligible). But there is simple help. We can add simple HTB with one class rate limiting to less then 100 kbps and add second HTB (the one we are measuring) as child. Then we can simulate slower link with larger delays.
For simplicity sake I use simple two class scenario:

# qdisc for delay simulation
tc qdisc add dev eth0 root handle 100: htb
tc class add dev eth0 parent 100: classid 100:1 htb rate 90kbps

# real measured qdisc
tc qdisc add dev eth0 parent 100:1 handle 1: htb
AC="tc class add dev eth0 parent"
$AC 1: classid 1:1 htb rate 100kbps
$AC 1:2 classid 1:10 htb rate 50kbps ceil 100kbps prio 1
$AC 1:2 classid 1:11 htb rate 50kbps ceil 100kbps prio 1
tc qdisc add dev eth0 parent 1:10 handle 20: pfifo limit 2
tc qdisc add dev eth0 parent 1:11 handle 21: pfifo limit 2
Note: HTB as child of another HTB is NOT the same as class under another class within the same HTB. It is because when class in HTB can send it will send as soon as hardware equipment can. So that delay of underlimit class is limited only by equipment and not by ancestors.
In HTB under HTB case the outer HTB simulates new hardware equipment with all consequences (larger delay)

Simulator is set to generate 50 kbps for both classes and at time 3s it executes command:

tc class change dev eth0 parent 1:2 classid 1:10 htb \
 rate 50kbps ceil 100kbps burst 2k prio 0
As you see the delay of WWW class dropped nearly to the zero while SMTP's delay increased. When you priorize to get better delay it always makes other class delays worse.
Later (time 7s) the simulator starts to generate WWW at 60 kbps and SMTP at 40 kbps. There you can observe next interesting behaviour. When class is overlimit (WWW) then HTB priorizes underlimit part of bandwidth first.

What class should you priorize ? Generaly those classes where you really need low delays. The example could be video or audio traffic (and you will really need to use correct rate here to prevent traffic to kill other ones) or interactive (telnet, SSH) traffic which is bursty in nature and will not negatively affect other flows.
Common trick is to priorize ICMP to get nice ping delays even on fully utilized links (but from technical point of view it is not what you want when measuring connectivity).

7. Understanding statistics

The tc tool allows you to gather statistics of queuing disciplines in Linux. Unfortunately statistic results are not explained by authors so that you often can't use them. Here I try to help you to understand HTB's stats.
First whole HTB stats. The snippet bellow is taken during simulation from chapter 3.
# tc -s -d qdisc show dev eth0
 qdisc pfifo 22: limit 5p
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0) 

 qdisc pfifo 21: limit 5p
 Sent 2891500 bytes 5783 pkts (dropped 820, overlimits 0) 

 qdisc pfifo 20: limit 5p
 Sent 1760000 bytes 3520 pkts (dropped 3320, overlimits 0) 

 qdisc htb 1: r2q 10 default 1 direct_packets_stat 0
 Sent 4651500 bytes 9303 pkts (dropped 4140, overlimits 34251) 
First three disciplines are HTB's children. Let's ignore them as PFIFO stats are self explanatory.
overlimits tells you how many times the discipline delayed a packet. direct_packets_stat tells you how many packets was sent thru direct queue. Other stats are sefl explanatory. Let's look at class' stats:
tc -s -d class show dev eth0
class htb 1:1 root prio 0 rate 800Kbit ceil 800Kbit burst 2Kb/8 mpu 0b 
    cburst 2Kb/8 mpu 0b quantum 10240 level 3 
 Sent 5914000 bytes 11828 pkts (dropped 0, overlimits 0) 
 rate 70196bps 141pps 
 lended: 6872 borrowed: 0 giants: 0

class htb 1:2 parent 1:1 prio 0 rate 320Kbit ceil 4000Kbit burst 2Kb/8 mpu 0b 
    cburst 2Kb/8 mpu 0b quantum 4096 level 2 
 Sent 5914000 bytes 11828 pkts (dropped 0, overlimits 0) 
 rate 70196bps 141pps 
 lended: 1017 borrowed: 6872 giants: 0

class htb 1:10 parent 1:2 leaf 20: prio 1 rate 224Kbit ceil 800Kbit burst 2Kb/8 mpu 0b 
    cburst 2Kb/8 mpu 0b quantum 2867 level 0 
 Sent 2269000 bytes 4538 pkts (dropped 4400, overlimits 36358) 
 rate 14635bps 29pps 
 lended: 2939 borrowed: 1599 giants: 0
I deleted 1:11 and 1:12 class to make output shorter. As you see there are parameters we set. Also there are level and DRR quantum informations.
overlimits shows how many times class was asked to send packet but he can't due to rate/ceil constraints (currently counted for leaves only).
rate, pps tells you actual (10 sec averaged) rate going thru class. It is the same rate as used by gating.
lended is # of packets donated by this class (from its rate) and borrowed are packets for whose we borrowed from parent. Lends are always computed class-local while borrows are transitive (when 1:10 borrows from 1:2 which in turn borrows from 1:1 both 1:10 and 1:2 borrow counters are incremented).
giants is number of packets larger than mtu set in tc command. HTB will work with these but rates will not be accurate at all. Add mtu to your tc (defaults to 1600 bytes).

8. Making, debugging and sending error reports

If you have kernel 2.4.20 or newer you don't need to patch it - all is in vanilla tarball. The only thing you need is tc tool. Download HTB 3.6 tarball and use tc from it.

You have to patch to make it work with older kernels. Download kernel source and use patch -p1 -i htb3_2.X.X.diff to apply the patch. Then use make menuconfig;make bzImage as before. Don't forget to enable QoS and HTB.
Also you will have to use patched tc tool. The patch is also in downloads or you can download precompiled binary.

If you think that you found an error I will appreciate error report. For oopses I need ksymoops output. For weird qdisc behaviour add parameter debug 3333333 to your tc qdisc add .... htb. It will log many megabytes to syslog facility kern level debug. You will probably want to add line like:
kern.debug -/var/log/debug
to your /etc/syslog.conf. Then bzip and send me the log via email (up to 10MB after bzipping) along with description of problem and its time. debian/iproute2-doc.docs0000644000000000000000000000013313211277746012363 0ustar README* doc/Plan doc/*.tex doc/*.dvi doc/*.ps doc/*.sty doc/*.txt doc/*.html debian/htb/* debian/source/0000755000000000000000000000000013211277746010500 5ustar debian/source/format0000644000000000000000000000001413211277746011706 0ustar 3.0 (quilt) debian/control0000644000000000000000000000460413211277746010607 0ustar Source: iproute2 Section: net Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Debian iproute2 Maintainers Uploaders: Andreas Henriksson , Alexander Wirt Homepage: http://www.linux-foundation.org/en/Net:Iproute2 Vcs-Browser: http://git.debian.org/?p=collab-maint/pkg-iproute.git Vcs-Git: git://git.debian.org/git/collab-maint/pkg-iproute.git Standards-Version: 3.9.4 Build-Depends: texlive-latex-base, texlive-latex-recommended, texlive-fonts-recommended, iptables-dev, libatm1-dev, libdb-dev, linuxdoc-tools, linux-libc-dev, debhelper (>= 8), lynx | lynx-cur, pkg-config, bison, flex Package: iproute2 Priority: important Architecture: any Provides: arpd Conflicts: arpd, iproute (<< 20130000-1) Replaces: iproute Depends: ${shlibs:Depends}, ${misc:Depends} Recommends: ${ipmods:Recommends} Suggests: iproute2-doc Multi-Arch: foreign Description: networking and traffic control tools The iproute2 suite is a collection of utilities for networking and traffic control. . These tools communicate with the Linux kernel via the (rt)netlink interface, providing advanced features not available through the legacy net-tools commands 'ifconfig' and 'route'. Package: iproute2-doc Section: doc Architecture: all Conflicts: iproute-doc (<< 20130000-1) Replaces: iproute-doc Depends: ${misc:Depends} Description: networking and traffic control tools - documentation The iproute2 suite is a collection of utilities for networking and traffic control. . This package contains the documentation for iproute. Package: iproute Depends: iproute2, ${misc:Depends} Architecture: all Section: oldlibs Description: transitional dummy package for iproute2 This is a transitional dummy package to get upgrading systems to install the iproute2 package. It can safely be removed once no other package depends on it. Package: iproute-doc Depends: iproute2-doc, ${misc:Depends} Architecture: all Section: oldlibs Description: transitional dummy package for iproute2-doc This is a transitional dummy package to get upgrading systems to install the iproute2-doc package. It can safely be removed once no other package depends on it. debian/iproute2.manpages0000644000000000000000000000003513211277746012464 0ustar debian/tmp/usr/share/man/*/* debian/copyright0000644000000000000000000000537613211277746011146 0ustar This is the Debian GNU/Linux's prepackaged version of the Linux Traffic Control engine and related utils, "iproute2" The source code was obtained from http://kernel.org/pub/linux/utils/net/iproute2/ The former upstream was http://devresources.linuxfoundation.org/dev/iproute2/download/ http://developer.osdl.org/dev/iproute2 ftp://ftp.inr.ac.ru/ip-routing/iproute2-2.4.7-now-ss010824.tar.gz Copyrights ---------- Copyright (c) 1996-2001 Alexey Kuznetsov Copyright (c) Stephen Hemminger and others, including, but not limited to Copyright (C) 1999 Pavel Golubev Copyright (C) 2001-2004 Lubomir Bulej Copyright (c) 2001 Robert Olsson Copyright (c) 2000-2002 Joakim Axelsson Copyright (c) J Hadi Salim (hadi@cyberus.ca) Copyright (c) 2002-2007 Volkswagen Group Electronic Research Copyright (C) 2003-2010 Jozsef Kadlecsik Copyright (c) 2004 Harald Welte Copyright (c) 2004,2005,2006,2007 USAGI/WIDE Project Copyright (c) 2006,2008 Junio C Hamano Copyright (c) 2008 Intel Corporation. Copyright (c) 2009 Wolfgang Grandegger Copyright (c) 2011 Czech Technical University in Prague Copyright (c) 2011 Volkswagen Group Research Copyright (C) 2011-2012 Kathleen Nichols Copyright (C) 2011-2012 Van Jacobson Copyright (C) 2012 Michael D. Taht Copyright (C) 2012 Eric Dumazet Modifications for Debian: Copyright (c) 1996 Tom Lees Copyright (c) 1998 Christoph Lameter Copyright (c) 1998-1999 Roberto Lumbreras Copyright (c) 1999-2003 Juan Cespedes Copyright (c) 2005- Alexander Wirt License ------- This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. A copy of the GNU General Public License is available as `/usr/share/common-licenses/GPL-2' in the Debian GNU/Linux distribution or on the World Wide Web at `http://www.gnu.org/licenses/old-licenses/gpl-2.0.html'. You can also obtain it by writing to the Free Software Foundation, Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. debian/rules0000755000000000000000000000204313211277746010257 0ustar #!/usr/bin/make -f DEB_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ') DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) CROSS := else CROSS := CC=$(DEB_HOST_GNU_TYPE)-gcc endif %: dh $@ override_dh_clean: dh_clean make distclean -rm -f doc/*.txt override_dh_installexamples: dh_installexamples -p iproute2-doc examples/* override_dh_shlibdeps: dh_shlibdeps -a -Xq_atm.so -Xm_xt.so -Xm_ipt.so dh_shlibdeps -a -- -pipmods -dRecommends -e debian/iproute2/usr/lib/tc/m_xt.so -e debian/iproute2/usr/lib/tc/q_atm.so -xlibc6 override_dh_auto_configure: $(CROSS) dh_auto_configure override_dh_auto_build: $(MAKE) -C doc all txt $(MAKE) KERNEL_INCLUDE=./include $(CROSS) # bump version of the transitional packages... override_dh_gencontrol: dh_gencontrol -piproute -- -v1:$(DEB_VERSION) dh_gencontrol -piproute-doc -- -v1:$(DEB_VERSION) dh_gencontrol --remaining-packages debian/compat0000644000000000000000000000000213211277746010376 0ustar 8