+ if ((ih4->ip_version_and_header_length & 0xF0) == 0x40)
+ {
+ ip_hdr_size = ip4_header_bytes (ih4);
+ ah0 = (ah_header_t *) ((u8 *) ih4 + ip_hdr_size);
+ }
+ else if ((ih4->ip_version_and_header_length & 0xF0) == 0x60)
+ {
+ ip6_ext_header_t *prev = NULL;
+ ip6_ext_header_find_t (ih6, prev, ah0, IP_PROTOCOL_IPSEC_AH);
+ ip_hdr_size = sizeof (ip6_header_t);
+ ASSERT ((u8 *) ah0 - (u8 *) ih6 == ip_hdr_size);
+ }
+ else
+ {
+ vlib_node_increment_counter (vm, ah_decrypt_node.index,
+ AH_DECRYPT_ERROR_NOT_IP, 1);
+ goto trace;
+ }
+