An Ethernet Switch that has no "smarts" can't be hacked -- it is a passive "store [momentarily] and forward device that does not intervene in the protocol, except to discard damaged packets (which rarely occur).
--------
So if your gateway is secure, every device on your network is secure, and there are no worries. Most gateway devices are providing "strictly local" IP addresses for your devices via DHCP. These addresses are unreachable from the Internet and unroutable, so they cannot be used directly.
Ranges of Private IP address Blocks:
24-bit block10.0.0.0 – 10.255.255.255
20-bit block172.16.0.0 – 172.31.255.255
16-bit block192.168.0.0 – 192.168.255.255
Then the gateway 'acts as your agent' when dealing with the Internet, and uses its own routable IP address to send and receive messages on your behalf. When something comes in, if you did not request it, the packets are discarded, preventing you from receiving anything unsolicited.
Then the gateway 'acts as your agent' when dealing with the Internet, and uses its own routable IP address to send and receive messages on your behalf. When something comes in, if you did not request it, the packet are discarded, preening you from receiving anything unsolicited.
https://en.wikipedia.org/wiki/Network_address_translation
.