Phonet: proc interface for port range
Phonet endpoints are bound to individual ports.
This provides a /proc/sys/net/phonet (or sysctl) interface for
selecting the range of automatically allocated ports (much like the
ip_local_port_range with IPv4).
Signed-off-by: Remi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c
index 51397ff..50dc258 100644
--- a/net/phonet/af_phonet.c
+++ b/net/phonet/af_phonet.c
@@ -350,6 +350,7 @@
phonet_device_init();
dev_add_pack(&phonet_packet_type);
phonet_netlink_register();
+ phonet_sysctl_init();
err = isi_register();
if (err)
@@ -357,6 +358,7 @@
return 0;
err:
+ phonet_sysctl_exit();
sock_unregister(AF_PHONET);
dev_remove_pack(&phonet_packet_type);
phonet_device_exit();
@@ -366,6 +368,7 @@
static void __exit phonet_exit(void)
{
isi_unregister();
+ phonet_sysctl_exit();
sock_unregister(AF_PHONET);
dev_remove_pack(&phonet_packet_type);
phonet_device_exit();