mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-10 05:08:42 +00:00
Rip should now reconfigure itself only if needed.
This commit is contained in:
parent
60de3356ab
commit
898fdd85dc
@ -886,15 +886,21 @@ rip_get_attr(eattr *a, byte *buf)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
rip_pat_compare(struct rip_patt *a, struct rip_patt *b)
|
||||||
|
{
|
||||||
|
return ((a->metric == b->metric) &&
|
||||||
|
(a->mode == b->mode));
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
rip_reconfigure(struct proto *p, struct proto_config *c)
|
rip_reconfigure(struct proto *p, struct proto_config *c)
|
||||||
{
|
{
|
||||||
struct rip_proto_config *new = (struct rip_proto_config *) c;
|
struct rip_proto_config *new = (struct rip_proto_config *) c;
|
||||||
int generic = sizeof(struct proto_config) + sizeof(list) /* + sizeof(struct password_item *) */;
|
int generic = sizeof(struct proto_config) + sizeof(list) /* + sizeof(struct password_item *) */;
|
||||||
|
|
||||||
/* FIXME: patt_same needed */
|
if (!iface_patts_equal(&P_CF->iface_list, &new->iface_list, (void *) rip_pat_compare))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!password_same(P_CF->passwords,
|
if (!password_same(P_CF->passwords,
|
||||||
new->passwords))
|
new->passwords))
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -111,7 +111,7 @@ struct rip_interface {
|
|||||||
struct rip_patt {
|
struct rip_patt {
|
||||||
struct iface_patt i;
|
struct iface_patt i;
|
||||||
|
|
||||||
int metric;
|
int metric; /* If you add entries here, don't forget to modify patt_compare! */
|
||||||
int mode;
|
int mode;
|
||||||
#define IM_BROADCAST 2
|
#define IM_BROADCAST 2
|
||||||
#define IM_QUIET 4
|
#define IM_QUIET 4
|
||||||
@ -124,7 +124,7 @@ struct rip_proto_config {
|
|||||||
list iface_list; /* Patterns configured -- keep it first; see rip_reconfigure why */
|
list iface_list; /* Patterns configured -- keep it first; see rip_reconfigure why */
|
||||||
struct password_item *passwords; /* Passwords, keep second */
|
struct password_item *passwords; /* Passwords, keep second */
|
||||||
|
|
||||||
int infinity; /* User configurable data */
|
int infinity; /* User configurable data; must be comparable with memcmp */
|
||||||
int port;
|
int port;
|
||||||
int period;
|
int period;
|
||||||
int garbage_time;
|
int garbage_time;
|
||||||
|
Loading…
Reference in New Issue
Block a user