]> git.puffer.fish Git - matthieu/frr.git/commitdiff
isisd: always join all IS-IS multicast groups
authorDavid Lamparter <equinox@opensourcerouting.org>
Tue, 27 Nov 2012 01:10:29 +0000 (01:10 +0000)
committerDavid Lamparter <equinox@opensourcerouting.org>
Wed, 12 Dec 2012 14:38:07 +0000 (15:38 +0100)
The socket is only created once when an interface is brought up, and the
multicast groups were joined according to configuration at that point.
This breaks when later switching an interface to another IS-IS level.

Since, for a separate conformance issue (ANVL ISIS-6.4), we should be
inspecting the destination address anyway, the simplest fix here is to
just join all groups unconditionally.  There shouldn't be much traffic
on these anyway, worst case we might be picking up some unrelated
multicast groups due to NIC filter aliasing though...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Tested-by: Martin Winter <mwinter@opensourcerouting.org>
isisd/isis_dlpi.c
isisd/isis_pfpacket.c

index 73b6d3e7b223677388cc5dc23b49907d8bf6c9e2..0a82718d3862b09f13b0b0f2c868bbd5ba806a74 100644 (file)
@@ -442,13 +442,9 @@ open_dlpi_dev (struct isis_circuit *circuit)
    * 8.4.2 - Broadcast subnetwork IIH PDUs
    */
   retval = 0;
-  if (circuit->is_type & IS_LEVEL_1)
-    {
-      retval |= dlpimcast (fd, ALL_L1_ISS);
-      retval |= dlpimcast (fd, ALL_ISS);
-    }
-  if (circuit->is_type & IS_LEVEL_2)
-    retval |= dlpimcast (fd, ALL_L2_ISS);
+  retval |= dlpimcast (fd, ALL_L1_ISS);
+  retval |= dlpimcast (fd, ALL_ISS);
+  retval |= dlpimcast (fd, ALL_L2_ISS);
 
   if (retval != 0)
     {
index 42947b22cdeb991ec96d65cdf8146aa92d813c6c..e5589aea40bfa18bf15fbbc8ac43b3e21d7d96c9 100644 (file)
@@ -142,16 +142,14 @@ open_packet_socket (struct isis_circuit *circuit)
        * 8.4.2 - Broadcast subnetwork IIH PDUs
        * FIXME: is there a case only one will fail??
        */
-      if (circuit->is_type & IS_LEVEL_1)
-        /* joining ALL_L1_ISS */
-        retval = isis_multicast_join (circuit->fd, 1,
+      /* joining ALL_L1_ISS */
+      retval |= isis_multicast_join (circuit->fd, 1,
                                       circuit->interface->ifindex);
-      if (circuit->is_type & IS_LEVEL_2)
-        /* joining ALL_L2_ISS */
-        retval = isis_multicast_join (circuit->fd, 2,
+      /* joining ALL_L2_ISS */
+      retval |= isis_multicast_join (circuit->fd, 2,
                                       circuit->interface->ifindex);
       /* joining ALL_ISS (used in RFC 5309 p2p-over-lan as well) */
-      retval = isis_multicast_join (circuit->fd, 3,
+      retval |= isis_multicast_join (circuit->fd, 3,
                                     circuit->interface->ifindex);
     }
   else