Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 266659 - sys-apps/openrc-0.4.3: /etc/conf.d/net config statements cannot contain anything but a single IP address at a time (anymore)
Summary: sys-apps/openrc-0.4.3: /etc/conf.d/net config statements cannot contain anyth...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard: openrc:oldnet:net.lo due:2011/01/01
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-18 17:32 UTC by Christophe Saout
Modified: 2010-12-15 21:04 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christophe Saout 2009-04-18 17:32:00 UTC
Writing this into /etc/conf.net:

modules=( "iproute2" )

iptunnel_tunnel="mode sit remote 192.168.2.1 local 192.168.1.1 dev eth0 ttl 64"
config_tunnel=( "2001:6f8:abcd:2::1/128 peer 2001:6f8:abcd:1::1" )

gives:

* Bringing up interface tunnel
*   Creating tunnel tunnel...                                             [ ok ]
*   2001:6f8:abcd:2::1/128...                                             [ ok ]
*   peer...
*     nothing provides `peer'                                             [ !! ]
*   2001:6f8:abcd:1::1...                                                 [ ok ]


Reproducible: Always

Steps to Reproduce:
create some tunnel or device and attempt to pass more arguments to the "config_device" line than just an IP address.
(in my case it's an IPV6 in IPV4 sit tunnel where I am trying to pass the peer address)




This is with baselayout-2.0.0 and openrc-0.4.3-r2.

This works on some older machine (non-openrc) and from the various documentations is supposed to work.

Note that the code seems to interpret each space-separated token in the config as an individual IP address to pass to the "ip addr add" command, instead of passing whole lines as argument to the calls.
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-04-20 19:13:24 UTC
Please don't use arrays in openrc's net-config. Does your setup work, when you change the "config_tunnel" line like this?

  config_tunnel="2001:6f8:abcd:2::1/128 peer 2001:6f8:abcd:1::1"
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-04-23 17:48:16 UTC
Please try my suggestion and if it still fails, reopen this bug.
Comment 3 Benedikt Böhm (RETIRED) gentoo-dev 2009-06-14 19:26:21 UTC
this bug still exists in 0.4.3-r3. neither of the following works:

config_eth0=( "1.2.3.4 peer 1.2.3.1" )
config_eth0="1.2.3.4 peer 1.2.3.1"
config_eth0="'1.2.3.4 peer 1.2.3.1'"
config_eth0='"1.2.3.4 peer 1.2.3.1"'
Comment 4 Benedikt Böhm (RETIRED) gentoo-dev 2009-06-14 19:43:39 UTC
the solution is to add 'peer' to the list in line 405 of /etc/init.d/net
Comment 5 Petr Lanc 2009-07-25 21:19:40 UTC
I have problem with point-to-point device too. I have two machines, one with baselayout-1 and one with newly installed baselaout-2 and openrc-0.4.3-r3. before I installed baselayout-2 and openrc, tun devices + ssh tunnel works just fine, but after miggration to openrc+bl2, it stop works. I tried add 'peer' to line 405, like Benedisk say, but it doesn't resolve problem. I look on tun interface, i used a it looks, initscript doesn't add corrent flags to iface:

BS2 machine:

tuntap_tun1="tun"
config_tun1="192.168.12.1 peer 192.168.12.2/30"

BS1 machine:

tuntap_tun0="tun"
config_tun0=( "192.168.12.2 peer 192.168.12.1/30" )
routes_tun0=( "10.0.0.0/8 via 192.168.12.1" )

But configured interface looks diffrently:

BS2 machine:

drak ~ # ip addr
...
19: tun1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 500
    link/ether 9a:76:b1:81:b0:ea brd ff:ff:ff:ff:ff:ff
    inet 192.168.12.1 peer 192.168.12.2/30 brd 192.168.12.3 scope global tun1

drak ~ # ip link
...
19: tun1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 500
    link/ether 9a:76:b1:81:b0:ea brd ff:ff:ff:ff:ff:ff

BS1 machine:

shana ~ # ip addr
...
9: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 100
    link/[65534]
    inet 192.168.12.2 peer 192.168.12.1/30 brd 192.168.12.3 scope global tun0

shana ~ # ip link
...
9: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 100
    link/[65534]

It looks, like it doesn't correctly set pointopoint flags.
Comment 6 SpanKY gentoo-dev 2009-11-14 03:44:24 UTC
what is your /bin/sh pointing to ?  is this still an issue with openrc-0.5.x ?
Comment 7 Christohper Harrington 2009-12-16 02:25:34 UTC
(In reply to comment #6)
> what is your /bin/sh pointing to ?  is this still an issue with openrc-0.5.x ?
> 

$ emerge -pv openrc baselayout
[ebuild   R   ] sys-apps/baselayout-2.0.1  USE="-build" 0 kB
[ebuild   R   ] sys-apps/openrc-0.5.3  USE="unicode -debug -ncurses -pam" 0 kB

$ ls -lah /bin/sh
lrwxrwxrwx 1 root root 4 Oct 26 19:39 /bin/sh -> bash

This is still an issue.

$ fgrep tun /etc/conf.d/net
#config_tun8="172.18.252.8 pointopoint 172.18.252.128"
config_tun8="172.18.252.8 peer 172.18.252.128"
routes_tun8="172.19.1.1/24 via 172.18.252.128"

Comment 8 nixscripter 2010-05-06 02:49:30 UTC
I use sys-apps/usermode-utilities instead, and it doesn't work for me, either. It's not even a point-to-point device! But strangely, I have baselayout-1. Maybe it's something else?

# fgrep 'tun' /etc/conf.d/net
tuntap_tun0="tun"
config_tun0="192.168.2.25 peer 192.168.97.13"
# ifconfig tun0
tun0      Link encap:Ethernet  HWaddr ba:f7:00:21:28:45  
          inet addr:192.168.2.25  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::b8f7:ff:fe21:2845/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:17 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
# equery l baselayout
[I--] [  ] sys-apps/baselayout-1.12.11.1 (0)
Comment 9 Hodur 2010-06-09 15:21:58 UTC
(In reply to comment #4)
> the solution is to add 'peer' to the list in line 405 of /etc/init.d/net
> 

Any news about official patch? Still bug in 0.6.1-r1
Comment 10 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-08-05 00:09:05 UTC
This works for me in 0.6.1-r1:
config_eth2="192.168.12.2 peer 192.168.12.1/30
192.168.13.2 peer 192.168.13.1/30"

# ip addr show dev eth2
4: eth2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
    link/ether 00:22:15:06:39:89 brd ff:ff:ff:ff:ff:ff
    inet 192.168.12.2 peer 192.168.12.1/30 brd 192.168.12.3 scope global eth2
    inet 192.168.13.2 peer 192.168.13.1/30 brd 192.168.13.3 scope global eth2

You MUST use newline as the seperator.

Please test ASAP and report back. If no response by 2010/08/18, I will close as WORKSFORME.
Comment 11 nixscripter 2010-08-05 00:54:59 UTC
After upgrading to baselayout-2 and openrc--0.6.1-r1, it works for me -- but only with the line 405 hack.

Why not make that official? Is there an alternate syntax or other tunneling method (besides openvpn)?
Comment 12 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-12-12 02:30:17 UTC
should be fixed in commit 7f7baa6.
please test openrc-9999 and report back.
Comment 13 nixscripter 2010-12-15 16:12:28 UTC
Now I'm getting "pointtopoint: unknown host", but I assume that this is a configuration error on my part, and the bug is fixed.
Comment 14 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-12-15 21:04:41 UTC
More fixes in place now,
valid testcases:
config_IFVAR="10.0.0.1 peer 1.1.1.1"
config_IFVAR="10.0.0.1 pointopoint 1.1.1.1"

The following style is not valid, as it's rejected by the kernel
config_IFVAR="2001:6f8:abcd:2::1/128 peer 2001:6f8:abcd:1::1"

(using my own IPv6 blocks)
# ip addr add 2001:0470:a:2f2::2/64 peer 2001:0470:a:2f2::1 dev tun0
RTNETLINK answers: Invalid argument

I did discover one typo, "pointtopoint" should have been "pointopoint", it's been a bug since at least 2007. Fixed in commit 12a91636.

Please test the latest Git tip, f84d99 and reopen if problems persist.