Re: [RFC v2 PATCH 3/5] ipv6: Paramterize TLV parsing

2019-06-08 Thread David Lebrun
On 07/06/2019 19:55, Tom Herbert wrote: + bool (*unknown_opt)(struct sk_buff *skb, int optoff, + bool disallow_unknowns)) What about changing this boolean argument to 'allow_unknowns' (here, in ip6_tlvopt_unknown() and ip6_par

[RFC v2 PATCH 3/5] ipv6: Paramterize TLV parsing

2019-06-07 Thread Tom Herbert
Add parameters to ip6_parse_tlv that will allow leveraging the function for parsing segment routing TLVs. The new parameters are offset of TLVs, length of the TLV block, and a function that is called in the case of an unrecognized option. Signed-off-by: Tom Herbert --- net/ipv6/exthdrs.c | 35 ++