[PATCH 3/5] route: update kernel header snmp.h and fix inet6_parse_protinfo() after kernel API breakage

Thomas Graf tgraf at suug.ch
Thu Mar 20 18:28:32 EDT 2014


On 03/20/14 at 07:18pm, Thomas Haller wrote:
> Take 'include/uapi/linux/snmp.h' from current kernel v3.13
> (commit d8ec26d7f8287f5788a494f56e8814210f0e64be).
> 
> The header file added new values for IPSTATS_MIB_* and ICMP6_MIB_*, but
> more importantly, the kernel broke user space API by reordering enum values in
> IPSTATS_MIB_*. Add a workaround when parsing IFLA_PROTINFO trying to
> be compatible with both older and newer kernels.
> 
> Note that this workaround might fail for some specific kernel versions by
> assuming the old enum value mapping, although the kernel version already
> contains the API change. In this case rtnl_link_get_stat() mixes up
> values.
> 
> Signed-off-by: Thomas Haller <thaller at redhat.com>

Acked-by: Thomas Graf <tgraf at suug.ch>



More information about the libnl mailing list