Commit Graph

6 Commits

Author SHA1 Message Date
Feng Lu
8f7d9fc088 zebra, lib/memtypes.c: the netlink sockets work per VRF
This patch lets the netlink sockets work per VRF.

* The definition of "struct nlsock" is moved into zebra/rib.h.

* The previous global variables "netlink" and "netlink_cmd" now
  become the members of "struct zebra_vrf", and are initialized
  in zebra_vrf_alloc().

* All relative functions now work for a specific VRF, by adding
  a new parameter which specifies the working VRF, except those
  functions in which the VRF ID can be obtained from the interface.

* kernel_init(), interface_list() and route_read() are now also
  working per VRF, and moved from main() to zebra_vrf_enable().

* A new function kernel_terminate() is added to release the
  netlink sockets. It is called from zebra_vrf_disable().

* Correct VRF ID, instead of the previous VRF_DEFAULT, are now
  passed to the functions of processing interfaces or route
  entries.

Signed-off-by: Feng Lu <lu.feng@6wind.com>
Reviewed-by: Alain Ritoux <alain.ritoux@6wind.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>

Conflicts:
	lib/memtypes.c
	zebra/rib.h
	zebra/rt_netlink.c

Conflicts:
	zebra/if_netlink.c
	zebra/if_sysctl.c
	zebra/kernel_null.c
	zebra/rib.h
	zebra/rt_netlink.c
	zebra/rt_netlink.h
2015-10-30 01:45:21 -07:00
Donald Sharp
495f0b13e1 Fix some more memory issues in Quagga
Ticket: CM-4109
Reviewed-by: CCR-3414
Testing: See bug

Fixup of these memory issues:

(A) peer->clear_node_queue was accidently removed.  Add back in.
(B) Clean up bm->process_main_queue and bm->process_rsclient_queue initialization
(C) Some memory leaks
(D) Clean up unused threads
2015-09-02 05:19:44 -07:00
Paul Jakma
f28b0e57bd [zebra] fix inconsistencies in ifstat_update_* declarations and definitions
2006-08-06 Paul Jakma <paul.jakma@sun.com>

	* interface.h: (ifstat_update_proc) declaration should match
	  ifstat_update_sysctl really, which is to not return status, as
	  such status is not used anywhere.
	* if_{proc,sysctl}.c: Make ifstat_update_* definitions and return values
	  consistent with each other and their declarations, ie:
	  (void) (*) (void).
2006-08-06 15:57:59 +00:00
paul
ec1a428343 [zebra] Fix mistake in previous commit and further compile warnings/errors.
2005-11-24 Paul Jakma <paul.jakma@sun.com>

	* kernel_socket.h: New header for functions exported to sysctl
	  methods.
	* kernel_socket.c: include previous.
	  Remove static qualifier from couple of functions which are
	  used by sysctl methods, incorrectly added in previous commit.
	  Add a workaround for a bogus gcc warning to the RTA_ macros.
	* Makefile.am: Add kernel_socket.h to noinst_HEADERS
	* if_sysctl.c: include rt.h and kernel_socket.h and remove
	  redundant prototypes.
	* rtread_sysctl.c: ditto.
	  (route_read) fix mismatch of return values.
	* {rt,zserv,rib}.h: Include lib headers depended on.
2005-11-24 15:15:17 +00:00
ajs
6099b3b569 2004-11-19 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* global: Replace strerror with safe_strerror.  And vtysh/vtysh.c
	  needs to include "log.h" to pick up the declaration.
2004-11-20 02:06:59 +00:00
paul
718e374419 Initial revision 2002-12-13 20:15:29 +00:00