diff options
author | Jan Klemkow <jan@cvs.openbsd.org> | 2023-02-27 09:35:33 +0000 |
---|---|---|
committer | Jan Klemkow <jan@cvs.openbsd.org> | 2023-02-27 09:35:33 +0000 |
commit | db7128f9a26a8c9e208060a0538e628b6681f2bc (patch) | |
tree | dcdc6b52824fa9a50f42332672e1825049790788 /sys/net/if_bridge.c | |
parent | ec8075955e4fc782498731bc81aad797cd89663d (diff) |
Turn off TSO if interface is added to layer 2 devices.
ok bluhm@, claudio@
Diffstat (limited to 'sys/net/if_bridge.c')
-rw-r--r-- | sys/net/if_bridge.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 708f3d56abb..a202556e41f 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bridge.c,v 1.364 2022/08/07 00:57:43 bluhm Exp $ */ +/* $OpenBSD: if_bridge.c,v 1.365 2023/02/27 09:35:32 jan Exp $ */ /* * Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net) @@ -337,6 +337,10 @@ bridge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) * released. */ + NET_LOCK(); + ifsettso(ifs, 0); + NET_UNLOCK(); + bif->bridge_sc = sc; bif->ifp = ifs; bif->bif_flags = IFBIF_LEARNING | IFBIF_DISCOVER; @@ -395,6 +399,11 @@ bridge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) error = ENOMEM; break; } + + NET_LOCK(); + ifsettso(ifs, 0); + NET_UNLOCK(); + bif->bridge_sc = sc; bif->ifp = ifs; bif->bif_flags = IFBIF_SPAN; |