title: Filtering UDP loopback on Linux in C
body: <p>I have an application bound to eth0, sending UDP packets on port A to 255.255.255.255. At the same time, I have a UDP server bound to eth0, 0.0.0.0 and port A.</p>
  
  <p>What I want to do is to make sure that the server won't receive messages generated by the application (handled purely in software by the kernel) but it will receive messages generated by other hosts in the network.</p>
  
  <p>I can't change the payload of UDP packets nor add any headers to it.</p>
  
  <p>I've already implemented a solution using RTNETLINK to fetch all IP addresses of the machine I'm sitting on (and filter basing on address from recvfrom()), but I'm wondering if there might be a simpler and cleaner solution.</p>
  
  <p>EDIT: I thought about something like tagging the skb - the tag would disappear after leaving a physical interface, but wouldn't if it's just routed in the software.</p>
  
  <p>Any ideas?</p>