mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]> CC: Eric Dumazet <[email protected]> CC: James Chapman <[email protected]> CC: David Miller <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
2033e9bf06
commit
e9412c3708
3 changed files with 5 additions and 3 deletions
|
|
@ -923,5 +923,4 @@ MODULE_AUTHOR("James Chapman <[email protected]>");
|
|||
MODULE_DESCRIPTION("L2TP netlink");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_VERSION("1.0");
|
||||
MODULE_ALIAS("net-pf-" __stringify(PF_NETLINK) "-proto-" \
|
||||
__stringify(NETLINK_GENERIC) "-type-" "l2tp");
|
||||
MODULE_ALIAS_GENL_FAMILY("l2tp");
|
||||
|
|
|
|||
Loading…
Reference in a new issue