summaryrefslogtreecommitdiffstats
path: root/ip
Commit message (Collapse)AuthorAgeFilesLines
* fix problem caused by rtnl_send checksStephen Hemminger2008-01-315-5/+5
| | | | | | | Some usages of rtnl_send could cause errors (ie flush requests) others do a listen afterwards. Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
* remove extra newline from perror() callsStephen Hemminger2008-01-264-4/+4
| | | | | perror error adds a newline, so don't split error message across two lines.
* Merge branch 'net-2.6.25'Stephen Hemminger2008-01-251-1/+21
|\
| * iproute2: revert syntax help text mistake.Andreas Henriksson2008-01-021-1/+1
| | | | | | | | | | | | | | | | Sorry. The pref and prio options are actually synonyms. This reverts part of commit 576c63ee59de3f18bec4ebd8181a5a395f268d03. Signed-off-by: Andreas Henriksson <andreas@fatal.se> Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
| * Merge branch 'master' into net-2.6.25Stephen Hemminger2007-12-315-124/+104
| |\
| * | iproute2-2.6.23: RFC4214 Support (v2.5)Templin, Fred L2007-12-111-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch includes support for the Intra-Site Automatic Tunnel Addressing Protocol (ISATAP) per RFC4214. The following diffs are specific to the iproute2-2.6.23 software distribution. This message includes the full and patchable diff text; please use this version to apply patches. Signed-off-by: Fred L. Templin <fred.l.templin@boeing.com> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* | | fix typo in ip batch error messageStephen Hemminger2008-01-211-1/+1
| | | | | | | | | | | | Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
* | | iproute2: revert syntax help text mistake.Andreas Henriksson2008-01-021-1/+1
| |/ |/| | | | | | | | | | | | | Sorry. The pref and prio options are actually synonyms. This reverts part of commit 576c63ee59de3f18bec4ebd8181a5a395f268d03. Signed-off-by: Andreas Henriksson <andreas@fatal.se> Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
* | veth.h move to linux/Stephen Hemminger2007-12-251-1/+1
| | | | | | | | | | | | Move veth.h to linux/ since it is an API. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* | veth: use kernel header fileStephen Hemminger2007-12-212-19/+6
| | | | | | | | | | | | | | Use santized kernel header for veth.h and put in correct place to prevent possible future problems with API. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* | veth device link managementVitaliy Gusev2007-12-212-53/+25
| | | | | | | | | | Signed-off-by: Vitaliy Gusev <vgusev@openvz.org> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* | iplink_parse() routinePavel Emelyanov2007-12-211-54/+73
| | | | | | | | | | | | | | | | | | | | | | This routine parses CLI attributes, describing generic link parameters such as name, address, etc. This is mostly copy-pasted from iplink_modify(). Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* | Fix lost export-dynamicVitaliy Gusev2007-12-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | get_link_kind() fails for statically linked modules (vlan, veth, etc.) if "ip" was linked without "export-dynamic". Signed-off-by: Vitaliy Gusev <vgusev@openvz.org> -- Thank, Vitaliy Gusev Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* | rto_min value display overflowYOSHIFUJI Hideaki / 吉藤英明2007-12-211-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | Reported by: Satoru SATOH <satoru.satoh@gmail.com> "ip route show" does not print correct value when larger rto_min is set (e.g. 3sec). This problem is because of overflow in print_route() and the patch below is a workaround fix for that. [root test]# ./iproute2.git.org/ip/ip route show dev eth1 192.168.140.0/24 proto kernel scope link src 192.168.140.130 169.254.0.0/16 scope link [root test]# ./iproute2.git.org/ip/ip route change 192.168.140.0/24 dev eth1 rto_min 3s [root test]# ./iproute2.git.org/ip/ip route show dev eth1 192.168.140.0/24 scope link rto_min lock 2ms <-- wrong 169.254.0.0/16 scope link [root test]# ./iproute2.git/ip/ip route show dev eth1 # patched version 192.168.140.0/24 scope link rto_min lock 3000ms <-- correct 169.254.0.0/16 scope link This is a simpler fix. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* iproute 2.6.23 incompatibilityPatrick McHardy2007-10-251-1/+2
| | | | | | | | | | | | | | | | | | | Arkadiusz Miskiewicz wrote: > People are reporting that >> ip link set multicast on dev eth0 (Invalid argument) >> no longer works when using iproute 2.6.23 on kernel 2.6.21. >> >> On my testing machine it also fails: >> # ./ip link set eth0 multicast on >> RTNETLINK answers: Invalid argument It seems it fails to properly detect that your kernel is missing RTM_NEWLINK support. Apparently the reason is that the kernels I tested with return a different error in this situation. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* Fix typo in tunnel code (o_key vs. i_key).Herbert Xu2007-10-171-1/+1
| | | | | | | | If a dotted quad ikey is specified for GRE tunnels, it gets set as the okey instead. This patch fixes it. (http://bugs.debian.org/200714) Signed-off-by: Andreas Henriksson <andreas@fatal.se> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* Add parameters to usage help text.Alexander Wirt2007-10-172-2/+2
| | | | | | | | Add src option to route help text (http://bugs.debian.org/226142). Add prio option to rule prio help text (http://bugs.debian.org/213673). Signed-off-by: Andreas Henriksson <andreas@fatal.se> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* Fix various typos and nitpicksAlexander Wirt2007-10-171-1/+1
| | | | | | | | | | | | | Fix typo in ss manpage. Make the backslash visible in ip manpage (http://bugs.debian.org/285507). Strict syntax for ip addr advice in error message. Fix typo in libnetlink(3) manpage (writen -> written). Fix typos in tc-prio(8) manpage. Fix typo in tc-htb(8) manpage (mininum -> minimum). Fix typo in tc-cbq-details(8) manpage (occured -> occurred). 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-125-5/+5
| | | | This reverts commit 1bacc7ce752f795df3b1b3710245c4cd8c1bc396.
* Remove bogus reference to tc-filters(8) from tc(8) manpage.Andreas Barth2007-10-125-5/+5
| | | | | | | | 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>
* 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-111-7/+23
| | | | | | | | | | 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>
* 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-052-0/+186
| | | | | | | | | | 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>
* 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>
* 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>
* 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>
* 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
* iproute2: Support IFF_LOWER_UP and IFF_DORMANTThomas Graf2007-06-194-11/+5
| | | | | | | | | 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 last changeStephen Hemminger2007-06-192-23/+26
| | | | | | | Need to use correct XFRMA_ constants. Get rid of bogus casts. Fix case where no attribute returned. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* see SPD infojamal2007-06-191-1/+90
| | | | | | | | | | | | | | | | | | | and heres the SPD version ... cheers, jamal [XFRM] see SPD info i.e instead of something like ip xfrm policy ls | grep -i src | wc -l do: ip xfrm policy count And you get the count; you can also pass -s or -s -s to see more details Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* see SAD infojamal2007-06-192-0/+81
| | | | | | | | | | | | | | | | | | | | | | Stephen, Use this patch instead of the one i sent yesterday. As before, you will need to pull include/linux/xfrm.h from net-2.6 once Dave applies the kernel patch. cheers, jamal [XFRM] see SAD info i.e instead of something like ip xfrm state ls | grep -i src | wc -l do: ip xfrm state count And you get the count; you can also pass -s to the command line and get the hash info. Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* iproute2: support for goto/nop action and detached flagThomas Graf2007-06-191-2/+25
| | | | | | | | | Stephen, Patch to support the new fib rules features I just posted on netdev. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* update rest to use nl_mgrpjamal2007-03-132-11/+11
| | | | | | | | | | cheers, jamal [ALL] update rest to use nl_mgrp Signed-off-by: J Hadi Salim <hadi@cyberus.ca> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
* enabled to manipulate the flags of IFA_F_HOMEADDRESS or IFA_F_NODAD from ip.Noriaki TAKAMIYA2007-03-071-1/+22
| | | | | | | | | | Hi, This patch enables ip command to add IFA_F_HOMEADDRESS and IFA_F_NODAD flags while adding the IPv6 address. Signed-off-by: Noriaki TAKAMIYA<takamiya@po.ntts.co.jp> Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
* Eliminate trailing whitespaceStephen Hemminger2006-12-132-5/+5
| | | | Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
* update xfrm monitoring to use nl_mgrpjamal2006-12-131-6/+6
| | | | | | | | | | | | | | Stephen, I will wait until you sync all these patches ive sent; then send a couple more then i will be done. cheers, jamal [XFRM] update xfrm monitoring to use nl_mgrp Signed-off-by: J Hadi Salim <hadi@cyberus.ca> Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
* update xfrm async eventsjamal2006-12-131-0/+53
| | | | | | | | [XFRM] update xfrm async events Report abbreviated async xfrm aevents. Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
* [IPROUTE]: Add support for routing rule fwmark masksPatrick McHardy2006-12-131-4/+21
| | | | | | Needs kernel >= 2.6.19. Signed-off-by: Patrick McHardy <kaber@trash.net>
* Remove trailing whitespaceStephen Hemminger2006-12-0522-92/+92
| | | | | | Go through source files and remove all trailing whitespace Signed-off-by: Stephen Hemminger <shemminger@osdl.org>