Ongy / netlink-hs

Netlink communication for Haskell
BSD 3-Clause "New" or "Revised" License
2 stars 7 forks source link

Leave multicast group #4

Closed vdorr closed 6 years ago

vdorr commented 6 years ago

Adds leaveMulticastGroup function. Netlink sockets sometimes get overwhelmed and reading then causes exception (ENOBUF errno), leaveMulticastGroup allows to leave group and revert to polling.

Ongy commented 6 years ago

Thanks. btw. How did you get this to be relevant? Are you in many groups, or are there some rather spammy groups?

vdorr commented 6 years ago

The latter. I had subscribed eRTNLGRP_LINK, eRTNLGRP_IPV4_IFADDR and eRTNLGRP_NEIGH, the problematic seem to be _NEIGH and the trigger is ping to all IP addresses in one of subnets (despite only few addresses being alive). Increasing buffer using setsockopt seemed to have no effect. It stopped happening when i migrated to new machine, however, i want to have this at hand.