In terms of ethernet switches, the cheapest switches are unmanaged and are generally not FOSS. Netgear has some not-crazy-expensive managed switches with FOSS firmware. See here for the firmware ( NETGEAR Open Source Code for Programmers (GPL) ) … I think their switches start with “GS”. For example there is FOSS firmware for a GS108Ev3 (8 port Gigabit managed switch) … which runs $65 on Amazon (US) and you can find them on ebay for $45 new and $25-ish used.
That said: I don’t care with my switches. All the traffic I care about is encrypted/safe.