mirror of
				https://github.com/Telecominfraproject/wlan-ap.git
				synced 2025-10-30 18:07:52 +00:00 
			
		
		
		
	ucentral-schema: update to latest HEAD
9338ea9 bridge-vlan: track wan ports behind swconfig Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
		| @@ -78,7 +78,8 @@ function event(object, verb, payload) { | |||||||
| 		}); | 		}); | ||||||
| } | } | ||||||
|  |  | ||||||
| let handlers = { | let handlers; | ||||||
|  | handlers = { | ||||||
| 	'sta-authorized': function(notify, hapd) { | 	'sta-authorized': function(notify, hapd) { | ||||||
| 		/* force FDB flush on QCA Wifi-6 silicon */ | 		/* force FDB flush on QCA Wifi-6 silicon */ | ||||||
| 		system(`echo ${notify.data.address} > /sys/kernel/debug/ssdk_flush_mac`); | 		system(`echo ${notify.data.address} > /sys/kernel/debug/ssdk_flush_mac`); | ||||||
| @@ -118,7 +119,30 @@ let handlers = { | |||||||
| 		}); | 		}); | ||||||
| 	},  | 	},  | ||||||
|  |  | ||||||
|  | 	vlan_add_swconfig: function(notify) { | ||||||
|  | 		let msg = {                              | ||||||
|  | 			name: notify.data.ifname,    | ||||||
|  | 			'link-ext': true,            | ||||||
|  | 			vlan: [ `${notify.data.vlan_id}:u` ]   | ||||||
|  | 		};                                           | ||||||
|  | 		ubus.call('network.interface.up_none', 'add_device', msg);           | ||||||
|  |  | ||||||
|  | 		msg = {                           | ||||||
|  | 			name: 'eth0.' + notify.data.vlan_id, | ||||||
|  | 			vlan: [ `${notify.data.vlan_id}:u` ] | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		ubus.call('network.interface.up_none', 'add_device', msg); | ||||||
|  |  | ||||||
|  | 		let cmd = 'swconfig dev ' + config.config.swconfig + ' vlan ' + notify.data.vlan_id + ' set ports \"' + join(' ', config.config.swconfig_ports) + '\"'; | ||||||
|  | 		system(cmd);                                                                                                                                            | ||||||
|  | 		system('swconfig dev ' + config.config.swconfig + ' set apply');     | ||||||
|  | 	}, | ||||||
|  |  | ||||||
| 	vlan_add: function(notify) { | 	vlan_add: function(notify) { | ||||||
|  | 		if (config.config.swconfig) | ||||||
|  | 			return handlers.vlan_add_swconfig(notify); | ||||||
|  |  | ||||||
| 		for (let wan in wan_ports) { | 		for (let wan in wan_ports) { | ||||||
| 			let msg = { | 			let msg = { | ||||||
| 				name: wan, | 				name: wan, | ||||||
|   | |||||||
| @@ -4,10 +4,10 @@ PKG_NAME:=ucentral-schema | |||||||
| PKG_RELEASE:=1 | PKG_RELEASE:=1 | ||||||
|  |  | ||||||
| PKG_SOURCE_URL=https://github.com/Telecominfraproject/wlan-ucentral-schema.git | PKG_SOURCE_URL=https://github.com/Telecominfraproject/wlan-ucentral-schema.git | ||||||
| PKG_MIRROR_HASH:=e5f1001047a601d68c236be740470766dbeab40852093d3c57102a2edc761eb2 | PKG_MIRROR_HASH:=b755e945d2e50f2c3607d44492227b41c4d38026068ad7dd554be5c4412772ce | ||||||
| PKG_SOURCE_PROTO:=git | PKG_SOURCE_PROTO:=git | ||||||
| PKG_SOURCE_DATE:=2022-05-29 | PKG_SOURCE_DATE:=2022-05-29 | ||||||
| PKG_SOURCE_VERSION:=75222fea7044e4b08a870aeb3284838efd7b6d9f | PKG_SOURCE_VERSION:=9338ea9cefeec3f4bf40cd1f7d0755f6caa131fb | ||||||
| PKG_MAINTAINER:=John Crispin <john@phrozen.org> | PKG_MAINTAINER:=John Crispin <john@phrozen.org> | ||||||
| PKG_LICENSE:=BSD-3-Clause | PKG_LICENSE:=BSD-3-Clause | ||||||
|  |  | ||||||
|   | |||||||
| @@ -34,27 +34,6 @@ | |||||||
| 			], | 			], | ||||||
| 			"ipv4": { | 			"ipv4": { | ||||||
| 				"addressing": "dynamic" | 				"addressing": "dynamic" | ||||||
| 			} |  | ||||||
| 		}, |  | ||||||
| 		{ |  | ||||||
| 			"name": "LAN", |  | ||||||
| 			"role": "downstream", |  | ||||||
| 			"services": [ "http", "ssh" ], |  | ||||||
| 			"ethernet": [ |  | ||||||
| 				{ |  | ||||||
| 					"select-ports": [ |  | ||||||
| 						"LAN*" |  | ||||||
| 					] |  | ||||||
| 				} |  | ||||||
| 			], |  | ||||||
| 			"ipv4": { |  | ||||||
| 				"addressing": "static", |  | ||||||
| 				"subnet": "192.168.1.1/24", |  | ||||||
| 				"dhcp": { |  | ||||||
| 					"lease-first": 10, |  | ||||||
| 					"lease-count": 100, |  | ||||||
| 					"lease-time": "6h" |  | ||||||
| 				} |  | ||||||
| 			}, | 			}, | ||||||
| 			"ssids": [ | 			"ssids": [ | ||||||
| 				{ | 				{ | ||||||
| @@ -84,6 +63,27 @@ | |||||||
| 					} | 					} | ||||||
| 				} | 				} | ||||||
| 			] | 			] | ||||||
|  | 		}, | ||||||
|  | 		{ | ||||||
|  | 			"name": "LAN", | ||||||
|  | 			"role": "downstream", | ||||||
|  | 			"services": [ "http", "ssh" ], | ||||||
|  | 			"ethernet": [ | ||||||
|  | 				{ | ||||||
|  | 					"select-ports": [ | ||||||
|  | 						"LAN*" | ||||||
|  | 					] | ||||||
|  | 				} | ||||||
|  | 			], | ||||||
|  | 			"ipv4": { | ||||||
|  | 				"addressing": "static", | ||||||
|  | 				"subnet": "192.168.1.1/24", | ||||||
|  | 				"dhcp": { | ||||||
|  | 					"lease-first": 10, | ||||||
|  | 					"lease-count": 100, | ||||||
|  | 					"lease-time": "6h" | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
| 		} | 		} | ||||||
| 	], | 	], | ||||||
| 	"services": { | 	"services": { | ||||||
|   | |||||||
| @@ -184,6 +184,7 @@ let state_handler = { | |||||||
| let ubus_methods = { | let ubus_methods = { | ||||||
| 	set: { | 	set: { | ||||||
| 		call: function(req) { | 		call: function(req) { | ||||||
|  | 			ulog(LOG_INFO, 'state %s -> %s\n', current_state, req.args.state); | ||||||
| 			if (current_state == req.args.state) | 			if (current_state == req.args.state) | ||||||
| 				return; | 				return; | ||||||
| 			if (!state_handler[req.args.state]) | 			if (!state_handler[req.args.state]) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 John Crispin
					John Crispin