mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-23 06:02:37 +01:00
netconfig: make ROUTE_PRIORITY_OFFSET a uint32_t
Also move it up into the static variable block
This commit is contained in:
parent
1fd0dbb74b
commit
66b5541970
@ -59,6 +59,12 @@ struct netconfig_ifaddr {
|
|||||||
static struct l_netlink *rtnl;
|
static struct l_netlink *rtnl;
|
||||||
static struct l_queue *netconfig_list;
|
static struct l_queue *netconfig_list;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Routing priority offset, configurable in main.conf. The route with lower
|
||||||
|
* priority offset is preferred.
|
||||||
|
*/
|
||||||
|
static uint32_t ROUTE_PRIORITY_OFFSET;
|
||||||
|
|
||||||
static void do_debug(const char *str, void *user_data)
|
static void do_debug(const char *str, void *user_data)
|
||||||
{
|
{
|
||||||
const char *prefix = user_data;
|
const char *prefix = user_data;
|
||||||
@ -361,12 +367,6 @@ static void netconfig_ifaddr_cmd_cb(int error, uint16_t type,
|
|||||||
netconfig_ifaddr_notify(type, data, len, user_data);
|
netconfig_ifaddr_notify(type, data, len, user_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Routing priority offset, configurable in main.conf. The route with lower
|
|
||||||
* priority offset is preferred.
|
|
||||||
*/
|
|
||||||
static int ROUTE_PRIORITY_OFFSET;
|
|
||||||
|
|
||||||
static void netconfig_route_cmd_cb(int error, uint16_t type,
|
static void netconfig_route_cmd_cb(int error, uint16_t type,
|
||||||
const void *data, uint32_t len,
|
const void *data, uint32_t len,
|
||||||
void *user_data)
|
void *user_data)
|
||||||
@ -789,7 +789,7 @@ static int netconfig_init(void)
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!l_settings_get_int(iwd_get_config(), "General",
|
if (!l_settings_get_uint(iwd_get_config(), "General",
|
||||||
"route_priority_offset",
|
"route_priority_offset",
|
||||||
&ROUTE_PRIORITY_OFFSET))
|
&ROUTE_PRIORITY_OFFSET))
|
||||||
ROUTE_PRIORITY_OFFSET = 300;
|
ROUTE_PRIORITY_OFFSET = 300;
|
||||||
|
Loading…
Reference in New Issue
Block a user