The branch releng/13.0 has been updated by markj:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=78f91c1fbf02b8768ebd8dd005eb922970ff4837

commit 78f91c1fbf02b8768ebd8dd005eb922970ff4837
Author:     Alexander V. Chernikov <[email protected]>
AuthorDate: 2021-04-11 16:47:03 +0000
Commit:     Mark Johnston <[email protected]>
CommitDate: 2021-06-29 17:09:25 +0000

    Fix vlan creation for the older ifconfig(8) binaries.
    
    Approved by:    so
    Security:       EN-21:20.vlan
    Reported by:    allanjude
    MFC after:      immediately
    
    (cherry picked from commit afbb64f1d85b7d8c2938031c3567946b5d10da4f)
    (cherry picked from commit 9abc85d17d0538704641fe2c4d9da1b666f86e4e)
---
 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 26fb48257c11..58403e8dc076 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -1012,6 +1012,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);
@@ -1942,6 +1946,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);
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to