Have you checked the byte order of h->extended_hdr.parsed_pkt.vlan_id? It should be host order.