summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Switch helpers tc_core_{time2ktime,ktime2time} from long to unsigned as well.Andreas Henriksson2007-10-122-4/+4
| | | | | | | | | | | | Follow up patch to "Fix overflow in time2tick / tick2time." which switches the remaining two helper functions from long to unsigned as well. These functions are only used in "tc/q_hfsc.c" where both the passed argument and the place the return value is stored are unsigned/u32 variables, so this change should be safe to make but hasn't been tested as extensively as the time2tick patch. Signed-off-by: Andreas Henriksson <andreas@fatal.se> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* Prevent renaming interfaces to empty string.Patrick McHardy2007-10-121-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Andreas Henriksson wrote: > From: Alexander Wirt <formorer@debian.org> > > > Signed-off-by: Andreas Henriksson <andreas@fatal.se> > --- > ip/iplink.c | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/ip/iplink.c b/ip/iplink.c > index 4060845..da1f64e 100644 > --- a/ip/iplink.c > +++ b/ip/iplink.c > @@ -670,6 +670,10 @@ static int do_set(int argc, char **argv) > } > > if (newname && strcmp(dev, newname)) { > + if (strlen(newname) == 0) { > + printf("\"\" is not valid device identifier\n"); > + return -1; > + } Indentation fixed, same change for the non-ioctl case, use invarg. While I'm at it I also fixed the error message for "name too long", *argv is NULL at this point. Signed-off-by: Patrick McHardy <kaber@trash.net>
* Revert "don't allow "" for device name"Stephen Hemminger2007-10-121-2/+0
| | | | | | Use Patrick's instead This reverts commit ba371d989038e0dda803528c194e12e5177f7008.
* Revert "Remove bogus reference to tc-filters(8) from tc(8) manpage."Stephen Hemminger2007-10-1212-16/+18
| | | | This reverts commit 1bacc7ce752f795df3b1b3710245c4cd8c1bc396.
* Drop bogus reference to tc-filters and add lartc.org link to manpage.Alexander Wirt2007-10-122-1/+4
| | | | | Signed-off-by: Andreas Henriksson <andreas@fatal.se> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* Fix overflow in time2tick / tick2time.Andreas Henriksson2007-10-122-4/+4
| | | | | | | | The helper functions gets passed an unsigned int, which gets cast to long and overflows. See http://bugs.debian.org/175462 Signed-off-by: Andreas Henriksson <andreas@fatal.se> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* Add new rtacct/nstat manpages and additional symlinks.Andreas Henriksson2007-10-123-0/+117
| | | | | | | | | | Symlink rtstat(8) and ctstat(8) to lnstat(8). Add rtacct/nstat manpage based on doc/nstat.sgml as rtacct(8). Symlink nstat(8) to rtacct(8). Add arpd(8) symlink based on doc/arpd.sgml. Signed-off-by: Andreas Henriksson <andreas@fatal.se> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* Fix ematch cmp and nbyte syntax help text.Lionel Elie Mamane2007-10-122-3/+3
| | | | | | | | | | | | | The help/usage screen of ematch cmp and nbyte say recognised symbolic values for "layer FOO" are link, header and next-header, but the code does _not_ implement that: it will recognise "next-header" as what is supposed to be "header" and will not recognise "header". The right symbolic values seem to be link, network, transport. Here is a patch that changes the help/usage screen to match the code. (http://bugs.debian.org/438653) Signed-off-by: Andreas Henriksson <andreas@fatal.se> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* Remove bogus reference to tc-filters(8) from tc(8) manpage.Andreas Barth2007-10-1212-18/+16
| | | | | | | | Spotted by Aleš Kozumplík <al_es@seznam.cz> (http://bugs.debian.org/289225) Signed-off-by: Andreas Henriksson <andreas@fatal.se> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* don't allow "" for device nameStephen Hemminger2007-10-121-0/+2
| | | | | | | If a zero-length string is given, it is not rejected by netlink in kernel so catch it at command line. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* remove support for IP multipathStephen Hemminger2007-10-121-30/+0
| | | | | | | IP multipath routing was so buggy that it was dropped from the current kernel. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* remove outdated netbug script.Stephen Hemminger2007-10-121-53/+0
| | | | | | | | | | Haven't received a bug from this script in years. And it has several race conditions, etc. See http://bugs.debian.org/289541, http://bugs.debian.org/313540, http://bugs.debian.org/313541, and http://bugs.debian.org/313544. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* IPROUTE2: Support IPv4/IPv6 TunnelYOSHIFUJI Hideaki / 吉藤英明2007-10-122-1/+22
| | | | | | | Based on patch from Yasuyuki KOZAKAI <yasuyuki.kozakai@toshiba.co.jp>. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* rto support for ip commandRick Jones2007-10-114-14/+117
| | | | | | | | | | Enable users of ip to specify the times for rtt, rttvar and rto_min in human-friendly terms a la "tc" while maintaining backwards compatability with the previous "raw" mechanism. Builds upon David Miller's uncommited patch to set rto_min. Signed-off-by: Rick Jones <rick.jones2@hp.com> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* don't make veth a shared libraryStephen Hemminger2007-10-112-9/+4
| | | | | | | Making veth a shared library for ip caused build problems (not PIC) and is unneeded. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* Merge 192.168.0.5:src/iproute2Stephen Hemminger2007-10-111-0/+1
|\
| * lnstat : force a flush before sleepEric Dumazet2007-10-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | Hi Stephen This small patch allows to use lnstat/rtstat with a pipe output, without a full bufferisation. Thank you Eric Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
| * 2.6.23 kernel headersStephen Hemminger2007-10-113-22/+63
| | | | | | | | | | | | Update headers to sanitized versions of 2.6.23 final Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* | Update kernel headers to 2.6.23-rc5Stephen Hemminger2007-09-052-22/+2
| | | | | | | | Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* | ip: xfrm: Fix flush message.Masahide NAKAMURA2007-09-054-55/+117
| | | | | | | | | | | | | | | | | | | | | | Fix xfrm state or policy flush message. And minor updates are included: o Use static buffer to show unknown value as string. o Show policy type (ptype) only when kernel specified it. o Clean-up xfrm_monitor. Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* | ip: xfrm: Fix policy and state flags.Masahide NAKAMURA2007-09-054-8/+72
| | | | | | | | | | | | | | | | | | | | | | | | o Support policy flag with string format. Note that kernel defines only one name "localok" for the flag and it has not had any effect currently. o Support state flag value XFRM_STATE_NOPMTUDISC. o Fix to show detailed flags value when "-s" option is used. o Fix minor typo. Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* | ip: xfrm: Clean-up for internal mask to filter.Masahide NAKAMURA2007-09-052-19/+0
| | | | | | | | | | | | | | Remove unused or redundant usage for xfrm_filter. Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* | Module for ip utility to support veth device (v.2.1)Pavel Emelianov2007-09-053-1/+108
| | | | | | | | | | | | | | | | | | | | | | The usage is # ip link add [name] type veth [peer <name>] [mac <mac>] [peer_mac <mac>] This version doesn't include the fix for ip/iplink.c as Patrick said that he had included it into his patches already. Signed-off-by: Pavel Emelianov <xemul@openvz.org> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* | vlan supportPatrick McHardy2007-09-053-0/+247
| | | | | | | | | | | | | | | | | | | | This is a resend of the iproute VLAN patch with the if_link.h changes edited out since the headers are already synced. [IPROUTE]: VLAN support Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* | Fix modes of test filesStephen Hemminger2007-09-054-0/+0
| | | | | | | | | | Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* | Revert "Make ip utility veth driver aware"Stephen Hemminger2007-09-054-217/+2
|/ | | | | | | This reverts commit 4ed390ce43d1ec7c881721f312260df901d8390d. Newer version doesn't use genetlink. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* Fix bug in display of ipv6 cloned/cached routesSridhar Samudrala2007-08-221-1/+5
| | | | | | | | | | This patch fixes a bug in the 'ip' command to display IPv6 cloned routes. ip -6 route ls cache returns empty even when there are cloned routes because of of a missing else in print_route() routine. Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
* Fix meta ematch usage of 0 valuesPatrick McHardy2007-08-221-5/+2
| | | | | | | em_meta doesn't send 0 values to the kernel. breaking matching on them and resulting in "Missing value TLV" messages on dump. Signed-off-by: Patrick McHardy <kaber@trash.net>
* iplink: use netlink for link configurationPatrick McHardy2007-08-225-3/+369
| | | | | | | Add support for using netlink for link configuration. Kernel-support is probed, when not available it falls back to using ioctls. Signed-off-by: Patrick McHardy <kaber@trash.net>
* Fix m_ipt buildStephen Hemminger2007-08-221-0/+1
| | | | Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* Make ip utility veth driver awarePavel Emelianov2007-08-224-2/+217
| | | | | | | | | | | | | | | | | The new command is called "veth" with the following syntax: * ip veth add <dev1> <dev2> creates interconnected pair of veth devices. * ip veth del <dev> destroys the pair of veth devices, where <dev> is either <dev1> or <dev2> used to create the pair. One question that is to be solved is whether or not to create a hard-coded netlink family for veth driver. Without it the family resolution code has to be moved to general place in ip utility (by now it is copy-paste-ed from one file to another till final decision). Signed-off-by: Pavel Emelianov <xemul@openvz.org>
* Use FRA_* attributes for routing rulesPatrick McHardy2007-08-221-34/+35
| | | | | | | | Use the FRA attributes for routing rules, with exception of RTA_GATEWAY (used for route-NAT) which isn't supported by current kernels anymore and thus doesn't exist as FRA attribute. Signed-off-by: Patrick McHardy <kaber@trash.net>
* sanitized headers update to 2.6.23-rc3Stephen Hemminger2007-08-226-16/+62
| | | | | | Update headers Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* iproute2: sch_rr support in tcPJ Waskiewicz2007-08-223-5/+155
| | | | | | | | | | | | | | | | | | | This patch applies on top of Patrick McHardy's RTNETLINK patches to add nested compat attributes. This is needed to maintain ABI for sch_{rr|prio} in the kernel with respect to tc. A new option, namely multiqueue, was added to sch_prio and sch_rr. This will allow a user to turn multiqueue support on for sch_prio or sch_rr at loadtime. Also, tc qdisc ls will display whether or not multiqueue is enabled on that qdisc. When in multiqueue mode, a user can specify a value of 0 for bands, and the number of bands will be created to match the number of queues on the device. This patch is to support the new sch_rr (round-robin) qdisc being proposed in NET for multiqueue network device support in the Linux network stack. It uses q_prio.c as the template, since the qdiscs are nearly identical, outside of the ->dequeue() routine. Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
* IPROUTE2: RTNETLINK nested attributesPatrick McHardy2007-08-222-0/+55
| | | | | | | This adds capability for iproute2 to send nested attributes to the kernel, while maintaining backwards compatibility. Signed-off-by: Patrick McHardy <kaber@trash.net>
* show multicast groupsJohannes Berg2007-08-222-4/+65
| | | | | | | | Update the included version of the genetlink.h header to the multicast group API and make the generic netlink controller part show multicast groups where applicable. Also fix two typos. Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
* Bug fix tc action dropPatrick McHardy2007-08-221-1/+2
| | | | | | | | | | | | | | | | | | | >>That command is from a script that used to work with iproute2-ss020116 >>(2002!), which had the following in tc/m_police.c: >> >>210 } else if (strcmp(*argv, "action") == 0) { >>211 NEXT_ARG(); >>212 if (get_police_result(&p.action, &presult, *argv)) { >> >>I don't know when that bit was dropped, but it used to be there. :-) > > > > Indeed, I missed that. I'll fix up the patch .. OK this patch fixes parsing of "action ...". I've removed the erroring on unknown arguments again since in that case the caller should continue parsing.
* TC action parsing bug fixPatrick McHardy2007-08-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | > > Is it a bug that: > > # tc filter add dev eth0 parent 1: protocol ip prio 0 handle 0xfffffff > fw police rate 1 burst 1 mpu 0 mtu 1 action drop > ^^^^^^^^^^^ > creates a filter that looks like: > > # tc filter ls dev eth0 > filter parent 1: protocol ip pref 49152 fw > filter parent 1: protocol ip pref 49152 fw handle 0xfffffff police 0x1 > rate 0bit burst 0b mtu 1b action reclassify > ^^^^^^^^^^^^^^^^^ > ref -543190236 bind 4 > > (which reclassifies and thus lets 0xfffffff-marked packets through). > > I'm pretty sure this used to work under 2.4.x (though I no longer have a > 2.4 box to test with), but it hasn't worked on any of the 2.6.x kernels > I've tried (with both iproute2-ss060323 and 070710). Good catch. It seems this is merely a parsing error, iproute doesn't have an "action" parameter and aborts parsing, so it uses the default value of "RECLASSIFY". It never had this parameter, so this patch removes it from the help text and makes it return an error.
* Fix ss to handle partial records.Stephen Hemminger2007-07-181-124/+84
| | | | | | | Output from /proc may include partial records, so rather than trying to be sexy and do own parsing, just use stdio. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* v2.6.22-070710Stephen Hemminger2007-07-101-1/+1
| | | | Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* ip/routef lifesaverMike Frysinger2007-07-101-1/+7
| | | | | | | | | | keep people from screwing their systems with routef minor patch here ... if you run `routef --help`, it'll turn around and flush your routing tables anyways :) so patch will have routef output usage if any arguments are given, otherwise it'll flush the tables ... idea is from Lars Strojny
* ss: fix issues with signed inodesStephen Hemminger2007-07-101-15/+14
| | | | | Some parts of ss were incorrectly assuming inode number was int not unsigned.
* Snapshot update for 2.6.22Stephen Hemminger2007-06-252-2/+2
| | | | Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* Add TC_LIB_DIR environment variable.Stephen Hemminger2007-06-204-3/+16
| | | | | | Don't hardcode /usr/lib/tc as a path Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* netem: staticStephen Hemminger2007-06-201-1/+1
| | | | | | | Make netem static rather than shared library. It saves problems on 64 bit platforms. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* fix build warningsStephen Hemminger2007-06-202-1/+2
| | | | | | Fix problems from recent if.h related changes. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* [Fwd: Re: more iproute2 issues (not critical)]Patrick McHardy2007-06-201-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This one also makes sense for the release I guess. -------- Original Message -------- Subject: Re: more iproute2 issues (not critical) Date: Sat, 31 Mar 2007 16:16:56 +0200 From: Patrick McHardy <kaber@trash.net> To: Denys <denys@visp.net.lb> CC: Stephen Hemminger <shemminger@linux-foundation.org>, netdev@vger.kernel.org References: <20070321175951.M73913@visp.net.lb> <46026717.9060909@trash.net> <20070322124533.M79867@visp.net.lb> <46027FF2.6020001@trash.net> <20070322101224.3e6bb899@freekitty> <20070331021401.M17326@visp.net.lb> <20070331023011.M8101@visp.net.lb> Denys wrote: > Ooops, sorry, it seems my fault, no library exist on this system. > But i guess it must not coredump in this case? Is it possible to check if > library not exist and just print some nice message? > It is trivial i guess. The problem is that lib_dir is NULL when calling get_target_names. This patch fixes it. [IPROUTE]: m_ipt: fix crash when dumping rules lib_dir is NULL when calling get_target_name, causing a NULL pointer dereference in the strlen call. Signed-off-by: Patrick McHardy <kaber@trash.net>
* iproute2: Support IFF_LOWER_UP and IFF_DORMANTThomas Graf2007-06-198-15/+223
| | | | | | | | | In order to support these new flags add current linux/if.h into the directory with the local copies. This caused troubles with outdated redefinitions from net/if.h so I've removed the dependency on it. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* Fix symbolic link to tc-bfifo.8Yasuyuki KOZAKAI2007-06-191-2/+1
| | | | | | | tc-pbfifo.8 does not exist because it was moved to tc-bfifo.8. Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* iproute2: Format IPv6 tunnels endpoints nicely.David Lamparter2007-06-191-0/+3
| | | | | | | | Change formatting of IPv6 tunnel endpoints from hex chain to standard IPv6 representation. Signed-off-by: David Lamparter <equinox@diac24.net> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>