mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-17 08:38:42 +00:00
Kill duplicity between rif and rif_patt.
This commit is contained in:
parent
72efa4b6f8
commit
9607536dbf
@ -93,8 +93,8 @@ CF_CODE
|
|||||||
void
|
void
|
||||||
rip_dev_add_iface(char *n)
|
rip_dev_add_iface(char *n)
|
||||||
{
|
{
|
||||||
struct rip_patt *k = cfg_alloc(sizeof(struct rip_patt));
|
struct rip_patt *k = cfg_allocz(sizeof(struct rip_patt));
|
||||||
|
k->metric = 1;
|
||||||
k->i.pattern = cfg_strdup(n);
|
k->i.pattern = cfg_strdup(n);
|
||||||
add_tail(&RIP_CFG->iface_list, &k->i.n);
|
add_tail(&RIP_CFG->iface_list, &k->i.n);
|
||||||
}
|
}
|
||||||
|
@ -218,7 +218,7 @@ advertise_entry( struct proto *p, struct rip_block *b, ip_addr whotoldme )
|
|||||||
}
|
}
|
||||||
n = net_get( p->table, b->network, ipa_mklen( b->netmask ));
|
n = net_get( p->table, b->network, ipa_mklen( b->netmask ));
|
||||||
r = rte_get_temp(a);
|
r = rte_get_temp(a);
|
||||||
r->u.rip.metric = ntohl(b->metric) + rif->metric;
|
r->u.rip.metric = ntohl(b->metric) + rif->patt->metric;
|
||||||
if (r->u.rip.metric > P_CF->infinity) r->u.rip.metric = P_CF->infinity;
|
if (r->u.rip.metric > P_CF->infinity) r->u.rip.metric = P_CF->infinity;
|
||||||
r->u.rip.tag = ntohl(b->tag);
|
r->u.rip.tag = ntohl(b->tag);
|
||||||
r->net = n;
|
r->net = n;
|
||||||
|
@ -87,14 +87,6 @@ struct rip_interface {
|
|||||||
sock *sock;
|
sock *sock;
|
||||||
struct rip_connection *busy;
|
struct rip_connection *busy;
|
||||||
struct rip_patt *patt;
|
struct rip_patt *patt;
|
||||||
|
|
||||||
int metric; /* User configurable data */
|
|
||||||
int mode;
|
|
||||||
#define IM_MULTICAST 1
|
|
||||||
#define IM_BROADCAST 2
|
|
||||||
#define IM_QUIET 4
|
|
||||||
#define IM_NOLISTEN 8
|
|
||||||
#define IM_VERSION1 16
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct rip_patt {
|
struct rip_patt {
|
||||||
@ -102,6 +94,11 @@ struct rip_patt {
|
|||||||
|
|
||||||
int metric;
|
int metric;
|
||||||
int mode;
|
int mode;
|
||||||
|
#define IM_MULTICAST 1
|
||||||
|
#define IM_BROADCAST 2
|
||||||
|
#define IM_QUIET 4
|
||||||
|
#define IM_NOLISTEN 8
|
||||||
|
#define IM_VERSION1 16
|
||||||
};
|
};
|
||||||
|
|
||||||
struct rip_proto_config {
|
struct rip_proto_config {
|
||||||
|
Loading…
Reference in New Issue
Block a user