Udp packet lost when multiple network interfaces

Hi,
I made an app with processing, listening for udp packets on a specific port. I was using hypermedia.net. but moved to java udp DatagramSocket and DatagramPacket hoping it will fix my problem, but not, it’s the same…
Well, this app works like a charm when I have only one ethernet interface connected.
But if I have 2 ethernet interfaces connected, not on the same network (192.168.0.x with internet access for one and 192.168.5.x without internet access for the other one - app listening on the second one (192.168.5.x)),
So in that case, I start to lose some packets. But those packets are correctly received in the computer: I can see them with wireshark. I can receive them using an other app. But on my processing app, I will receive some of them and lose the others. I tried many things, all DatagramSocket options without success. There’s a little improvment when playing with the SoTimeout, which is totaly weird, but I’m still losing packets…
It’s make me crasy!
Any idea?

That sounds like a weird issue. Have you tried switching to TCP (if you have access to the program sending OSC) ? Perhaps you already know but UDP allows packet loss, so in a way your setup is working “properly”…

Thanks Micuat,
Unfortunately, I can’t switch to TCP. That’s definitely a weird issue! I know UDP allows packet loss. It’s part of the game. But When you know the packets are correctly received by the computer but not your app, then you know it’s not linked to the protocol itself, but a question of library or implementation…