Date: Sun, 11 Apr 2021 17:13:42 GMT From: "Alexander V. Chernikov" <melifaro@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: afbb64f1d85b - main - Fix vlan creation for the older ifconfig(8) binaries. Message-ID: <202104111713.13BHDg9Z009771@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=afbb64f1d85b7d8c2938031c3567946b5d10da4f commit afbb64f1d85b7d8c2938031c3567946b5d10da4f Author: Alexander V. Chernikov <melifaro@FreeBSD.org> AuthorDate: 2021-04-11 16:47:03 +0000 Commit: Alexander V. Chernikov <melifaro@FreeBSD.org> CommitDate: 2021-04-11 17:13:09 +0000 Fix vlan creation for the older ifconfig(8) binaries. Reported by: allanjude MFC after: immediately --- sys/net/if_vlan.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 229cd331c7a1..bd3a5335a97f 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -1015,6 +1015,10 @@ vlan_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) vid = vlr.vlr_tag; proto = vlr.vlr_proto; +#ifdef COMPAT_FREEBSD12 + if (proto == 0) + proto = ETHERTYPE_VLAN; +#endif p = ifunit_ref(vlr.vlr_parent); if (p == NULL) return (ENXIO); @@ -1947,6 +1951,10 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) error = ENOENT; break; } +#ifdef COMPAT_FREEBSD12 + if (vlr.vlr_proto == 0) + vlr.vlr_proto = ETHERTYPE_VLAN; +#endif oldmtu = ifp->if_mtu; error = vlan_config(ifv, p, vlr.vlr_tag, vlr.vlr_proto); if_rele(p);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202104111713.13BHDg9Z009771>