mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 23:09:34 +01:00
netconfig: Check l_rtnl_address_get_address return
This commit is contained in:
parent
03b48b5621
commit
45c7aa0d18
@ -895,10 +895,11 @@ static void netconfig_ipv4_acd_event(enum l_acd_event event, void *user_data)
|
|||||||
|
|
||||||
static void netconfig_ipv4_select_and_install(struct netconfig *netconfig)
|
static void netconfig_ipv4_select_and_install(struct netconfig *netconfig)
|
||||||
{
|
{
|
||||||
netconfig->v4_address = netconfig_get_static4_address(netconfig);
|
|
||||||
if (netconfig->v4_address) {
|
|
||||||
char ip[INET6_ADDRSTRLEN];
|
char ip[INET6_ADDRSTRLEN];
|
||||||
|
|
||||||
|
netconfig->v4_address = netconfig_get_static4_address(netconfig);
|
||||||
|
if (netconfig->v4_address &&
|
||||||
|
l_rtnl_address_get_address(netconfig->v4_address, ip)) {
|
||||||
netconfig->rtm_protocol = RTPROT_STATIC;
|
netconfig->rtm_protocol = RTPROT_STATIC;
|
||||||
netconfig->acd = l_acd_new(netconfig->ifindex);
|
netconfig->acd = l_acd_new(netconfig->ifindex);
|
||||||
l_acd_set_event_handler(netconfig->acd,
|
l_acd_set_event_handler(netconfig->acd,
|
||||||
@ -908,8 +909,6 @@ static void netconfig_ipv4_select_and_install(struct netconfig *netconfig)
|
|||||||
l_acd_set_debug(netconfig->acd, do_debug,
|
l_acd_set_debug(netconfig->acd, do_debug,
|
||||||
"[ACD] ", NULL);
|
"[ACD] ", NULL);
|
||||||
|
|
||||||
l_rtnl_address_get_address(netconfig->v4_address, ip);
|
|
||||||
|
|
||||||
if (!l_acd_start(netconfig->acd, ip)) {
|
if (!l_acd_start(netconfig->acd, ip)) {
|
||||||
l_error("failed to start ACD, continuing anyways");
|
l_error("failed to start ACD, continuing anyways");
|
||||||
l_acd_destroy(netconfig->acd);
|
l_acd_destroy(netconfig->acd);
|
||||||
|
Loading…
Reference in New Issue
Block a user