* detection: skip detection when UDP outer layer not found
The built-in rule must fire: "116:472 (decode) too many protocols present".
Check "network.layers" configuration.
* log: ensure LogIPPkt won't call LogOuterIPHeader for missing layer
const udp::UDPHdr* udph = layer::get_outer_udp_lyr(p);
+ if (!udph)
+ return; // no outer layer found, the inner layer evaluates later
+
p->ptrs.udph = udph;
p->ptrs.sp = ntohs(udph->uh_sport);
p->ptrs.dp = ntohs(udph->uh_dport);
uint16_t save_dp = p->ptrs.dp;
const udp::UDPHdr* udph = layer::get_outer_udp_lyr(p);
+ assert(udph);
+
p->ptrs.sp = ntohs(udph->uh_sport);
p->ptrs.dp = ntohs(udph->uh_dport);
-
LogIPHeader(log, p);
-
p->ptrs.sp = save_sp;
p->ptrs.dp = save_dp;
}