title: Packet received on monitor interface, but not main interface
body: <p>I am building UDP packets from scratch (including 802.11 MAC, LLC, IP and UDP headers) and injecting them into a wireless network using LORCON. The receiving host has an interface <code>wlan0</code> in regular, managed mode (but not connected to any AP), and I've added a sub-interface <code>mon0</code> running in monitor mode as such:</p>
  
  <pre><code>iw dev wlan0 interface add mon0 type monitor
  </code></pre>
  
  <p>Watching the monitoring interface shows that the packet is received correctly:</p>
  
  <pre><code>$ sudo tcpdump -vei mon0 udp
  tcpdump: WARNING: mon0: no IPv4 address assigned
  tcpdump: listening on mon0, link-type IEEE802_11_RADIO (802.11 plus radiotap header), capture size 65535 bytes
  &lt;time&gt; &lt;signal info&gt; DA:Broadcast BSSID:... SA:... LLC, dsap SNAP (0xaa) Individual, ssap SNAP (0xaa) Command, ctrl 0x03: oui Ethernet (0x000000), ethertype IPv4 (0x0800): (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 53)
      10.0.0.1.1234 &gt; 255.255.255.255.1234: UDP, length 17
  </code></pre>
  
  <p>However, if I run <code>sudo tcpdump -vei wlan0</code>, no packets are printed, even though both the MAC and IP destination addresses are set to the broadcast address. The source address is set to a ficticious address, but I don't think that should prevent <code>tcpdump</code> from seeing the packet at all?</p>
  
  <pre><code>$ ip link
  ...
  7: wlan0: &lt;NO-CARRIER,BROADCAST,MULTICAST,PROMISC,UP&gt; mtu 1500 qdisc mq state DOWN qlen 1000
      link/ether 00:21:6a:c5:3e:7a brd ff:ff:ff:ff:ff:ff
  8: mon0: &lt;BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP&gt; mtu 1500 qdisc mq state UNKNOWN qlen 1000
      link/ieee802.11/radiotap 00:21:6a:c5:3e:7a brd ff:ff:ff:ff:ff:ff
  </code></pre>
  
  <p>For what it's worth, setting <code>net.ipv4.conf.all.rp_filter=0</code> as suggested <a href="https://serverfault.com/questions/163244/linux-kernel-not-passing-through-multicast-udp-packets">here</a> has no effect. Neither does setting <code>net.ipv4.ip_forward=1</code>. Enabling <code>net.ipv4.conf.all.log_martians</code> produces no output in the syslog.</p>
  
  <p>Any pointers as to why this might be are most welcome!</p>
  
  <p>FWIW, the machine is running Ubuntu 12.04.3, but with the 3.5.7 kernel.</p>
  
  <p>EDIT: Here's something interesting I just discovered: <code>tcpdump -i any</code> doesn't print anything either. Only when I explicitly run <code>tcpdump -i mon0</code> do I see the incoming packet. Why would something be excluded from <code>-i any</code>?</p>