#522 commented out the place where peers were banned if they didn't support the protocol (it was just a low hanging fruit for Ping, ostensibly could be used in other places), because it's no longer available on the Swarm.
The new approach seems to be similar to #538 , to add a new module to our behaviour: https://github.com/libp2p/rust-libp2p/tree/v0.52/misc/allow-block-list