| From 52989703f765721b02f28d4815438e0296f49d56 Mon Sep 17 00:00:00 2001 |
| From: Peter Qiu <zqiu@chromium.org> |
| Date: Thu, 28 May 2015 13:53:48 -0700 |
| Subject: [PATCH] Gracefully handle SO_REUSEPORT command failure |
| |
| Change log level to error instead of fatal when SO_REUSEPORT command |
| failed, to allow "dhcpd -6" to run on a system without SO_REUSEPORT |
| support. |
| |
| This option is only required for DHCPv6 to allow multiple daemons to |
| bind to their own sockets and get (multicast) data on their respective |
| interfaces. On ChromeOS, dhcpd is used for testing purpose only |
| with one daemon instance running at a time. So this option is not |
| required on our system. |
| |
| BUG=chromium:498437 |
| TEST=Start a DHCPv6 server on a test image |
| "dhcpd -6 -cf /tmp/dhcpd6.conf" |
| --- |
| common/socket.c | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| diff --git a/common/socket.c b/common/socket.c |
| index a48404b..5823eb0 100644 |
| --- a/common/socket.c |
| +++ b/common/socket.c |
| @@ -226,7 +226,7 @@ if_register_socket(struct interface_info *info, int family, |
| flag = 1; |
| if (setsockopt(sock, SOL_SOCKET, SO_REUSEPORT, |
| (char *)&flag, sizeof(flag)) < 0) { |
| - log_fatal("Can't set SO_REUSEPORT option on dhcp " |
| + log_error("Can't set SO_REUSEPORT option on dhcp " |
| "socket: %m"); |
| } |
| } |
| -- |
| 2.2.0.rc0.207.ga3a616c |
| |