aboutsummaryrefslogtreecommitdiff
path: root/net/iproute2.sh
AgeCommit message (Collapse)Author
2012-04-03network scripts need sysfs on linux systemsWilliam Hubbs
Adjust the previous commit so that on linux systems the network scripts need sysfs.
2012-04-03net/ifconfig, net/iproute: need sysfsRobin H. Johnson
sysfs needs to be available before we can check interfaces. On udev systems this was not a problem, but with mdev/static-dev, there is no other need for sysfs until later in the init. X-Gentoo-Bug: 410701 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=410701 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-04-01Change the method for calculating the interface metric for linux systemsWilliam Hubbs
On linux systems running >=linux-3.2, the /proc/net/dev file cannot be relied on to show the order network interfaces were added to the system. Also, there is currently a bug in the implementation of the seek call for this file which can cause a system to go into an infinite loop. This commit changes the _ifindex function to retreive the value of /sys/class/net/${IFACE}/ifindex and use that value instead of attempting to calculate one from the interface's position in /proc/net/dev. reported-by: John Keeping <john.keeping@lineone.net> X-Gentoo-Bug: 410127 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=410127
2012-03-02Bug #405491: _exists can give a false negative since /proc/net/dev can be ↵Robin H. Johnson
slow to update sometimes when interfaces are added rapidly. Use sysfs instead. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-01-12net/iproute2: Handle shortened argumentsRobin H. Johnson
Allow users to shorten iproute arguments to the shortest unique argument that will match a flag of iproute2. X-Gentoo-Bug: 398721 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=398721 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-01-08net: net.lo, lots of scriptsRobin H. Johnson
The program function in depend blocks is now able to search paths by itself. If passed multiple arguments or multiple calls, at least one of the arguments passed must be a program or a shell builtin (eg ip built into busybox). If a qualified path is specified, only that path will be checked, otherwise it will be checked as a builtin, then $PATH will be checked for the named binary (via type). Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-01-07net: make lookup of iproute2 dynamicWilliam Hubbs
The iproute2, macvlan and vlan modules had several possible hard coded paths for the iproute2 binary. Now we look for it in the path.
2012-01-06Revert "net/ifconfig net/iproute2: support lookup ifconfig/ip dynamically"William Hubbs
This reverts commit f583030e3cbfb1d2f30af3ebd00427e12fe66b70. The previous commit did not account for the case of not having iproute2 installed. Reported-by: Duncan <1i5t5.duncan@cox.net> X-Gentoo-Bug: 397875 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=397875
2012-01-04net/ifconfig net/iproute2: support lookup ifconfig/ip dynamicallyMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-12-28net/iproute2: POSIX sh compatability: ${x/a/b} invalidRobin H. Johnson
The ${x/a/b} shell construct is NOT defined in the POSIX specification, it's a bash addition. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-12-26Fix whitespace.Robin H. Johnson
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-12-21net/iproute2: Confirmed that broadcast and peer can be used together.Robin H. Johnson
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-12-21net/iproute2: IPv6 cannot be used with broadcastRobin H. Johnson
Broadcast and IPv6 should not be used together. Do not try to set the keyword for auto-generation of the broadcast address. If the user passes a broadcast address for IPv6, throw an error. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-12-21net/iproute2: iproute2 flag handlingRobin H. Johnson
Several of the optional flags were not being handled correctly, they were being passed as values only, without the keyword before them. Affected keywords: anycast, label, scope, valid_lft, preferred_lft Also change the handling of keywords to a common setup now, making broadcast and peer strings the same as the above keywords. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-12-13net: Support more variants of address family specification.Robin H. Johnson
This includes address family specifications methods to help debug bug 358235 further. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-12-13net/iproute2: Support routing policy for IPv6 per bug #385833Robin H. Johnson
For creation of routing policy entries for IPv6, the family must be explicitly specified to 'ip'. X-Gentoo-Bug: 385833 X-Gentoo-Bug-URL: https://bugs.gentoo.org/385833 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-12-12net/ifconfig, net/iproute2: admin/oper state check functionsRobin H. Johnson
Provide consistent methods using iproute2/ifconfig to check operational and administrative up/down state of interfaces. This is not the same as ethtool's "Link detected" field, which is the state of the layer 2 medium. TODO: How to check operational state in BSD? Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-12-09iproute2: set a default broadcast address if none is specifiedWilliam Hubbs
Reported-by: Spooky Ghost <spookyghost@blueyounder.co.uk> X-Gentoo-Bug: 392593 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=392593
2011-11-19make shell math operations style more succulentMike Frysinger
Convert the style: var=$((${var} + 1)) to: : $(( var += 1 )) The latter is easier to read imo. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-09-21Refactoring of commit bf49e59e3eb4fe12167812bc1b4531742eddc383Christian Ruppert
Make sure the RPDB rules will be removed.
2011-09-19Don't do anything if the interface doesn't existYun Zheng Hu
iproute2_post_stop() does now check if the network interface still exist. Reported-by: Yun Zheng Hu <hu@fox-it.com> X-Gentoo-Bug: 379575 X-Gentoo-Bug-URL: https://bugs.gentoo.org/379575
2011-07-18Rewrite iproute2 addr argument parsing.Robin H. Johnson
This was originally to fix the fact that our code did not handle certain orders of arguments in conversion, but it was easier to rewrite the entire argument handling to support more options at the same time. Now supports all options documented in the ip manpage, including the IPv6-specific options that must be passed after the interface argument. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Reported-by: Tony Vroon <chainsaw@gentoo.org> X-Gentoo-Bug: 366905 X-Gentoo-Bug-URL: https://bugs.gentoo.org/366905
2011-06-29drop useless "All rights reserved" noticeMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-02-21net/iproute2: Pass required explicit -6 for IPv6 tunnels (#347657)Robin H. Johnson
Tunnel modes ipip6 and ip6ip6 require an explicit family selection for the ip tunnel call. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Gentoo-Bug: 347657
2011-02-12fix typo in iproute2 moduleChristian Wetzig
X-Gentoo-Bug: 354511 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=354511
2011-01-17more whitespace cleanupMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-12-15Move the ip rule extra output to verbose mode only, and support verbose ↵Robin H. Johnson
output on addresses and routes.
2010-12-15Fix pointopoint->peer for iproute.Robin H. Johnson
2010-12-11Merge support for Routing Policy Database (RPDB)Robin H. Johnson
This can be used for multi-homed connections and other advanced routing in Linux. See the documentation links for more information about doing this in linux. The code was a originally pure addon into the conf.d/net files, written in mid-2004 for doing multi-homing between two internet connections. I have finally cleaned this up and integrated it. Thanks to Jonathan Kwan for giving me the original impetus to develop this for Gentoo (it was his dual internet connections...). In the intervening years, it was a example of postup/postdown in the net.example file, however that suffered from a few corner case issues. If you were using the code from net.example, please see the updated section 'Advanced Routing' on syntax, and drop your old function blocks. Additionally, note that the rules added are now directly saved for removal when the interface is taken down.
2010-08-09allow ip to be in /sbin or /binWilliam Hubbs
This makes it possible for the "ip" program in iproute2 to be installed in /sbin or /bin.
2010-07-07fix metricWilliam Hubbs
This change was also taken from Roy Marples' git.
2009-12-05Support phy80211, fixes #209.Alon Bar-Lev
2009-09-04Timeout for ipv6 addresses being tentative.Roy Marples
2009-07-08Apply MTU and txqueuelen after creating the tunnel.Roy Marples
2009-06-01nexthop routes don't use metricsRoy Marples
2009-05-01Add (c) to CopyrightRoy Marples
2009-04-19Allow family on routes, #152Roy Marples
2008-05-27Only check tentative when we have a carrier, Gentoo #223061Roy Marples
2008-05-25Fix tunnel, #80. Someone should fix iproute2 documentation and help files ↵Roy Marples
also :P
2008-04-30We should use correct iproute2 commands and fix busybox as it's iproute2 ↵Roy Marples
implementation is a little broken.
2008-04-16Use qlen instead of txqueuelen so we work with busybox iproute2, Gentoo #217948Roy Marples
2008-03-26Merge net.OS into netRoy Marples