discover/network: Stop udhcpc6 process on requery
diff mbox series

Message ID 20180817035642.29510-1-sam@mendozajonas.com
State Accepted
Headers show
Series
  • discover/network: Stop udhcpc6 process on requery
Related show

Commit Message

Samuel Mendoza-Jonas Aug. 17, 2018, 3:56 a.m. UTC
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
---
 discover/network.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Samuel Mendoza-Jonas Aug. 28, 2018, 7 a.m. UTC | #1
On Fri, 2018-08-17 at 13:56 +1000, Samuel Mendoza-Jonas wrote:
> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
> ---
>  discover/network.c | 6 ++++++
>  1 file changed, 6 insertions(+)

Merged as 9cf2baa0

> 
> diff --git a/discover/network.c b/discover/network.c
> index 2057525e..ed790025 100644
> --- a/discover/network.c
> +++ b/discover/network.c
> @@ -563,6 +563,12 @@ void network_requery_device(struct network *network,
>  		process_stop_async(interface->udhcpc_process);
>  		process_release(interface->udhcpc_process);
>  	}
> +	if (interface->udhcpc6_process) {
> +		interface->udhcpc6_process->exit_cb = NULL;
> +		interface->udhcpc6_process->data = NULL;
> +		process_stop_async(interface->udhcpc6_process);
> +		process_release(interface->udhcpc6_process);
> +	}
>  
>  	config = find_config_by_hwaddr(interface->hwaddr);
>

Patch
diff mbox series

diff --git a/discover/network.c b/discover/network.c
index 2057525e..ed790025 100644
--- a/discover/network.c
+++ b/discover/network.c
@@ -563,6 +563,12 @@  void network_requery_device(struct network *network,
 		process_stop_async(interface->udhcpc_process);
 		process_release(interface->udhcpc_process);
 	}
+	if (interface->udhcpc6_process) {
+		interface->udhcpc6_process->exit_cb = NULL;
+		interface->udhcpc6_process->data = NULL;
+		process_stop_async(interface->udhcpc6_process);
+		process_release(interface->udhcpc6_process);
+	}
 
 	config = find_config_by_hwaddr(interface->hwaddr);