What confuses me is that you don't think to open the file that gave you the assert to look where the assert was thrown and why.
The short answer is: if that patch wasn't included in the main ns-3 codebase there's a precise reason, and it's the one you got. With it, only TCP and UDP can be routed. ICMPs will throw a big boom, as for any non-TCP or non-UDP packet.
For a workaround, check the code. It's pretty evident how to avoid the error.
T.