Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 65417 - baselayout-1.11.0 wireless scripts remove IPv6 addresses and IPv6 autoconfiguration doesn't work after that
Summary: baselayout-1.11.0 wireless scripts remove IPv6 addresses and IPv6 autoconfigu...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 66472
  Show dependency tree
 
Reported: 2004-09-26 09:24 UTC by Joonas Kortesalmi
Modified: 2004-11-08 11:04 UTC (History)
1 user (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 Joonas Kortesalmi 2004-09-26 09:24:15 UTC
This could be prism54 specific but I don't have hardware to test if it is. The problem only occured with prism54 WLAN interface, not on-board LAN interface. Either the script relies on non-standard behaviour or prism54 doesn't handle the situation right.

Reproducible: Always
Steps to Reproduce:
1. Configure wireless network using the new baselayout-1.11.0.
2. start the interface
Actual Results:  
The script removes all IP addresses (including IPv6) from the interface. The
network driver (prism54) stops receiving IPv6 messages and IPv6 won't work.

Expected Results:  
The script should not have removed the link-local address or it should have
restored it OR prism54 driver should be able to reacquire the IPv6 addresses
after the script is finished. In any case, IPv6 should work with
auto-configuration after net.eth2 script (symlink to net.lo or net.eth0, tried
both) has started.

If I manually run
ip -6 addr add fe80::20d:54ff:fea2:4684/64 scope link dev eth2
it will get the IPv6 address and everything works. (note that the address being
added is specific to my network interface).
I tried the net.eth0 script with my LAN interface too and IPv6 worked there. I'm
not sure which behaviour is expected, to receive IPv6 messages or not (after all
IPv6 addresses are removed).
Comment 1 Aron Griffis (RETIRED) gentoo-dev 2004-10-24 21:47:46 UTC
still a problem with baselayout-1.11.3?
Comment 2 Joonas Kortesalmi 2004-10-25 12:51:44 UTC
sys-apps/baselayout-1.10.4  running, seems to work.
Comment 3 Joonas Kortesalmi 2004-10-25 13:05:10 UTC
krhm. sorry ;)   I should read what I'm saying first.

20:02|bovine~% sudo /etc/init.d/net.eth2 restart
 * Stopping eth2
 *    Bringing down eth2
 *       Releasing DHCP lease for eth2 ...                                [ ok ]
 *       Removing inet6 addresses
 *       eth2 inet6 del fe80::20d:54ff:fea2:4684/64
 *       Shutting down eth2 ...                                           [ ok ]
 *      Removing wireless configuration from eth2 ...                     [ ok ]
 * Starting eth2
 *    Configuring wireless network for eth2
 *    Scanning for access points
 *      Found "derbian" at 00:0D:88:91:B5:CB 
 *      Found "JATULINET" at 00:80:C8:23:27:05 
 *      Connecting to "derbian" (WEP Disabled) ...                        [ ok ]
 *      eth2 connected to "derbian" at 00:0D:88:91:B5:CB
 *      in managed mode on channel 1 (WEP disabled)
 *    Bringing up eth2
 *       eth2 dhcp
 *          Running dhcpcd ...                                            [ ok ]
 *          eth2 received address 192.168.3.239
20:04|bovine~% ifconfig
eth2      Link encap:Ethernet  HWaddr 00:0D:54:A2:46:84  
          inet addr:192.168.3.239  Bcast:192.168.3.255  Mask:255.255.255.0
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1

So it's still missing IPv6 address. no change.
Comment 4 Roy Marples (RETIRED) gentoo-dev 2004-10-26 03:28:54 UTC
Whats happening is that the wireless module is removing IP addresses so that DHCP always works. This is needed if you're running ifplugd or waproamd on a wireless interface using DHCP.

And AFAIK dhcpcd doesn't handle IPv6.
So if you need to set one by hand AND still use dhcpcd, set it in the postup function in /etc/conf.d/net

postup() {
   local iface=${1}
   if [[ ${iface} == eth2 ]]; then
      ip -6 addr add fe80::20d:54ff:fea2:4684/64 scope link dev eth2
   fi
}
Comment 5 Joonas Kortesalmi 2004-10-26 07:58:48 UTC
I don't need software support to get IPv6 addresses automatically (like DHCP for IPv4). I don't want to add my link-local address manually because it's MAC address based. A clean solution for this problem would be nice.

If the script's function is required for _DHCP_ (IPv4 only), why does it remove IPv6 addresses? If it only removed IPv4 addresses there wouldn't be a problem. Don't remove IPv6 addresses, problem solved?
Comment 6 Roy Marples (RETIRED) gentoo-dev 2004-10-27 04:38:52 UTC
postup() {
   local iface=${1}
   local mac=$( wireless_get_ap_mac_address ${iface} )

   if [[ ${mac} == 00:11:22:33:44:55 ]]; then
      ip -6 addr add fe80::20d:54ff:fea2:4684/64 scope link dev eth2
   fi
}

Or do you mean the IP6 address itself is based on the mac address?
How are you setting it anyway - before this new baselayout that is?
Comment 7 Joonas Kortesalmi 2004-10-27 06:49:23 UTC
I don't. Just add IPv6 support and _all_ interfaces get IPv6 addresses automatically. Try it. No configuration required. So my problem is that after the wireless script removes all IPs my interface won't get a new one automatically. Without the script it works fine :/
Comment 8 Roy Marples (RETIRED) gentoo-dev 2004-10-28 13:31:12 UTC
Sorry - I didn't know exactly what you were talking about.

I have a fix for it in the works.
Comment 9 Joonas Kortesalmi 2004-10-29 02:27:44 UTC
Cool, sorry for the nonprecise description. :)
Comment 10 Guillaume Castagnino 2004-10-31 10:26:13 UTC
I have a nearly similar problem with baselayout 1.11.4 and ipv6
I use static adresses (both ipv6 end ipv4). Here is my config :

> modules_eth0=( "iproute2" )
> 
> ipaddr_eth0=(
>     "2001:7a8:2b1b::28/48"
>     "192.168.6.28/24"
> )

but setting ipv6 adress fails when it has been removed on net.eth0 down :
 * Stopping eth0
 *    Bringing down eth0
 *       Removing inet6 addresses
 *       eth0 inet6 del fe80::207:e9ff:fed7:4361/64
 *       eth0 inet6 del 2001:7a8:2b1b::28/48
 *       Shutting down eth0 ...                                                                                             [ ok ]
r2d2 19:18 ~

En when reuping eth0 :
# /etc/init.d/net.eth0 start
 * Starting eth0
 *    Bringing up eth0
 *       eth0 2001:7a8:2b1b::28/48
RTNETLINK answers: Network is down

The same fix as indicated works well :
postup() {
    local iface=${1}
    if [[ ${iface} == eth0 ]]; then
        ip addr add 2001:7a8:2b1b::28/48 dev eth0
    fi
}
Comment 11 Guillaume Castagnino 2004-11-01 23:04:30 UTC
Just tested with baselayout 1.11.5, same probleme here :

 * Stopping eth0
 *    Bringing down eth0
 *       Shutting down eth0 ...                                           [ ok ]
 * Starting eth0
 *    Bringing up eth0
 *       eth0 192.168.6.28/24                                             [ ok ]
 *       eth0:1 2001:7a8:2b1b::28/48
RTNETLINK answers: Network is down                                        [ !! ]
 *    Adding routes

Same fix works.
But I do'nt understand :
> - scope:link inet6 addresses are ignored when testing is_up and
>       del_addresses - fixes bug #65417

this fix should indeed fix the bug...
I will investigate more
Comment 12 Guillaume Castagnino 2004-11-02 06:09:48 UTC
After a little bit more investigation :
configuring ipv4 adress works when iface is down whereas ipv6 fails :
# /etc/init.d/net.eth0 stop   
 * Stopping eth0
 *    Bringing down eth0
 *       Shutting down eth0 ...          [ ok ]
r2d2 15:04 ~
# ip addr add 192.168.6.28/24 dev eth0
r2d2 15:04 ~
# ip -6 addr add 2001:7a8:2b1b::28/48 dev eth0
RTNETLINK answers: Network is down

It's the same error I get when using the init script :
# /etc/init.d/net.eth0 start
 * Starting eth0
 *    Bringing up eth0
 *       eth0 192.168.6.28/24            [ ok ]
 *       eth0:1 2001:7a8:2b1b::28/48
RTNETLINK answers: Network is down

So, the solution seems to up the interface BEFORE setting it up (unless it's a iproute2 bug)

My iproute2 version :
# qpkg -v -I iproute2
sys-apps/iproute2-2.6.9.20040831 *
Comment 13 Roy Marples (RETIRED) gentoo-dev 2004-11-03 02:48:27 UTC
Guillaume - that's not quite the same bug

At present, you cannot setup ipv6 addresses using iproute2 correctly.
However, you can do this with ifconfig
inet6_eth0=( "2001:7a8:2b1b::28/48" )

I've got a fix for iproute2 todo this in CVS and I've also updated the documentation accordingly.
Comment 14 Roy Marples (RETIRED) gentoo-dev 2004-11-08 11:04:45 UTC
Fixed in baselayout-1.11.6