Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107447510
D27505.id82833.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
D27505.id82833.diff
View Options
Index: sys/net/if_clone.c
===================================================================
--- sys/net/if_clone.c
+++ sys/net/if_clone.c
@@ -571,7 +571,7 @@
/*
* A utility function to extract unit numbers from interface names of
- * the form name###[.###].
+ * the form name###.
*
* Returns 0 on success and an error on failure.
*/
@@ -582,9 +582,7 @@
int cutoff = INT_MAX / 10;
int cutlim = INT_MAX % 10;
- if ((cp = strrchr(name, '.')) == NULL)
- cp = name;
- for (; *cp != '\0' && (*cp < '0' || *cp > '9'); cp++);
+ for (cp = name; *cp != '\0' && (*cp < '0' || *cp > '9'); cp++);
if (*cp == '\0') {
*unit = -1;
} else if (cp[0] == '0' && cp[1] != '\0') {
Index: sys/net/if_vlan.c
===================================================================
--- sys/net/if_vlan.c
+++ sys/net/if_vlan.c
@@ -993,11 +993,12 @@
proto = ETHERTYPE_VLAN;
/*
- * There are two ways to specify the cloned device:
+ * There are three ways to specify the cloned device:
* o pass a parameter block with the clone request.
+ * o specify parameters in the text of the clone device name
* o specify no parameters and get an unattached device that
* must be configured separately.
- * The first technique is preferred; the latter is supported
+ * The first technique is preferred; the latter two are supported
* for backwards compatibility.
*
* XXXRW: Note historic use of the word "tag" here. New ioctls may be
@@ -1018,13 +1019,14 @@
vid = vlr.vlr_tag;
proto = vlr.vlr_proto;
wildcard = (unit < 0);
+ } else if ((p = vlan_clone_match_ethervid(name, &vid)) != NULL) {
+ unit = -1;
+ wildcard = 0;
} else {
p = NULL;
error = ifc_name2unit(name, &unit);
if (error != 0)
return (error);
-
- wildcard = (unit < 0);
}
error = ifc_alloc_unit(ifc, &unit);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 15, 7:17 AM (2 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15807449
Default Alt Text
D27505.id82833.diff (1 KB)
Attached To
Mode
D27505: Fix subinterface vlan creation.
Attached
Detach File
Event Timeline
Log In to Comment