Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102834995
D35143.id106670.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
966 B
Referenced Files
None
Subscribers
None
D35143.id106670.diff
View Options
Index: usr.sbin/bhyve/net_backends.c
===================================================================
--- usr.sbin/bhyve/net_backends.c
+++ usr.sbin/bhyve/net_backends.c
@@ -980,7 +980,7 @@
void *param)
{
struct net_backend **pbe, *nbe, *tbe = NULL;
- const char *value;
+ const char *value, *type;
char *devname;
int err;
@@ -988,14 +988,22 @@
if (value == NULL) {
return (-1);
}
+
devname = strdup(value);
+ /* use the type hint given by configuration if exists */
+ type = get_config_value_node(nvl, "type");
+ if (type == NULL) {
+ /* otherwise derive from the devname */
+ type = devname;
+ }
+
/*
* Find the network backend that matches the user-provided
* device name. net_backend_set is built using a linker set.
*/
SET_FOREACH(pbe, net_backend_set) {
- if (strncmp(devname, (*pbe)->prefix,
+ if (strncmp(type, (*pbe)->prefix,
strlen((*pbe)->prefix)) == 0) {
tbe = *pbe;
assert(tbe->init != NULL);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 7:06 PM (21 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14703304
Default Alt Text
D35143.id106670.diff (966 B)
Attached To
Mode
D35143: Bhyve virtio-net: Allow backend type to be explicitly specified.
Attached
Detach File
Event Timeline
Log In to Comment