The branch main has been updated by zlei:

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

commit e921d2842ee8ca9e3dae8952e1cf2645cee785aa
Author:     Zhenlei Huang <z...@freebsd.org>
AuthorDate: 2025-09-03 17:19:37 +0000
Commit:     Zhenlei Huang <z...@freebsd.org>
CommitDate: 2025-09-03 17:19:37 +0000

    umb: Fix setting the input routine
    
    This driver does not depend on netmap, and umb_input() works greatly
    without netmap.
    
    Remove the #ifdef DEV_NETMAP so that when "device netmap" is not
    configured this driver can still correctly pass the inbound packets to
    the net stack. Otherwise the input routine will be if_input_default()
    which will silently drop all inbound packets.
    
    PR:             263783
    Reported by:    Andre Albsmeier <m...@fbsd2.e4m.org>
    Tested by:      Andre Albsmeier <m...@fbsd2.e4m.org>
    Differential Revision:  https://reviews.freebsd.org/D52182
---
 sys/dev/usb/net/if_umb.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/sys/dev/usb/net/if_umb.c b/sys/dev/usb/net/if_umb.c
index f640b4224aad..b1082b117259 100644
--- a/sys/dev/usb/net/if_umb.c
+++ b/sys/dev/usb/net/if_umb.c
@@ -177,9 +177,7 @@ static void  umb_ncm_setup(struct umb_softc *, struct 
usb_config *);
 static void     umb_close_bulkpipes(struct umb_softc *);
 static int      umb_ioctl(if_t , u_long, caddr_t);
 static void     umb_init(void *);
-#ifdef DEV_NETMAP
 static void     umb_input(if_t , struct mbuf *);
-#endif
 static int      umb_output(if_t , struct mbuf *,
                    const struct sockaddr *, struct route *);
 static void     umb_start(if_t );
@@ -585,9 +583,7 @@ umb_attach_task(struct usb_proc_msg *msg)
        if_setsoftc(ifp, sc);
        if_setflags(ifp, IFF_SIMPLEX | IFF_MULTICAST | IFF_POINTOPOINT);
        if_setioctlfn(ifp, umb_ioctl);
-#ifdef DEV_NETMAP
        if_setinputfn(ifp, umb_input);
-#endif
        if_setoutputfn(ifp, umb_output);
        if_setstartfn(ifp, umb_start);
        if_setinitfn(ifp, umb_init);

Reply via email to