Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem with ipv4+ipv6 and multiple ssid hostapd(workaround)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Tender
Tux's lil' helper
Tux's lil' helper


Joined: 05 Nov 2005
Posts: 138

PostPosted: Sat Oct 03, 2015 6:42 pm    Post subject: Problem with ipv4+ipv6 and multiple ssid hostapd(workaround) Reply with quote

Hello,

hostapd.conf

Code:

interface=wlp0s29f7u6
...
ssid=pizzapazzapizza
wpa_passphrase=............
wpa=2
...
bss=wlp0s29f7u6_0
ssid=pazzapizzapazza
wpa_passphrase=........
wpa=2
...


/etc/conf.d/net

Code:

...
config_wlp0s29f7u6="192.168.8.254/24 2001:1418:12b:3::1/64"
config_wlp0s29f7u6_0="192.168.7.254/24 2001:1418:12b:2::1/64"
...


I get

Code:

#ip addr
...
10: wlp0s29f7u6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether b0:48:7a:94:de:86 brd ff:ff:ff:ff:ff:ff
    inet 192.168.8.254/24 brd 192.168.8.255 scope global wlp0s29f7u6
       valid_lft forever preferred_lft forever
    inet6 fe80::b248:7aff:fe94:de86/64 scope link
       valid_lft forever preferred_lft forever
12: wlp0s29f7u6_0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether b0:48:7a:94:de:87 brd ff:ff:ff:ff:ff:ff
    inet 192.168.7.254/24 brd 192.168.7.255 scope global wlp0s29f7u6_0
       valid_lft forever preferred_lft forever
    inet6 2001:1418:12b:2::1/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::b248:7aff:fe94:de87/64 scope link
       valid_lft forever preferred_lft forever
...


Why ip 2001:1418:12b:3::1 is not set in wlp0s29f7u6 ?

Thanks

Bug reported, https://bugs.gentoo.org/show_bug.cgi?id=562602


Last edited by Tender on Sat Jan 23, 2016 4:39 pm; edited 3 times in total
Back to top
View user's profile Send private message
Tender
Tux's lil' helper
Tux's lil' helper


Joined: 05 Nov 2005
Posts: 138

PostPosted: Sat Oct 10, 2015 8:59 am    Post subject: Reply with quote

Patched moving the ipv6 stuff from config_ to postup()

/etc/init.d/net
Code:

...
config_wlp0s29f7u6="192.168.8.254/24"
config_wlp0s29f7u6_0="192.168.7.254/24"
...
postup() {
        if [ "${IFACE}" == "wlp0s29f7u6_0" ]
        then
            /bin/ip addr add 2001:1418:12b:2::1/64 dev ${IFACE}
            /bin/ip addr add 2001:1418:12b:3::1/64 dev wlp0s29f7u6
        fi
        return 0
}
...
Back to top
View user's profile Send private message
Tender
Tux's lil' helper
Tux's lil' helper


Joined: 05 Nov 2005
Posts: 138

PostPosted: Sat Jan 23, 2016 9:40 am    Post subject: Reply with quote

Better handling ipv4 and ipv6 by bridging the interfaces, edit /etc/conf.d/net removing postup stuff showed in the previous post and adding bridging:

Code:


...
modules_wlp0s29f7u6="!iwconfig !wpa_supplicant"
config_wlp0s29f7u6="null"
routes_wlp0s29f7u6=""

modules_wlp0s29f7u6_0="!iwconfig !wpa_supplicant"
config_wlp0s29f7u6_0="null"
routes_wlp0s29f7u6_0=""

bridge_br0="wlp0s29f7u6"
brctl_br0="setfd 0
sethello 10
stp off"
depend_br0() {
    need net.wlp0s29f7u6
}
config_br0="192.168.8.254/24 2001:1418:12b:2::1/64"
routes_br0=""

bridge_br1="wlp0s29f7u6_0"
brctl_br1="setfd 0
sethello 10
stp off"
depend_br1() {
    need net.wlp0s29f7u6_0
}
config_br1="192.168.9.254/24 2001:1418:12b:3::1/64"
routes_br1=""
...


add also the bridge handling, in /etc/init.d/hostapd:

Code:

...
start_post() {
    /etc/init.d/net.br0 start
    /etc/init.d/net.br1 start
}

stop_pre() {
    /etc/init.d/net.br0 stop
    /etc/init.d/net.br1 stop
}
...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum