diff options
| author | Zhenlei Huang <zlei@FreeBSD.org> | 2025-09-03 17:19:37 +0000 |
|---|---|---|
| committer | Zhenlei Huang <zlei@FreeBSD.org> | 2025-09-03 17:19:37 +0000 |
| commit | e921d2842ee8ca9e3dae8952e1cf2645cee785aa (patch) | |
| tree | 79b71227c04d95ee726c5d13aab5974d37f33a0b | |
| parent | 51098f0529f0d1cc532512e0eae9bfcffb8e68e4 (diff) | |
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 <mail@fbsd2.e4m.org>
Tested by: Andre Albsmeier <mail@fbsd2.e4m.org>
Differential Revision: https://reviews.freebsd.org/D52182
| -rw-r--r-- | sys/dev/usb/net/if_umb.c | 4 |
1 files changed, 0 insertions, 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); |
