]> git.puffer.fish Git - mirror/frr.git/commit
Quagga: Check and cleanup prior address when processing address add on interface
authorvivek <vivek@cumulusnetworks.com>
Mon, 9 May 2016 22:53:06 +0000 (15:53 -0700)
committervivek <vivek@cumulusnetworks.com>
Mon, 9 May 2016 22:53:06 +0000 (15:53 -0700)
commitd838ddbfd1eb96a3d4395613512d73a446ded116
treecd5baa8ea4b5da253f4966cefe44c492fa3175ff
parent567b877d7ff2c04ccf62bca75338cec7a560f184
Quagga: Check and cleanup prior address when processing address add on interface

IPv4 addresses can be learnt from the kernel even when the interface is down.
Quagga notifis clients of addresses upon learning of them (initial read or
upon NEWADDR) as well as when the interface comes up. The problem is that
while zebra code itself has checks to ensure duplicate addresses aren't added
to an interface, that is not true for the clients.

This patch checks for duplicates when the client receives the address add.
Upon this, the patch does a delete and add as done in zebra - because there
is a possibility that some other parameter could have changed. The fix also
takes care of the extra memory allocation for 'connected' in clients.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Dinesh Dutt <ddutt@cumulusnetworks.com>
Ticket: CM-10745
Reviewed By: CCR-4660
Testing Done: Manual, bgp-min
lib/zclient.c