summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_var.h
diff options
context:
space:
mode:
authorbms <bms@FreeBSD.org>2006-05-14 14:22:49 +0000
committerbms <bms@FreeBSD.org>2006-05-14 14:22:49 +0000
commit18895e4f429bdde8c9a49ec2740de9f7ee1eb851 (patch)
tree0b86a0cd16f824f56236d76a1229680116c518af /sys/netinet/ip_var.h
parent28c1069b5c9c208fec373fcfcd5aa45351b7bc2a (diff)
downloadFreeBSD-src-18895e4f429bdde8c9a49ec2740de9f7ee1eb851.zip
FreeBSD-src-18895e4f429bdde8c9a49ec2740de9f7ee1eb851.tar.gz
Fix a long-standing limitation in IPv4 multicast group membership.
By making the imo_membership array a dynamically allocated vector, this minimizes disruption to existing IPv4 multicast code. This change breaks the ABI for the kernel module ip_mroute.ko, and may cause a small amount of churn for folks working on the IGMPv3 merge. Previously, sockets were subject to a compile-time limitation on the number of IPv4 group memberships, which was hard-coded to 20. The imo_membership relationship, however, is 1:1 with regards to a tuple of multicast group address and interface address. Users who ran routing protocols such as OSPF ran into this limitation on machines with a large system interface tree.
Diffstat (limited to 'sys/netinet/ip_var.h')
-rw-r--r--sys/netinet/ip_var.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/ip_var.h b/sys/netinet/ip_var.h
index 6d0a122..a051825 100644
--- a/sys/netinet/ip_var.h
+++ b/sys/netinet/ip_var.h
@@ -85,11 +85,12 @@ struct ipoption {
struct ip_moptions {
struct ifnet *imo_multicast_ifp; /* ifp for outgoing multicasts */
struct in_addr imo_multicast_addr; /* ifindex/addr on MULTICAST_IF */
+ u_long imo_multicast_vif; /* vif num outgoing multicasts */
u_char imo_multicast_ttl; /* TTL for outgoing multicasts */
u_char imo_multicast_loop; /* 1 => hear sends if a member */
u_short imo_num_memberships; /* no. memberships this socket */
- struct in_multi *imo_membership[IP_MAX_MEMBERSHIPS];
- u_long imo_multicast_vif; /* vif num outgoing multicasts */
+ u_short imo_max_memberships; /* max memberships this socket */
+ struct in_multi **imo_membership; /* group memberships */
};
struct ipstat {
OpenPOWER on IntegriCloud