mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 17:42:41 +00:00
ucentral-event: add option82 handling
Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
@@ -134,6 +134,7 @@ let handlers = {
|
|||||||
vlan: [ `${notify.data.vlan_id}` ]
|
vlan: [ `${notify.data.vlan_id}` ]
|
||||||
};
|
};
|
||||||
ubus.call('network.interface.up_none', 'add_device', msg);
|
ubus.call('network.interface.up_none', 'add_device', msg);
|
||||||
|
ubus.call('dhcprelay', 'check_devices');
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -231,13 +232,23 @@ function dhcp_subscriber_remove_cb(remove) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function dhcp_relay_subscriber_notify_cb(notify) {
|
function dhcp_relay_subscriber_notify_cb(notify) {
|
||||||
printf('%.J\n', notify.data);
|
let ifname = split(notify.data.info.device, '-v');
|
||||||
return {
|
let hapd = hostapd[ifname[0]];
|
||||||
address: relay.config.server,
|
let vlan = ifname[1];
|
||||||
options: [
|
if (hapd) {
|
||||||
[ 62, "hello, world" ]
|
vlan ??= hapd.config.vlan_id;
|
||||||
]
|
let circuit_id = `${vlan}`;
|
||||||
};
|
let remote_id = hapd.bssid;
|
||||||
|
return {
|
||||||
|
address: relay['vlan' + vlan]?.server,
|
||||||
|
options: [
|
||||||
|
[ 82,
|
||||||
|
chr(1) + chr(length(circuit_id)) + circuit_id +
|
||||||
|
chr(2) + chr(length(remote_id)) + remote_id
|
||||||
|
]
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function dhcp_relay_subscriber_remove_cb(remove) {
|
function dhcp_relay_subscriber_remove_cb(remove) {
|
||||||
|
|||||||
Reference in New Issue
Block a user