summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorgdt <gdt>2004-12-30 13:50:32 +0000
committergdt <gdt>2004-12-30 13:50:32 +0000
commitcc49eb5a5f970b7405762d3f8a2def179e0022b4 (patch)
treedbd4d9278b3c2dad27f1908662fab533568a2504 /lib
parent17eaa728aae282e373b98a8d193c5c48c24e1a0f (diff)
Add comment explaining about limit of 20 joined groups on a socket.
Diffstat (limited to 'lib')
-rw-r--r--lib/sockopt.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/sockopt.c b/lib/sockopt.c
index f1366158..d755746a 100644
--- a/lib/sockopt.c
+++ b/lib/sockopt.c
@@ -152,10 +152,17 @@ getsockopt_ipv6_ifindex (struct msghdr *msgh)
#endif /* HAVE_IPV6 */
-/* Set up a multicast socket options for IPv4
- This is here so that people only have to do their OS multicast mess
- in one place rather than all through zebra, ospfd, and ripd
- NB: This is a hookpoint for specific OS functionality */
+/*
+ * Process multicast socket options for IPv4 in an OS-dependent manner.
+ * Supported options are IP_MULTICAST_IF and IP_{ADD,DROP}_MEMBERSHIP.
+ *
+ * Many operating systems have a limit on the number of groups that
+ * can be joined per socket (where each group and local address
+ * counts). This impacts OSPF, which joins groups on each interface
+ * using a single socket. The limit is typically 20, derived from the
+ * original BSD multicast implementation. Some systems have
+ * mechanisms for increasing this limit.
+ */
int
setsockopt_multicast_ipv4(int sock,
int optname,
@@ -200,7 +207,7 @@ setsockopt_multicast_ipv4(int sock,
/* Add your favourite OS here! */
#else /* #if OS_TYPE */
- /* default OS support */
+ /* standard BSD API */
struct in_addr m;
struct ip_mreq mreq;