Linux Kernel accepts un-intended packages on a device with no IP address
by owl-from-hogvarts from LinuxQuestions.org on (#6QQAD)
Suppose we have host0. host0 has eth0 which has an ip address 192.168.1.5. host0 also has eth1 which does not have configured ip address, but is connected to host1. The host1 has ip address 192.168.1.6.
On the host0 static ip route is configured: 192.168.1.6 goes to eth1.
When host1 pings 192.168.1.5, I expect linux kernel to discard the packages completely. This is because neither eth0 nor eth1 is a part of a bridge (neither physical or virtual). And eth1 does not have an IP address associated. So package should clearly be discarded at IP level by kernel (since there is no way for them to rich 192.168.1.5).
But what happens is that Linux kernel accepts packets with destination ip 192.168.1.5 on the eth1. It does NOT forward them to eht0 but directly sends a ping response back to host1. This behavior is observed only when static route mentioned above is configured. Sounds to me like a bug.
Tell me pls, is this intentional behavior or is it a bug worth reporting to linux kernel mailing list?
On the host0 static ip route is configured: 192.168.1.6 goes to eth1.
When host1 pings 192.168.1.5, I expect linux kernel to discard the packages completely. This is because neither eth0 nor eth1 is a part of a bridge (neither physical or virtual). And eth1 does not have an IP address associated. So package should clearly be discarded at IP level by kernel (since there is no way for them to rich 192.168.1.5).
But what happens is that Linux kernel accepts packets with destination ip 192.168.1.5 on the eth1. It does NOT forward them to eht0 but directly sends a ping response back to host1. This behavior is observed only when static route mentioned above is configured. Sounds to me like a bug.
Tell me pls, is this intentional behavior or is it a bug worth reporting to linux kernel mailing list?