]> git.baikalelectronics.ru Git - kernel.git/commit
genetlink: Build a generic netlink family module alias
authorNeil Horman <nhorman@tuxdriver.com>
Tue, 29 May 2012 09:30:41 +0000 (09:30 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 May 2012 02:33:56 +0000 (22:33 -0400)
commitc02f28787bba17b07a32e288ac8152139ba6483e
tree479e716c478173830e378f432d3d0b24c6979541
parentf2fe4e05bfca98af36997c84670b07bba042ccf8
genetlink: Build a generic netlink family module alias

Generic netlink searches for -type- formatted aliases when requesting a module to
fulfill a protocol request (i.e. net-pf-16-proto-16-type-<x>, where x is a type
value).  However generic netlink protocols have no well defined type numbers,
they have string names.  Modify genl_ctrl_getfamily to request an alias in the
format net-pf-16-proto-16-family-<x> instead, where x is a generic string, and
add a macro that builds on the previously added MODULE_ALIAS_NET_PF_PROTO_NAME
macro to allow modules to specifify those generic strings.

Note, l2tp previously hacked together an net-pf-16-proto-16-type-l2tp alias
using the MODULE_ALIAS macro, with these updates we can convert that to use the
PROTO_NAME macro.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: Eric Dumazet <eric.dumazet@gmail.com>
CC: James Chapman <jchapman@katalix.com>
CC: David Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/genetlink.h
net/l2tp/l2tp_netlink.c
net/netlink/genetlink.c