Commit Graph

141 Commits

Author SHA1 Message Date
William Hubbs
8ea1190486 ip6to4: set correct subnet mask
The correct setting for this is /48.

Reported-by: MaratIK <marat.buharov@gmail.com>
X-Gentoo-Bug: 392723
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=392723
2011-12-09 21:57:00 -06:00
William Hubbs
a1c655949f iproute2: set a default broadcast address if none is specified
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-12-09 20:49:26 -06:00
William Hubbs
483db945e1 Fix typo 2011-11-23 08:17:33 -06:00
William Hubbs
76fec58633 pass the per-interface metric to resolvconf
Reported-by: Alon Bar-Lev <alon.barlev@gmail.com>
x-Gentoo-Bug: 364907
x-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?364907
2011-11-22 08:50:26 -06:00
Mike Frysinger
ef1ff1b4f2 make shell math operations style more succulent
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-11-19 02:25:36 -05:00
William Hubbs
5066d40ac8 Use pattern rules instead of suffix rules
Rework the makefiles to use pattern rules instead of suffix rules.
This is the preferred way to write implicit rules according to the gnu
make manual.
2011-10-29 09:43:24 -05:00
Stef Simoens
f94e883633 Add macvlan support
X-Gentoo-Bug: 384029
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=384029
2011-10-26 11:28:39 -05:00
Mike Frysinger
9a539ebbe1 further clean up OS differences in makefiles
No need for if() logic.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-10-20 14:32:37 -05:00
William Hubbs
9c77502f96 Make variable references in Makefiles consistent
Some variable references were written as $(foo), but the majority were
written as ${foo}. This commit changes all of the variable references
to using braces.
2011-10-19 12:22:23 -05:00
William Hubbs
ecf77254bb consolodate Makefiles
The tree contained many operating system specific Makefiles which were
being included in other Makefiles. This commit removes those and adds
the code to the makefiles which included them using make's conditional
processing.

X-Gentoo-Bug: 387441
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=387441
2011-10-18 03:23:00 -05:00
Robin H. Johnson
f6c27abeb5 net/vlan: respect txqueuelen/mac/broadcast/mtu options during creation.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-10-07 21:47:46 +00:00
Christian Ruppert
4b63929878 Shutdown VLAN's before the actual/parent interface
Make sure the VLAN interfaces as well as its rules will be removed prior
to the actual/parent interface.
The VLAN configs are gone in vlan_post_stop() already so we have to use
vlan_pre_stop() instead.

Reported-by: Bernd Bednarz <bernd.bednarz@avira.com>
X-Gentoo-Bug: 380603
X-Gentoo-Bug-URL: https://bugs.gentoo.org/380603
2011-09-21 13:26:47 +02:00
Christian Ruppert
29693ecb7a Refactoring of commit bf49e59e3e
Make sure the RPDB rules will be removed.
2011-09-21 03:57:09 +02:00
Yun Zheng Hu
bf49e59e3e Don't do anything if the interface doesn't exist
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-09-19 00:04:19 +02:00
Gilles Oivier
0e4d169a40 Fix the Internal Field Seperator when using ethtool
ethtool.sh didn't reset the Internal Field Seperator (IFS) properly.
It now does, by storing the old IFS to OIFS, which will be used later
in the for loop.

It also fixes the "ethtool_ring_<if>" option.

Reported-by: Alois Schmid <alois.schmid@gmx.de>
X-Gentoo-Bug: 368525
X-Gentoo-Bug-URL: https://bugs.gentoo.org/368525
2011-09-18 14:42:39 +02:00
Christian Ruppert
72e31e753d Improve missing openvpn/usermode-utilities warning message
as OpenRC can be used on other distributions as well.
2011-09-17 01:13:11 +02:00
Stefan Knoblich
645bbf2e0f Parse broadcast arp responses via arping (iputils) properly
ARP replies may/do contain two MAC addresses when using iputils's
arping so we have to use the first one because it's always the "From"
address - which is what we want.

Thanks to Stefan Knoblich <s.knoblich@axsentis.de> for the fixed pattern.

Reported-by: cl@exomail.to
X-Gentoo-Bug: 379181
X-Gentoo-Bug-URL: https://bugs.gentoo.org/379181
2011-09-17 00:16:10 +02:00
Christian Ruppert
539c4e5872 Print a warning if openvpn/tunctl are missing 2011-09-16 23:48:44 +02:00
Robin H. Johnson
6fa6f9523f Rewrite iproute2 addr argument parsing.
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-07-18 23:55:32 +00:00
Mike Frysinger
49f1a8702b eat trailing whitespace
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-04 18:27:00 -04:00
Mike Frysinger
d0bc4f20ad drop useless "All rights reserved" notice
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-29 19:46:31 -04:00
Mike Frysinger
c427d3c1fe net: ccwgroup: smooth up/down process
We need to bring the link up ourselves after we've properly configured
the device.  The common code tries to bring the link up itself, but it
does so before things are configured, and so it ends up failing.

When shutting down, we need to wait for the kernel to finish destroying
the interface.  Otherwise, when doing a restart, openrc is quick enough
to tell the kernel to destroy things, but then start trying to bring it
back up before the kernel has finished.

X-Gentoo-Bug: 367467
X-Gentoo-Bug-URL: http://bugs.gentoo.org/367467
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-28 00:02:11 -04:00
William Hubbs
fd48bc09ff net:bonding small style change for readability 2011-05-16 14:57:46 -05:00
Kfir Lavi
db1daa5857 Do not add slaves to bond interface if they are already added
X-Gentoo-Bug: 366653
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=366653
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2011-05-16 09:21:18 -04:00
Mike Frysinger
2493a1f32e net: ccwgroup: forward port changes from baselayout-1
Quite a bit of work happened in baselayout-1 on the ccwgroup module, but
seems it didn't make it into openrc.  So forward port all the existing
code so we can work with more than just qeth and layer2 options.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-05-16 01:22:32 -04:00
William Hubbs
b712a9161f change udhcpc support to busybox udhcpc
This updates the udhcpc support to use busybox's udhcpc instead of the
stand alone version.

I would like to thank jackieku <kjackie@gmail.com> for assisting with
this update.

X-Gentoo-Bug: 205286
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=205286
2011-04-26 15:25:08 -05:00
Robin H. Johnson
2d197357ef [oldnet] Bug #363959: Improve plug_timeout ifplugd/netplugd code.
- Add support for a global plug_timeout setting to match the
  documentation.
- Update the documentation to also show per-interface configuration.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-04-19 17:49:20 +00:00
William Hubbs
73c862b792 fix typo in ethtool.sh
This was causing the ethtool interface to not work.

X-Gentoo-Bug: 360481
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=360481
2011-04-07 07:48:56 -05:00
Marc Joliet
6e1239795f remove bashism from ethtool module
X-Gentoo-Bug: 360367
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=360367
2011-03-27 15:45:45 -05:00
Mike Frysinger
9f5eb03e5e net: bonding: avoid using bash string replace
X-Gentoo-Bug: 359311
X-Gentoo-Bug-URL: http://bugs.gentoo.org/359311
Reported-by: Raffaello D. Di Napoli <fastijum@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-03-18 14:24:18 -04:00
Robin H. Johnson
dfd42d1393 net/ethtool: official interface for changing ethtool params (bug #195479)
Implement a consistent interface for changing ethtool parameters, as
suggested in bug 195479. All variable names are based on the long option
to ethtool to set each group of parameters. Multiple entries seperated
by newlines are permitted for variable values.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Gentoo-Bug: 195479
2011-02-22 02:59:38 +00:00
Robin H. Johnson
20480048ca net/iproute2: Pass required explicit -6 for IPv6 tunnels (#347657)
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-21 09:55:47 +00:00
Robin H. Johnson
683a21b0a0 net/vlan: update to use modern iproute2 interface
This replaces the vlan setup code that previously used the old vconfig
binary with a new implementation using the iproute2 interface.

vconfig does not handle many of the newer setups. No automatic migration
path is provided, as altering the configuration is non-trivial.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Written-by: Guillaume Castagnino <casta@xwing.info>
X-Gentoo-Bug: 346365
2011-02-21 09:41:48 +00:00
Christian Wetzig
7bc920ab56 fix typo in iproute2 module
X-Gentoo-Bug: 354511
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=354511
2011-02-12 13:34:46 -06:00
Christian
43678fd2c4 bridge.sh: use correct POSIX test, = not ==
X-Gentoo-Bug: 353124
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=353124
2011-02-05 07:24:11 -06:00
Mike Frysinger
faa2df1159 more whitespace cleanup
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-17 04:49:12 -05:00
Robin H. Johnson
f84d997d4c Move the ip rule extra output to verbose mode only, and support verbose output on addresses and routes. 2010-12-15 13:02:04 -08:00
Robin H. Johnson
346148ceb8 Fix pointopoint->peer for iproute. 2010-12-15 12:40:21 -08:00
Robin H. Johnson
12a91636f4 Fix pointopoint typo in old ifconfig setup. 2010-12-15 12:37:50 -08:00
Robin H. Johnson
400b45d590 Final documentation cleanup for updated bridge code.
Specifically document how to handle the case of explicitly starting a
bridge and then dynamically adding interfaces to it.

brctl_br0=''
bridge_add_eth0='br0'
2010-12-12 00:58:47 +00:00
Robin H. Johnson
e07f0ef417 Merge support for Routing Policy Database (RPDB)
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-12-11 14:23:52 -08:00
Robin H. Johnson
dbb5af2023 Revamp of bridging code.
- Use sysfs to read bridge information from the system instead of
  parsing the brctl outputs.
- Allow setting of all bridge configuration parameters using new sysfs
  methods, modelled after bonding configuration. Also works for per-port
  bridge interface parameters.
- Document pre-starting an empty bridge for dynamic add.
- Check for interface existence before adding to bridge.
- Should fix bug #293046, #309185.
2010-12-11 12:26:38 -08:00
Robin H. Johnson
f8f03bdbbf Bug #345281: If wpa_supplicant is built w/ USE=dbus, we need to start after DBus is up. 2010-12-06 02:54:21 +00:00
William Hubbs
4ca32808dd Revert "allow ifplugd to work on wireless interfaces"
This reverts commit 4ea75dd1d6.
This caused a regression, see bug #345795.

Ifplugd is only designed to support wireless interfaces that use the
older wireless extentions.
2010-11-18 15:06:42 -06:00
Jory A. Pratt
68c021c424 ensure bonding interface is down before we attempt to configure, also
mode has to be configure before any other arguements are passed. Thanks
Ed Wildgoose <gentoo@wildgooses.com> for patch.
2010-10-31 16:40:54 -05:00
William Hubbs
4ea75dd1d6 allow ifplugd to work on wireless interfaces
this fixes bug #335494.
2010-09-14 19:37:52 -05:00
William Hubbs
f700243016 Revert "fix bug 266395"
This reverts commit 1a188f8f72.

This revert fixes bug #334663.
2010-09-02 09:42:11 -05:00
William Hubbs
23546e27d9 fix detection of renamed vlan interfaces
This fixes bug 327059, thanks to Jonathan for reporting this and for the patch.
2010-08-19 16:17:38 -05:00
William Hubbs
1a188f8f72 fix bug 266395
Do not stop wpa_supplicant or wpa_cli if they are in the background.
Thanks to Slava Gorbunov for the patch.
2010-08-18 15:01:23 -05:00
Anthony G. Basile
89829f6d7c Fixes bug #332383. Thanks Lutz Heermann. 2010-08-13 17:42:23 -04:00