Dont depend on loopback LinkEndpoint for looping
Currently the network layer depends on the loopback interface's LinkEndpoint to loop a packet back to the stack without sending it out the "wire"
We should make it so that the loopback back of packets to the loopback interface be handled at the network-layer instead. This will remove the need to special-case loopback interfaces when handling locally-handled packets and creating local routes.
Could you elaborate on what you are proposing? Maybe with a small snippet.
basically we loop-back traffic destined to loopback address at the link endpoint (loopback.Endpoint), but im proposing looping it back at the network layer.
Right now, we don't allow network layer looping if the interface is a loopback interface.
I don't think that's a good idea. It will mean loopback packets are invisible to sniffer and tcpdump etc. What do we expect to gain from this? loopback is at the end of the day a link endpoint that happens to just loop things back. One can even assign loopback endpoints other addresses other than the default 127.0.0.1/8 / ::1 . Making these decisions at IP layer is probably not the right thing to do.
This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 30 days.
This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 30 days.
A friendly reminder that this issue had no activity for 120 days.
A friendly reminder that this issue had no activity for 120 days.
This issue has been closed due to lack of activity.
There are TODOs still referencing this issue:
- pkg/tcpip/stack/route.go:186: Loopback interface loops back packets at the
- pkg/tcpip/stack/route.go:267: Loopback interface loops back packets at the
Search TODO