openwisp / openwisp/netjsonconfig
Fix usage of mac address patterns in schema.py to allow using variables
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 388
- Forks
- 87
- Avg merge
- 1h 26m
- Merged PRs (30d)
- 4
Description
Hello,
Everytime i try to add a variable to BSSID field on a WiFi interface configured as station,
It breaks the JSON configuration after/during saving.
ie,
{
"wireless": {
"network": [
"lan"
],
"mode": "station",
"radio": "radio1",
"ssid": "{{wireless_wlan0sta_ssid}}",
"bssid": "00:11:22:33:44:55",
"wds": true,
"encryption": {
"protocol": "wpa2_personal",
"key": "{{wireless_wlan0sta_key}}",
"cipher": "ccmp",
"ieee80211w": "1"
}
},
"type": "wireless",
"name": "radio1sta",
"network": "wlan1sta"
},
becomes
{
"type": "ethernet",
"name": "radio1sta",
"network": "wlan1sta",
"wireless": {
"network": [
"lan"
],
"mode": "station",
"radio": "radio1",
"ssid": "{{wireless_wlan1sta_ssid}}",
"bssid": "{{wireless_wlan1sta_bsid}}",
"wds": true,
"encryption": {
"protocol": "wpa2_personal",
"key": "{{wireless_wlan1sta_key}}",
"cipher": "ccmp",
"ieee80211w": "1"
}
}
}
I haven't looked at the code but i can try make a PR sometime later if i find the issue
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in schema.py and reproduce the save operation using the station WiFi configuration shown in the issue, focusing on the MAC address pattern handling for the BSSID field. Done means a variable in BSSID remains intact after saving and the resulting configuration remains valid JSON.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100