Commit Graph

195 Commits

Author SHA1 Message Date
William Hubbs
f36f8fb1be Typo Fix
Reported-by: vitalyb@telenet.dn.ua
X-Gentoo-Bug: 452544
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=452544
2013-02-17 15:37:27 -06:00
Alexander Tsoy
a8ab9d63f5 ifconfig.sh.Linux.in: fix ipv6 routes and default route
Do not add -net or -host to ipv6 routes or to the default route when
using route from net-tools.

X-Gentoo-Bug: 442594
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=442594
2012-12-21 16:36:20 -06:00
Robin H. Johnson
e0bbe8d0bd net/bonding: ensure mode & miimon are handled correctly.
miimon & mode must be set before other parameters, and then not changed
again. Prior commit f671e0a28 per bug #421757 introduced a small logic
error. Fixed & refactored to prevent it happening as easily.

X-Gentoo-Bug: 447790
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=447790
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-12-20 21:28:23 +00:00
William Hubbs
cf7b904704 firewalld: fix firewall-cmd dependency
This should be "program" instead of "program start".
2012-11-10 14:56:33 -06:00
Robin H. Johnson
23f975dfcd checkbashisms: Fix redirection order.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-11-07 01:44:56 +00:00
Robin H. Johnson
ca6019031a net/apipa: checkbashisms false positive.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-11-07 01:44:26 +00:00
Robin H. Johnson
3809eac54d net/iwconfig: Even more bashism fun.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-11-07 00:13:58 +00:00
Robin H. Johnson
dabd8b22ca checkbashisms: export syntax.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-11-06 23:21:40 +00:00
Robin H. Johnson
54562d3525 net/vlan: checkbashisms.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-11-06 23:18:32 +00:00
Robin H. Johnson
ed3b0c66f9 net/bonding: checkbashisms.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-11-06 23:18:08 +00:00
Doug Goldstein
5657fa7975 oldnet: add firewalld support 2012-11-05 17:20:08 -06:00
Lorand Kelemen
f671e0a28f Oldnet: bonding: set miimon correctly
Miimon needs to be activated before downdelay is set.

X-Gentoo-Bug: 421757
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=421757
2012-10-17 12:53:17 -05:00
Robin H. Johnson
a9f1ac2dfd net/bonding: Sanity-check sysfs usage
If sysfs is not available, you might still be able to create bond
interfaces, but only in very specific configurations, and you must have
the ifenslave binary instead to call ioctls.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-10-11 03:56:37 +00:00
Robin H. Johnson
27984c0d2d net/bonding: subsume functionality for NFS booting
If the kernel is NFS-booting, it is critical that we don't down the
slave interfaces when we activate the bond. To do so will break the root
filesystem when networking is temporarily lost.

Reported-by: Walter <walter@pratyeka.org>
X-Gentoo-Bug: 428604
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=428604
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-10-11 03:49:45 +00:00
Robin H. Johnson
9a9c2acd8d net/{bridge,iproute2}: Stricter iproute2 ip link syntax & promisc handling
The 'dev' argument is only optional for ethX devices, for others it is
mandatory, so we should always include it.

Also tweak when promisc mode is applied to bridges.

Patches submitted by Denis Kaganovich <mahatma@bspu.unibel.by>.

X-Gentoo-Bug: #431204
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=431204
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-10-10 00:10:52 +00:00
William Hubbs
444bdfbfc4 oldnet/iproute2.sh: fix carrier detection
We were not testing for carrier correctly when testing for ipv6
tentative addresses.

Reported-by: <ast@domdv.de>
X-Gentoo-Bug: 433012
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=433012
2012-09-07 14:29:56 -05:00
Robin H. Johnson
a6db2374fe Bug #427152: Port of VLAN code to sysfs/iproue2 from vconfig lost the ability to create different vlans with the same ID but different interfaces on a single system. Implement it now.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-07-20 10:20:19 -07:00
Björn Baumbach
dceeef9fe5 net: fix typo 2012-07-04 09:15:54 -05:00
William Hubbs
ae7cbd910a net/udhcpc: use -x hostname:NAME option instead of -h name
reported-by: bug@mejor.pl
X-Gentoo-Bug: 417617
X-Gentoo-Bug-URL: https://bugs.gentoo.org/417617
2012-06-07 00:12:20 -05:00
Robin H. Johnson
b5917a817c net: Be sure to install the ip6rd module.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-05-03 13:34:10 -07:00
Christian Ruppert
a6549a2b0f Whitespace 2012-04-24 03:50:10 +02:00
William Hubbs
be5de328e9 network scripts need sysfs on linux systems
Adjust the previous commit so that on linux systems the network scripts
need sysfs.
2012-04-03 20:01:23 -05:00
Robin H. Johnson
37af1693b4 net/ifconfig, net/iproute: 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>
2012-04-03 14:32:03 -07:00
William Hubbs
9127684553 Change the method for calculating the interface metric for linux systems
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-04-01 22:59:00 -05:00
Robin H. Johnson
b27a9003bb net/ifconfig: The location of the ifconfig binary has changed
The location of the ifconfig binary has changed in
net-tools-1.60_p20120127084908, and if we do not check both locations
for it, the user will get errors like:
_is_wireless: command not found
_exists: command not found

X-Gentoo-Bug: 407757
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=407757
2012-03-11 12:54:48 -07:00
Robin H. Johnson
7a1e4ef606
Bug #405491: _exists can give a false negative since /proc/net/dev can be slow to update sometimes when interfaces are added rapidly. Use sysfs instead.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-03-02 19:54:48 +00:00
Robin H. Johnson
29a1ad3d18 Whitespace.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-02-09 01:43:27 -08:00
Salah Coronya
659f7c2bc8 oldnet: ip6rd support
X-Gentoo-Bug: 392223
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=392223
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-02-09 01:39:40 -08:00
Christian Ruppert
5d441dd376 Whitespace 2012-01-26 20:47:46 +01:00
Robin H. Johnson
fb00b10669 net/bonding: Fix which interface IPs get added to.
The previous bonding change of ensuring interfaces were down to add
slave interfaces, but it clobbered the IFACE variable, because it was
being passed to a bash function rather than a command.

X-Gentoo-Bug: 400613
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=400613
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-01-25 10:47:37 -08:00
Robin H. Johnson
fdc8849e56 net/ethtool: Fix program call.
I missed removing a call to the old ethtool function wrapper that was
made unneeded by commit d02d3af02.

X-Gentoo-Bug: 399037
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=399037
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-01-16 09:33:09 -08:00
Robin H. Johnson
e7649f117a net/iproute2: Handle shortened arguments
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-12 20:38:31 -08:00
Robin H. Johnson
4255ba175b net: net.lo, lots of scripts
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-08 16:24:10 -08:00
William Hubbs
d02d3af02e net: make lookup of ethtool dynamic
The ethtool module checked in two places for the ethtool binary; now we
look for it in the path.
2012-01-07 15:47:48 -06:00
William Hubbs
61e05331d1 net: make lookup of iproute2 dynamic
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-07 15:41:43 -06:00
William Hubbs
84aa4ba818 Revert "net/ifconfig net/iproute2: support lookup ifconfig/ip dynamically"
This reverts commit f583030e3c.

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-06 14:51:43 -06:00
Mike Frysinger
f583030e3c net/ifconfig net/iproute2: support lookup ifconfig/ip dynamically
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-04 16:38:11 -05:00
Marien Zwart
2471d741f7 net:macvlan: bring up the interface
X-Gentoo-Bug: 396429
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=396429
2011-12-29 19:10:32 -06:00
William Hubbs
759f4ca4f2 net: remove _check_macvlan function
This test is incorrect, and we do not need the modprobe. If macvlan is a
module, it is automatically modprobed when the first macvlan link is
added. Also, the /sys directory referred to in the test does not exist
if macvlan is built into the kernel.

Reported-by: Marien Zwart <marienz@gentoo.org>
X-Gentoo-Bug: 396427
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=396427
2011-12-29 18:00:25 -06:00
Robin H. Johnson
b12cb2f507 net/iproute2: POSIX sh compatability: ${x/a/b} invalid
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-28 20:32:10 +00:00
Robin H. Johnson
5615325a84 net/vlan: Fix prestop when device was hard-removed already
During stop of an interface, if it has been removed already (eg
hotunplug), not existing is fine.

X-Gentoo-Bug: 395859
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=395859
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-12-26 17:56:26 -08:00
Robin H. Johnson
537171eac2 Fix whitespace.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-12-26 17:51:28 -08:00
Robin H. Johnson
415f480410 net/vlan, net/macvlan: iproute2 is required for new VLAN configuration
Since commit 683a21b0a in Feburary 2011, iproute2 has been required for
new VLAN configuration. MACVLAN is also impossible to configure without
iproute2. However we did not check if iproute2 was actually in the
modules for a given interface, so it could end up hanging or giving
weird errors. Check for iproute2 before usage now.

X-Gentoo-Bug: 389437
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=389437
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-12-26 17:22:29 -08:00
Robin H. Johnson
acf77b73af net/ip6to4: Split to use pre_start and start so that other tunnel names work.
We need to create interfaces of custom names before we can sucessfully
start them. To do this, we have to add tunnels during prestart instead
of start. Split up the ip6to4 script to do this, saving the computed
variables for use in start with the new service data commands.

X-Gentoo-Bug: 372575
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=372575
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-12-26 17:08:27 -08:00
Robin H. Johnson
7b1c1e1623 net/iproute2: Confirmed that broadcast and peer can be used together.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-12-21 08:10:47 +00:00
Robin H. Johnson
8bb4b759eb net/iproute2: IPv6 cannot be used with broadcast
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-21 08:08:31 +00:00
Robin H. Johnson
e5eb062f05 net/iproute2: iproute2 flag handling
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-21 08:02:53 +00:00
Robin H. Johnson
879e1acd5d net: Support more variants of address family specification.
This includes address family specifications methods to help debug bug
358235 further.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-12-13 00:43:18 -08:00
Robin H. Johnson
06f6ce408c net/iproute2: Support routing policy for IPv6 per bug #385833
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-13 00:19:58 -08:00
Robin H. Johnson
ac2391e0cb net/vlan: Fix mtu setting
Fix minor shell typo that broke setting mtu on vlans.

X-Gentoo-Bug: 392971
X-Gentoo-Bug-URL: https://bugs.gentoo.org/392971
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-12-12 22:52:09 -08:00