if (pa->type == iph1->natt_options->payload_nat_d)
There seems to be an assumption that iph1->natt_options is always
non-NULL. I suggest adding "iph1->natt_options != NULL &&" to the
beginning of the if, but I haven't even read the next line.
--
Greg Troxel <gdt@ir.bbn.com>