ifconfig: add vlanproto "qiniq" as an alias for "802.1ad"
QinQ is better known by this name, so accept it as an alias Reported-by: Mike Geiger Reviewed-by: melifaro, hselasky, rpokala MFC-with: 366917 Sponsored-by: Klara Inc. Differential-Revision: https://reviews.freebsd.org/D28245
This commit is contained in:
parent
d70886d063
commit
b84d0aaa4e
@ -2706,6 +2706,11 @@ and
|
|||||||
.Dq 802.1ad .
|
.Dq 802.1ad .
|
||||||
The default encapsulation protocol is
|
The default encapsulation protocol is
|
||||||
.Dq 802.1Q .
|
.Dq 802.1Q .
|
||||||
|
The
|
||||||
|
.Dq 802.1ad
|
||||||
|
protocol is also commonly known as
|
||||||
|
.Dq QinQ ;
|
||||||
|
either name can be used.
|
||||||
.It Cm vlanpcp Ar priority_code_point
|
.It Cm vlanpcp Ar priority_code_point
|
||||||
Priority code point
|
Priority code point
|
||||||
.Pq Dv PCP
|
.Pq Dv PCP
|
||||||
|
@ -68,6 +68,7 @@ static const char rcsid[] =
|
|||||||
|
|
||||||
static const char proto_8021Q[] = "802.1q";
|
static const char proto_8021Q[] = "802.1q";
|
||||||
static const char proto_8021ad[] = "802.1ad";
|
static const char proto_8021ad[] = "802.1ad";
|
||||||
|
static const char proto_qinq[] = "qinq";
|
||||||
|
|
||||||
static struct vlanreq params = {
|
static struct vlanreq params = {
|
||||||
.vlr_tag = NOTAG,
|
.vlr_tag = NOTAG,
|
||||||
@ -220,8 +221,8 @@ DECL_CMD_FUNC(setvlanproto, val, d)
|
|||||||
if (strncasecmp(proto_8021Q, val,
|
if (strncasecmp(proto_8021Q, val,
|
||||||
strlen(proto_8021Q)) == 0) {
|
strlen(proto_8021Q)) == 0) {
|
||||||
params.vlr_proto = ETHERTYPE_VLAN;
|
params.vlr_proto = ETHERTYPE_VLAN;
|
||||||
} else if (strncasecmp(proto_8021ad, val,
|
} else if ((strncasecmp(proto_8021ad, val, strlen(proto_8021ad)) == 0)
|
||||||
strlen(proto_8021ad)) == 0) {
|
|| (strncasecmp(proto_qinq, val, strlen(proto_qinq)) == 0)) {
|
||||||
params.vlr_proto = ETHERTYPE_QINQ;
|
params.vlr_proto = ETHERTYPE_QINQ;
|
||||||
} else
|
} else
|
||||||
errx(1, "invalid value for vlanproto");
|
errx(1, "invalid value for vlanproto");
|
||||||
|
Loading…
Reference in New Issue
Block a user