discover/network: Ensure interfaces have device before configuring
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>
Wed, 21 Dec 2016 04:46:09 +0000 (15:46 +1100)
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>
Thu, 12 Jan 2017 04:37:17 +0000 (15:37 +1100)
commit0e2792afaf5a2d576ed12b965468069819057c07
tree6a807e862bf464a3d8467dd6e40564811a2b0fd4
parent3d7ccc23cb49d5f8e371dcf6580b78bb78b77046
discover/network: Ensure interfaces have device before configuring

Reorganise network_handle_nlmsg() slightly to create interface->dev just
before calling configure_interface() rather than only for brand new
interfaces. This ensures existing interfaces which have had ->dev
removed but receive a new configure event do not access a NULL pointer
during the configuration process.

Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
discover/network.c