]> git.proxmox.com Git - mirror_frr.git/commit - pimd/pim_zlookup.c
pimd: Allow zlookup socket to drain
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 6 Jun 2019 20:23:09 +0000 (16:23 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 6 Jun 2019 20:23:09 +0000 (16:23 -0400)
commit0da02f3a1802eaa683d54005bc9bc9a171060bfc
treea007ad6643a807270ac78f445f1886bf0e092dfb
parentf7288f151553666703815e80d6bc628489b9b360
pimd: Allow zlookup socket to drain

When pim is started and has nothing to talk to zebra about
over the zlookup socket and interface events are happening
then the zlookup socket is not being drained.

This eventually leads to a situation where the kernel send buffer
fills up and zebra is unable to write anything down the pipe.
At this time the zapi starts buffering data in `struct buffer`
which of course slowly fills up as pim has nothing to do.

As a bit of a hack allow the zlookup socket to wake up 1 time
a minute and ask for information about the default route
and do nothing with it.  This will cause the socket buffers
to be drained and the system will be happy.

Long term we need to get rid of this synchronous/asynchronous
duality that pim has.  This is on the radar but is not something
that could be fixed in an afternoon or a week of effort in my
opinion.  Given time constraints right now.  Let's put this
in place and then once we get pim completely async then
we can just remove the zlookup( I hope ) code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd/pim_zlookup.c