1 From 9cdcfe9f19ffd45bac4e5b459879bf7c50a287ed Mon Sep 17 00:00:00 2001
2 From: Simon Kelley <simon@thekelleys.org.uk>
3 Date: Wed, 26 Aug 2015 22:38:08 +0100
4 Subject: [PATCH] Suggest solution to ENOMEM error with IPv6 multicast.
7 src/network.c | 13 ++++++++++---
8 1 file changed, 10 insertions(+), 3 deletions(-)
10 diff --git a/src/network.c b/src/network.c
11 index a1d90c8..819302f 100644
14 @@ -1076,23 +1076,30 @@ void join_multicast(int dienow)
16 if ((daemon->doing_dhcp6 || daemon->relay6) &&
17 setsockopt(daemon->dhcp6fd, IPPROTO_IPV6, IPV6_JOIN_GROUP, &mreq, sizeof(mreq)) == -1)
21 inet_pton(AF_INET6, ALL_SERVERS, &mreq.ipv6mr_multiaddr);
23 if (daemon->doing_dhcp6 &&
24 setsockopt(daemon->dhcp6fd, IPPROTO_IPV6, IPV6_JOIN_GROUP, &mreq, sizeof(mreq)) == -1)
28 inet_pton(AF_INET6, ALL_ROUTERS, &mreq.ipv6mr_multiaddr);
30 if (daemon->doing_ra &&
31 setsockopt(daemon->icmp6fd, IPPROTO_IPV6, IPV6_JOIN_GROUP, &mreq, sizeof(mreq)) == -1)
37 char *s = _("interface %s failed to join DHCPv6 multicast group: %s");
40 +#ifdef HAVE_LINUX_NETWORK
41 + if (errno == ENOMEM)
42 + my_syslog(LOG_ERR, _("try increasing /proc/sys/net/core/optmem_max"));
46 die(s, iface->name, EC_BADNET);