]> git.proxmox.com Git - mirror_frr.git/commit - zebra/rib.h
zebra: maintain RTADV per VRF
authorFeng Lu <lu.feng@6wind.com>
Fri, 22 May 2015 09:40:10 +0000 (11:40 +0200)
committerVipin Kumar <vipin@cumulusnetworks.com>
Fri, 30 Oct 2015 07:57:27 +0000 (00:57 -0700)
commitcd80d74fb275fe68247891d071075f450d4ec41c
treef9d14517c439e1971a11402ef64f832be828271e
parenta31c5886dda74cab102671d3712fa2070e50d8ed
zebra: maintain RTADV per VRF

This moves the global variable "rtadv" into the "struct zebra_vrf",
so that RTADV feature can work per VRF.

* rtadv.c/rtadv.h:

  Add a proper parameter to the functions so that the entity of the
  "struct zebra_vrf" and interfaces can be obtained from the specified
  VRF.

  The old rtadv_init() is splitted into:
  - rtadv_cmd_init(): it installs the RTADV commands; is called from
                      main();
  - new rtadv_init(): it creates the socket; is called from
                      zebra_vrf_enable().

  rtadv_terminate() is added to stop the threads, close the socket and
  clear the counters. It is called from zebra_vrf_disable().

  rtadv_make_socket() now calls vrf_socket() to create a socket in
  the VRF.

* interface.h and rib.h: define the macro RTADV.
* main.c: according changes, refer to rtadv.c.

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: Vincent JARDIN <vincent.jardin@6wind.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Conflicts:
zebra/interface.h
zebra/rib.h
zebra/rtadv.c
zebra/rtadv.h
zebra/interface.h
zebra/main.c
zebra/rib.h
zebra/rtadv.c
zebra/rtadv.h