mirror of
https://github.com/openharmony/kernel_common_modules_newip.git
synced 2026-07-19 16:43:31 -04:00
@@ -1,3 +1,3 @@
|
||||
# enable btdev:
|
||||
# kernel/linux/linux-5.10/drivers/net/Makefile add obj-y += bt/
|
||||
# kernel/linux/linux-5.10/drivers/net/Makefile add obj-y += bt/ or obj-$(CONFIG_NEWIP) += bt/
|
||||
obj-y += btdev.o
|
||||
|
||||
@@ -96,6 +96,12 @@ static struct ninet_ifaddr *nip_add_addr(struct ninet_dev *idev,
|
||||
goto rcu_lock_out;
|
||||
}
|
||||
|
||||
if (!netif_running(idev->dev)) {
|
||||
nip_dbg("network interface is not running");
|
||||
err = -ENODEV;
|
||||
goto rcu_lock_out;
|
||||
}
|
||||
|
||||
if (idev->cnf.disable_nip) {
|
||||
err = -EACCES;
|
||||
goto rcu_lock_out;
|
||||
|
||||
@@ -428,7 +428,13 @@ static struct nip_rt_info *nip_route_info_create(struct nip_fib_config *cfg)
|
||||
nip_dbg("fail to get ninet dev (ifindex=%u)", cfg->fc_ifindex);
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Do not add a route when the network port is not running
|
||||
* to avoid incorrect route selection
|
||||
*/
|
||||
if (!netif_running(idev->dev)) {
|
||||
nip_dbg("network interface is not running");
|
||||
goto out;
|
||||
}
|
||||
if (cfg->fc_metric == 0)
|
||||
cfg->fc_metric = NIP_RT_PRIO_USER;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user