Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163947179
D7809.id20130.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D7809.id20130.diff
View Options
Index: sys/dev/hyperv/utilities/hv_kvp.c
===================================================================
--- sys/dev/hyperv/utilities/hv_kvp.c
+++ sys/dev/hyperv/utilities/hv_kvp.c
@@ -332,11 +332,15 @@
if (devclass_get_devices(devclass_find("hn"), &devs, &devcnt) == 0) {
for (devcnt = devcnt - 1; devcnt >= 0; devcnt--) {
- /* XXX access other driver's softc? are you kidding? */
+ /*
+ * GUID from host is like {90985724-3b88-4979-9832-7e03c5ee4d32},
+ * but NIC's GUID is like 90985724-3b88-4979-9832-7e03c5ee4d32,
+ * so in order to match them, '{}' should be handled.
+ */
device_t dev = devs[devcnt];
struct vmbus_channel *chan;
char buf[HYPERV_GUID_STRLEN];
-
+ char normal_buf[HYPERV_GUID_STRLEN + 2];
/*
* Trying to find GUID of Network Device
*/
@@ -344,7 +348,8 @@
hyperv_guid2str(vmbus_chan_guid_inst(chan),
buf, sizeof(buf));
- if (strncmp(buf, (char *)umsg->body.kvp_ip_val.adapter_id,
+ snprintf(normal_buf, HYPERV_GUID_STRLEN + 2, "{%s}", buf);
+ if (strncmp(normal_buf, (char *)umsg->body.kvp_ip_val.adapter_id,
HYPERV_GUID_STRLEN - 1) == 0) {
strlcpy((char *)umsg->body.kvp_ip_val.adapter_id,
device_get_nameunit(dev), MAX_ADAPTER_ID_SIZE);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jul 28, 9:38 AM (5 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35645193
Default Alt Text
D7809.id20130.diff (1 KB)
Attached To
Mode
D7809: hyperv/kvp: fix the issue of IP injection
Attached
Detach File
Event Timeline
Log In to Comment