The branch main has been updated by kp:

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

commit c21cbaca2b0db4eb6988da5c470cb520d82b17eb
Author:     Kristof Provost <[email protected]>
AuthorDate: 2022-06-30 11:34:53 +0000
Commit:     Kristof Provost <[email protected]>
CommitDate: 2022-06-30 11:36:26 +0000

    dummynet: handle IPV6 layer 2 traffic
    
    When pf sends layer 2 traffic into dummynet it still marks IPv6 with
    IPFW_ARGS_IPV6 (which dummynet translates to PROTO_V6). That in turn
    results in it not matching the 'DIR_IN | PROTO_LAYER2' case, and
    triggering the 'bad switch' error message.
    
    Add extra cases for LAYER2 | PROTO_IPV6.
    
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sys/netpfil/ipfw/ip_dn_io.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/netpfil/ipfw/ip_dn_io.c b/sys/netpfil/ipfw/ip_dn_io.c
index 98f9d08495df..deeb3d9325de 100644
--- a/sys/netpfil/ipfw/ip_dn_io.c
+++ b/sys/netpfil/ipfw/ip_dn_io.c
@@ -804,6 +804,7 @@ dummynet_send(struct mbuf *m)
 
                        break;
 
+               case DIR_IN | PROTO_LAYER2 | PROTO_IPV6:
                case DIR_IN | PROTO_LAYER2: /* DN_TO_ETH_DEMUX: */
                        /*
                         * The Ethernet code assumes the Ethernet header is
@@ -819,6 +820,7 @@ dummynet_send(struct mbuf *m)
                        ether_demux(m->m_pkthdr.rcvif, m);
                        break;
 
+               case DIR_OUT | PROTO_LAYER2 | PROTO_IPV6:
                case DIR_OUT | PROTO_LAYER2: /* DN_TO_ETH_OUT: */
                        ether_output_frame(ifp, m);
                        break;

Reply via email to