mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 04:50:29 +00:00
2005-07-29 Paul Jakma <paul.jakma@sun.com>
* interface.c: (if_delete_update) should always be available, not just on RTM_IFANNOUNCE/NETLINK systems. * kernel_socket.c: (ifan_read) only call if_delete_update when interface departs, dont if_delete, because we wish to retain interface configuration state even when interfaces are removed. (ifm_read) If we dont have RTM_IFANNOUNCE, then transitioning to down state is only chance we have to clean up interface in case it is deleted (eg Solaris down -> unplumb -> plumb up). * redistribute.c: (zebra_interface_delete_update) should always be available, we /will/ call it now on all systems, via if_delete_update. * zserv.c: (zsend_interface_delete) ditto (zsend_interface_address) Update the call-flow diagramme, to reflect that if_delete_update /is/ now called on all systems, potentially. * zserv.h: (zsend_interface_delete) unconditionally exported, as above.
This commit is contained in:
parent
7907c6c9d3
commit
6eb8827d66
@ -1,3 +1,23 @@
|
|||||||
|
2005-07-29 Paul Jakma <paul.jakma@sun.com>
|
||||||
|
|
||||||
|
* interface.c: (if_delete_update) should always be available, not
|
||||||
|
just on RTM_IFANNOUNCE/NETLINK systems.
|
||||||
|
* kernel_socket.c: (ifan_read) only call if_delete_update when
|
||||||
|
interface departs, dont if_delete, because we wish to retain
|
||||||
|
interface configuration state even when interfaces are removed.
|
||||||
|
(ifm_read) If we dont have RTM_IFANNOUNCE, then transitioning
|
||||||
|
to down state is only chance we have to clean up interface in case
|
||||||
|
it is deleted (eg Solaris down -> unplumb -> plumb up).
|
||||||
|
* redistribute.c: (zebra_interface_delete_update) should always be
|
||||||
|
available, we /will/ call it now on all systems, via
|
||||||
|
if_delete_update.
|
||||||
|
* zserv.c: (zsend_interface_delete) ditto
|
||||||
|
(zsend_interface_address) Update the call-flow diagramme, to
|
||||||
|
reflect that if_delete_update /is/ now called on all systems,
|
||||||
|
potentially.
|
||||||
|
* zserv.h: (zsend_interface_delete) unconditionally exported, as
|
||||||
|
above.
|
||||||
|
|
||||||
2005-06-28 Paul Jakma <paul.jakma@sun.com>
|
2005-06-28 Paul Jakma <paul.jakma@sun.com>
|
||||||
|
|
||||||
* (global) Extern and static'ification, with related fixups
|
* (global) Extern and static'ification, with related fixups
|
||||||
|
@ -290,14 +290,7 @@ if_add_update (struct interface *ifp)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Handle an interface delete event */
|
||||||
/* Handle an interface delete event
|
|
||||||
*
|
|
||||||
* This function is only called when support for
|
|
||||||
* RTM_IFANNOUNCE or AF_NETLINK sockets (RTM_DELLINK message)
|
|
||||||
* is available. It is not called on, eg, Solaris.
|
|
||||||
*/
|
|
||||||
#if (defined(RTM_IFANNOUNCE) || defined(HAVE_NETLINK))
|
|
||||||
void
|
void
|
||||||
if_delete_update (struct interface *ifp)
|
if_delete_update (struct interface *ifp)
|
||||||
{
|
{
|
||||||
@ -405,7 +398,6 @@ if_delete_update (struct interface *ifp)
|
|||||||
interface deletion message. */
|
interface deletion message. */
|
||||||
ifp->ifindex = IFINDEX_INTERNAL;
|
ifp->ifindex = IFINDEX_INTERNAL;
|
||||||
}
|
}
|
||||||
#endif /* (defined(RTM_IFANNOUNCE) || defined(HAVE_NETLINK) */
|
|
||||||
|
|
||||||
/* Interface is up. */
|
/* Interface is up. */
|
||||||
void
|
void
|
||||||
|
@ -227,10 +227,7 @@ ifan_read (struct if_announcemsghdr *ifan)
|
|||||||
if_add_update (ifp);
|
if_add_update (ifp);
|
||||||
}
|
}
|
||||||
else if (ifp != NULL && ifan->ifan_what == IFAN_DEPARTURE)
|
else if (ifp != NULL && ifan->ifan_what == IFAN_DEPARTURE)
|
||||||
{
|
|
||||||
if_delete_update (ifp);
|
if_delete_update (ifp);
|
||||||
if_delete (ifp);
|
|
||||||
}
|
|
||||||
|
|
||||||
if_get_flags (ifp);
|
if_get_flags (ifp);
|
||||||
if_get_mtu (ifp);
|
if_get_mtu (ifp);
|
||||||
@ -397,7 +394,21 @@ ifm_read (struct if_msghdr *ifm)
|
|||||||
{
|
{
|
||||||
ifp->flags = ifm->ifm_flags;
|
ifp->flags = ifm->ifm_flags;
|
||||||
if (! if_is_up (ifp))
|
if (! if_is_up (ifp))
|
||||||
|
{
|
||||||
if_down (ifp);
|
if_down (ifp);
|
||||||
|
#ifndef RTM_IFANNOUNCE
|
||||||
|
/* No RTM_IFANNOUNCE on this platform, so we can never
|
||||||
|
* distinguish between down and delete. We must presume
|
||||||
|
* it has been deleted.
|
||||||
|
* Eg, Solaris will not notify us of unplumb.
|
||||||
|
*
|
||||||
|
* XXX: Fixme - this should be runtime detected
|
||||||
|
* So that a binary compiled on a system with IFANNOUNCE
|
||||||
|
* will still behave correctly if run on a platform without
|
||||||
|
*/
|
||||||
|
if_delete_update (ifp);
|
||||||
|
#endif /* RTM_IFANNOUNCE */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -345,12 +345,6 @@ zebra_interface_add_update (struct interface *ifp)
|
|||||||
zsend_interface_add (client, ifp);
|
zsend_interface_add (client, ifp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* This function is only called when support for
|
|
||||||
* RTM_IFANNOUNCE or AF_NETLINK sockets (RTM_DELLINK message)
|
|
||||||
* is available. It is not called on Solaris.
|
|
||||||
*/
|
|
||||||
#if (defined(RTM_IFANNOUNCE) || defined(HAVE_NETLINK))
|
|
||||||
void
|
void
|
||||||
zebra_interface_delete_update (struct interface *ifp)
|
zebra_interface_delete_update (struct interface *ifp)
|
||||||
{
|
{
|
||||||
@ -364,7 +358,6 @@ zebra_interface_delete_update (struct interface *ifp)
|
|||||||
if (client->ifinfo)
|
if (client->ifinfo)
|
||||||
zsend_interface_delete (client, ifp);
|
zsend_interface_delete (client, ifp);
|
||||||
}
|
}
|
||||||
#endif /* defined(RTM_IFANNOUNCE) || defined(HAVE_NETLINK) */
|
|
||||||
|
|
||||||
/* Interface address addition. */
|
/* Interface address addition. */
|
||||||
void
|
void
|
||||||
|
@ -203,12 +203,6 @@ zsend_interface_add (struct zserv *client, struct interface *ifp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Interface deletion from zebra daemon. */
|
/* Interface deletion from zebra daemon. */
|
||||||
/*
|
|
||||||
* This function is only called when support for
|
|
||||||
* RTM_IFANNOUNCE or AF_NETLINK sockets (RTM_DELLINK message)
|
|
||||||
* is available. It is not called on Solaris.
|
|
||||||
*/
|
|
||||||
#if (defined(RTM_IFANNOUNCE) || defined(HAVE_NETLINK))
|
|
||||||
int
|
int
|
||||||
zsend_interface_delete (struct zserv *client, struct interface *ifp)
|
zsend_interface_delete (struct zserv *client, struct interface *ifp)
|
||||||
{
|
{
|
||||||
@ -240,7 +234,6 @@ zsend_interface_delete (struct zserv *client, struct interface *ifp)
|
|||||||
|
|
||||||
return zebra_server_send_message (client);
|
return zebra_server_send_message (client);
|
||||||
}
|
}
|
||||||
#endif /* (defined(RTM_IFANNOUNCE) || defined(HAVE_LINUX_RTNETLINK_H)) */
|
|
||||||
|
|
||||||
/* Interface address is added/deleted. Send ZEBRA_INTERFACE_ADDRESS_ADD or
|
/* Interface address is added/deleted. Send ZEBRA_INTERFACE_ADDRESS_ADD or
|
||||||
* ZEBRA_INTERFACE_ADDRESS_DELETE to the client.
|
* ZEBRA_INTERFACE_ADDRESS_DELETE to the client.
|
||||||
@ -266,8 +259,8 @@ zsend_interface_delete (struct zserv *client, struct interface *ifp)
|
|||||||
* |
|
* |
|
||||||
* zebra_interface_address_delete_update
|
* zebra_interface_address_delete_update
|
||||||
* ^ ^ ^
|
* ^ ^ ^
|
||||||
* | | if_delete_update (not called on
|
* | | if_delete_update
|
||||||
* | | Solaris)
|
* | |
|
||||||
* ip_address_uninstall connected_delete_ipv4
|
* ip_address_uninstall connected_delete_ipv4
|
||||||
* [ipv6_addresss_uninstall] [connected_delete_ipv6]
|
* [ipv6_addresss_uninstall] [connected_delete_ipv6]
|
||||||
* ^ ^
|
* ^ ^
|
||||||
|
@ -96,9 +96,7 @@ extern void zebra_snmp_init (void);
|
|||||||
extern void zebra_vty_init (void);
|
extern void zebra_vty_init (void);
|
||||||
|
|
||||||
extern int zsend_interface_add (struct zserv *, struct interface *);
|
extern int zsend_interface_add (struct zserv *, struct interface *);
|
||||||
#if (defined(RTM_IFANNOUNCE) || defined(HAVE_NETLINK))
|
|
||||||
extern int zsend_interface_delete (struct zserv *, struct interface *);
|
extern int zsend_interface_delete (struct zserv *, struct interface *);
|
||||||
#endif
|
|
||||||
extern int zsend_interface_address (int, struct zserv *, struct interface *,
|
extern int zsend_interface_address (int, struct zserv *, struct interface *,
|
||||||
struct connected *);
|
struct connected *);
|
||||||
extern int zsend_interface_update (int, struct zserv *, struct interface *);
|
extern int zsend_interface_update (int, struct zserv *, struct interface *);
|
||||||
|
Loading…
Reference in New Issue
Block a user