Li RongQing <lirongqing@xxxxxxxxx> wrote: > The proto in struct xt_match and struct xt_target is u16, when > calling xt_check_target/match, their proto argument is u8, > and will cause truncation, it is harmless to ip packet, since > ip proto is u8 > > if a L2 match/target has proto that is u16, will cause the check > failure. Yes, I don't see any ebtables matches/targets that set .proto though, so no failure should happen in current kernel. Otherwise, could you add an example where we hit a checkentry failure in error? > +int xt_check_match(struct xt_mtchk_param *, unsigned int size, u_int16_t proto, > bool inv_proto); I think you can use u16 instead of the old u_int16_t. Other than that, this looks good to me, thanks.