aboutsummaryrefslogtreecommitdiff
path: root/shared/auto/macsec
diff options
context:
space:
mode:
Diffstat (limited to 'shared/auto/macsec')
-rw-r--r--shared/auto/macsec/init.wpa_supplicant_macsec.rc22
-rw-r--r--shared/auto/macsec/wpa_supplicant_macsec.conf15
2 files changed, 37 insertions, 0 deletions
diff --git a/shared/auto/macsec/init.wpa_supplicant_macsec.rc b/shared/auto/macsec/init.wpa_supplicant_macsec.rc
new file mode 100644
index 000000000..c5b30f676
--- /dev/null
+++ b/shared/auto/macsec/init.wpa_supplicant_macsec.rc
@@ -0,0 +1,22 @@
+# Copyright (C) 2023 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+on late-fs
+ wait /sys/class/net/eth1
+ start wpa_supplicant_macsec
+
+service wpa_supplicant_macsec /vendor/bin/hw/wpa_supplicant_macsec \
+ -i eth1 -Dmacsec_linux -c /vendor/etc/wpa_supplicant_macsec.conf
+ user root
+ oneshot
diff --git a/shared/auto/macsec/wpa_supplicant_macsec.conf b/shared/auto/macsec/wpa_supplicant_macsec.conf
new file mode 100644
index 000000000..2f4cb0410
--- /dev/null
+++ b/shared/auto/macsec/wpa_supplicant_macsec.conf
@@ -0,0 +1,15 @@
+eapol_version=3
+ap_scan=0
+fast_reauth=1
+# Example configuration for MACsec with preshared key
+# mka_cak is not actual key but index for HAL
+network={
+ key_mgmt=NONE
+ eapol_flags=0
+ macsec_policy=1
+ macsec_replay_protect=1
+ macsec_replay_window=0
+ mka_cak=00000000000000000000000000000001
+ mka_ckn=31323334
+ mka_priority=128
+}