[package] broadcom-wl: implement wpa_group_rekey option (mapped to nas -g)
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 9 Sep 2011 18:21:30 +0000 (18:21 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 9 Sep 2011 18:21:30 +0000 (18:21 +0000)
SVN-Revision: 28208

package/broadcom-wl/files/lib/wifi/broadcom.sh

index f4d5213969c35a55360f16eb49eef6c55d26d989..8fe801d59b7414c04659d9d0f99d5f35fd39b8b5 100644 (file)
@@ -236,8 +236,11 @@ enable_broadcom() {
                                        *tkip*) wsec=2;;
                                esac
 
+                               # group rekey interval
+                               config_get rekey "$vif" wpa_group_rekey
+
                                eval "${vif}_key=\"\$key\""
-                               nasopts="-k \"\$${vif}_key\""
+                               nasopts="-k \"\$${vif}_key\"${rekey:+ -g $rekey}"
                        ;;
                        *wpa*)
                                wsec_r=1
@@ -260,8 +263,11 @@ enable_broadcom() {
                                        *tkip*) wsec=2;;
                                esac
 
+                               # group rekey interval
+                               config_get rekey "$vif" wpa_group_rekey
+
                                eval "${vif}_key=\"\$key\""
-                               nasopts="-r \"\$${vif}_key\" -h $server -p ${port:-1812}"
+                               nasopts="-r \"\$${vif}_key\" -h $server -p ${port:-1812}${rekey:+ -g $rekey}"
                        ;;
                esac
                append vif_do_up "wsec $wsec" "$N"