From be341cc348257a07c68bcbfdc526835d49283329 Mon Sep 17 00:00:00 2001 From: Nick Kralevich Date: Thu, 21 Feb 2013 18:36:43 -0800 Subject: [PATCH] init.rc: allow IPPROTO_ICMP support Allow userspace programs to create IPPROTO_ICMP sockets. This socket type allows an unprivileged program to safely send ICMP_ECHO messages and receive the corresponding ICMP_ECHOREPLY messages, without relying on raw sockets or setuid programs. Please see http://lwn.net/Articles/443051/ for details. In particular, this allows us to use a version of ping which doesn't have any capabilities (https://android-review.googlesource.com/52072). In addition, this allows us to safely implement an IPv4 ICMP based version of InetAddress.isReachable() (https://code.google.com/p/android/issues/detail?id=20106) Change-Id: I876718151efa8219c4f34f573e35e21256fe2316 --- rootdir/init.rc | 1 + 1 file changed, 1 insertion(+) diff --git a/rootdir/init.rc b/rootdir/init.rc index 871a1f750..d6182e884 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -92,6 +92,7 @@ loglevel 3 write /proc/sys/kernel/kptr_restrict 2 write /proc/sys/kernel/dmesg_restrict 1 write /proc/sys/vm/mmap_min_addr 32768 + write /proc/sys/net/ipv4/ping_group_range "0 2147483647" write /proc/sys/kernel/sched_rt_runtime_us 950000 write /proc/sys/kernel/sched_rt_period_us 1000000