Age | Commit message (Collapse) | Author |
|
|
|
Adjust the previous commit so that on linux systems the network scripts
need sysfs.
|
|
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>
|
|
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
|
|
slow to update sometimes when interfaces are added rapidly. Use sysfs instead.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
|
|
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>
|
|
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>
|
|
The iproute2, macvlan and vlan modules had several possible hard coded
paths for the iproute2 binary. Now we look for it in the path.
|
|
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
|
|
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
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>
|
|
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
|
|
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
|
|
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>
|
|
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>
|
|
This includes address family specifications methods to help debug bug
358235 further.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
|
|
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>
|
|
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>
|
|
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
|
|
Convert the style:
var=$((${var} + 1))
to:
: $(( var += 1 ))
The latter is easier to read imo.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Make sure the RPDB rules will be removed.
|
|
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
|
|
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
|
|
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
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
|
|
X-Gentoo-Bug: 354511
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=354511
|
|
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
output on addresses and routes.
|
|
|
|
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.
|
|
This makes it possible for the "ip" program in iproute2 to be installed
in /sbin or /bin.
|
|
This change was also taken from Roy Marples' git.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
also :P
|
|
implementation is a little broken.
|
|
|
|
|