On Wed, 27 Jun 2018 11:49:49 +0200, Daniel Borkmann wrote: > Looks good to me, and yes in BPF case a mask like TUNNEL_OPTIONS_PRESENT is > right approach since this is opaque info and solely defined by the BPF prog > that is using the generic helper.
Wouldn't it make sense to introduce some safeguards here (in a backward compatible way, of course)? It's easy to mistakenly set data for a different tunnel type in a BPF program and then be surprised by the result. It might help users if such usage was detected by the kernel, one way or another. I'm thinking about something like the BPF program voluntarily specifying the type of the data; if not specified, the wildcard would be used as it is now. Jiri