I'm using openconnect to connect to my office VPN. They push some pretty crappy/aggressive routing rules allocating ALL of the private IP address spaces >.<
After I connect to my office VPN, my main routing table contains these routes (it contains a lot more actually, but those are the colliding subnets):
192.168.0.0/24 dev p4p1 proto kernel scope link src 192.168.0.200 192.168.0.0/16 dev tun0 scope link
As you can see, all traffic to 192.168.0.0/16 should be routed through tun0. The weird thing though is that it's not.
If I ping a machine in my home LAN (192.168.0.0/24), the ICMP packet reaches the machine and generally everything works OK, so I assume that packets to 192.168.0.0/24 don't go through the VPN connection.
My question is the following, how does the Linux kernel deal with colliding subnets? I'm suspecting that it chooses to use most precise route, in this case 192.168.0.0/24. Could you please point me to a document that describes this or provide some hints?