]> xenbits.xensource.com Git - people/pauldu/xenvif.git/commit
Replace copying network settings with identity stealing
authorPaul Durrant <paul.durrant@citrix.com>
Wed, 2 Mar 2016 16:35:47 +0000 (16:35 +0000)
committerPaul Durrant <paul.durrant@citrix.com>
Thu, 31 Mar 2016 13:52:14 +0000 (14:52 +0100)
commit04c391d9520dbb8d0d9036bea6892433e5658ae3
tree6132761332e3b47d9a6cc8ba423275b5928190d5
parent3f402a77506ddd27d1a0277ff74dcd48b0417099
Replace copying network settings with identity stealing

It is becoming increasingly hard to find all the places in the registry
that Windows uses to stash network settings and copy them from the
emulated NIC to the new PV device when it is first installed.

So, rather than fighting a losing battle, steal the identity of emulated
devices instead, The identity information is essentially contained in two
values stored in the 'software'registry key of a NIC (under Control/Class/
<NET GUID>): NetCfgInstanceId and the NET_LUID, made up of *IfType and
NetLuidIndex. By copying these values and the contents of the Linkage subkey
we can effectively impersonate the emulated NIC once it is unplugged after
reboot.

This patch amends the settings code accordingly and also does some tidying
in pdo.c and registry.c.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
src/xenvif/driver.c
src/xenvif/driver.h
src/xenvif/pdo.c
src/xenvif/registry.c
src/xenvif/settings.c
src/xenvif/settings.h