diff options
author | paul <paul> | 2006-06-15 18:40:49 +0000 |
---|---|---|
committer | paul <paul> | 2006-06-15 18:40:49 +0000 |
commit | dd24e2a2fdd69ca98abae9b73c1eb62eb31f1cbf (patch) | |
tree | 6ba1ebcbd6c5cd6f5e3df048e576d514f60229eb /ospfd/ospf_packet.c | |
parent | a5b248191de7254017608a8aac6f60578d12ad78 (diff) | |
download | quagga-dd24e2a2fdd69ca98abae9b73c1eb62eb31f1cbf.tar.bz2 quagga-dd24e2a2fdd69ca98abae9b73c1eb62eb31f1cbf.tar.xz |
[ospfd] Fix multicast membership drop bug
2006-06-15 Paul Jakma <paul.jakma@sun.com>
* Reported by Milan Koci
* ospf_interface.h: (struct ospf_if_info) Add reference counts
for multicast group memberships. Add various macros to help
manipulate/check membership state.
* ospf_interface.c: (ospf_if_set_multicast) Maintain the
ospf_if_info reference counts, and only actually drop
memberships if it hits 0, to avoid losing membership when
OSPF is disabled on an interface with multiple active OSPF
interfaces.
* ospf_packet.c: (ospf_{hello,read}) Use the new macros to
check/set
multicast membership.
* ospf_vty.c: (show_ip_ospf_interface_sub) ditto.
Diffstat (limited to 'ospfd/ospf_packet.c')
-rw-r--r-- | ospfd/ospf_packet.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index a842ca68..569f2513 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -768,7 +768,7 @@ ospf_hello (struct ip *iph, struct ospf_header *ospfh, if (iph->ip_dst.s_addr == htonl(OSPF_ALLSPFROUTERS)) { /* Try to fix multicast membership. */ - SET_FLAG(oi->multicast_memberships, MEMBER_ALLROUTERS); + OI_MEMBER_JOINED(oi, MEMBER_ALLROUTERS); ospf_if_set_multicast(oi); } return; @@ -2390,9 +2390,9 @@ ospf_read (struct thread *thread) ifp->name, if_flag_dump(ifp->flags)); /* Fix multicast memberships? */ if (iph->ip_dst.s_addr == htonl(OSPF_ALLSPFROUTERS)) - SET_FLAG(oi->multicast_memberships, MEMBER_ALLROUTERS); + OI_MEMBER_JOINED(oi, MEMBER_ALLROUTERS); else if (iph->ip_dst.s_addr == htonl(OSPF_ALLDROUTERS)) - SET_FLAG(oi->multicast_memberships, MEMBER_DROUTERS); + OI_MEMBER_JOINED(oi, MEMBER_DROUTERS); if (oi->multicast_memberships) ospf_if_set_multicast(oi); return 0; |