Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72099
b: refs/heads/master
c: 305e1e9
h: refs/heads/master
i:
  72097: dd0965a
  72095: b7aff1d
v: v3
  • Loading branch information
Jean Delvare authored and David S. Miller committed Oct 22, 2007
1 parent fd27682 commit bce0600
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 81429973cfff7745792c877dd083eec29724ec97
refs/heads/master: 305e1e96911417d8cda2699f6a20a6f434616a8c
4 changes: 4 additions & 0 deletions trunk/include/linux/net.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,10 @@ static const struct proto_ops name##_ops = { \
#define MODULE_ALIAS_NET_PF_PROTO(pf, proto) \
MODULE_ALIAS("net-pf-" __stringify(pf) "-proto-" __stringify(proto))

#define MODULE_ALIAS_NET_PF_PROTO_TYPE(pf, proto, type) \
MODULE_ALIAS("net-pf-" __stringify(pf) "-proto-" __stringify(proto) \
"-type-" __stringify(type))

#ifdef CONFIG_SYSCTL
#include <linux/sysctl.h>
extern ctl_table net_table[];
Expand Down
1 change: 1 addition & 0 deletions trunk/net/dccp/diag.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,4 @@ module_exit(dccp_diag_fini);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Arnaldo Carvalho de Melo <acme@mandriva.com>");
MODULE_DESCRIPTION("DCCP inet_diag handler");
MODULE_ALIAS_NET_PF_PROTO_TYPE(PF_NETLINK, NETLINK_INET_DIAG, DCCPDIAG_GETSOCK);
7 changes: 7 additions & 0 deletions trunk/net/ipv4/inet_diag.c
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,12 @@ static int inet_diag_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
nlmsg_len(nlh) < hdrlen)
return -EINVAL;

#ifdef CONFIG_KMOD
if (inet_diag_table[nlh->nlmsg_type] == NULL)
request_module("net-pf-%d-proto-%d-type-%d", PF_NETLINK,
NETLINK_INET_DIAG, nlh->nlmsg_type);
#endif

if (inet_diag_table[nlh->nlmsg_type] == NULL)
return -ENOENT;

Expand Down Expand Up @@ -914,3 +920,4 @@ static void __exit inet_diag_exit(void)
module_init(inet_diag_init);
module_exit(inet_diag_exit);
MODULE_LICENSE("GPL");
MODULE_ALIAS_NET_PF_PROTO(PF_NETLINK, NETLINK_INET_DIAG);
1 change: 1 addition & 0 deletions trunk/net/ipv4/tcp_diag.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ static void __exit tcp_diag_exit(void)
module_init(tcp_diag_init);
module_exit(tcp_diag_exit);
MODULE_LICENSE("GPL");
MODULE_ALIAS_NET_PF_PROTO_TYPE(PF_NETLINK, NETLINK_INET_DIAG, TCPDIAG_GETSOCK);

0 comments on commit bce0600

Please sign in to comment.