m.as_u64[0] = 0xffffffff00000000;
if (lookup_mask & PNAT_DA)
m.as_u64[0] |= 0x00000000ffffffff;
- m.as_u64[1] = 0xffffffff00000000;
+ m.as_u64[1] = 0x00ffffff00000000;
+ if (lookup_mask & PNAT_PROTO)
+ m.as_u64[1] |= 0xff00000000000000;
if (lookup_mask & PNAT_SPORT)
m.as_u64[1] |= 0x00000000ffff0000;
if (lookup_mask & PNAT_DPORT)
if (input) {
/* TODO: Make shallow virtual reassembly configurable */
- ip4_sv_reass_enable_disable_with_refcnt(sw_if_index, 1);
+ if (ip4_sv_reass_enable_disable_with_refcnt(sw_if_index, 1) != 0)
+ return clib_error_return(0, "PNAT SVR enable failed on %u",
+ sw_if_index);
+
} else {
- ip4_sv_reass_output_enable_disable_with_refcnt(sw_if_index, 1);
+ if (ip4_sv_reass_output_enable_disable_with_refcnt(sw_if_index,
+ 1) != 0)
+ return clib_error_return(0, "PNAT SVR enable failed on %u",
+ sw_if_index);
}
interface->lookup_mask[attachment] = mask;