In the prologue, where we check if the argument is a memory or an mbuf
chain, do not set 'struct ip *ip' pointer. However, set the 'struct
ether_header *eh' pointer there and set Etherner header length in 'ehlen'.
Side effect of this refactor is that now Layer 2 hooks may send mbufs with
ETHERTYPE_VLAN frames. However, current network stack doesn't do that.
Write a new PULLUP() macro that would take type of the argument to
determine how much to pull. Unlike PULLUP_TO() this macro can take typed
pointer. This will allow to get rid of 'void *ulp' and bunch of casting
macros in the next change. Use local bool variable to see if we need to
unlock upon jump to pullup_failed. Embed pointer update into the branch
of the macro, where pointers indeed need an update.
Use new PULLUP() macro to pullup initial 'struct ip *ip' and 'struct
ip6_hdr *ip6'. This removes max_protohdr sized pullup, that previously
tried to pull more than an unmapped mbuf could yield, fixing a bug covered
by the testcase sys/netpfil/ipfw/unmapped.