]> The Tcpdump Group git mirrors - libpcap/commit
fix MPLS code generation:
authorhannes <hannes>
Fri, 8 Jul 2005 15:27:06 +0000 (15:27 +0000)
committerhannes <hannes>
Fri, 8 Jul 2005 15:27:06 +0000 (15:27 +0000)
commitd6fc76f341620a64211590fd8bb6ce8c259971eb
treeb20fbbfd8948dae001d7c1ab4ba924a2c1435a23
parentf6812ab143c0a5219d60bbfdb61492788dee038d
fix MPLS code generation:

if we have a MPLS label stack deeper > 1 then generate a match
  for a cleared bottom-of-stack-bit of the previous MPLS shim header
  rather than just incrementing the offset;

if there is a compined expression of MPLS and IP like e.g.
  "mpls && ip" | "mpls && ip host" | "mpls && ip src net"
  then poison the linkoffset to make sure that other code generators
  do not try to match link-layer protos like Q_ARP, Q_RARP etc.

introduce a new function gen_null() that matches against the first nibble
  of the IP header and matches if the bottom-of-stack bit is set;

TODO: IPv6 stuff i.e. gen_host6() etc.
gencode.c