0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-08 12:18:42 +00:00

Minor fixes

This commit is contained in:
Ondrej Zajicek (work) 2017-04-29 00:36:35 +02:00
parent e919601aaf
commit 1d21306785
4 changed files with 8 additions and 4 deletions

View File

@ -629,7 +629,7 @@ r_args_for:
net_fill_ip_host($$, SYM_VAL($1).ip); net_fill_ip_host($$, SYM_VAL($1).ip);
} }
else if (($1->class == (SYM_CONSTANT | T_NET)) && net_type_match(SYM_VAL($1).net, NB_IP | NB_VPN)) else if (($1->class == (SYM_CONSTANT | T_NET)) && net_type_match(SYM_VAL($1).net, NB_IP | NB_VPN))
$$ = SYM_VAL($1).net; $$ = (net_addr *) SYM_VAL($1).net; /* Avoid const warning */
else else
cf_error("IP address or network expected"); cf_error("IP address or network expected");
} }

View File

@ -148,7 +148,7 @@ CF_KEYWORDS(ELIGIBLE, POLL, NETWORKS, HIDDEN, VIRTUAL, CHECK, LINK, ONLY, BFD)
CF_KEYWORDS(RX, BUFFER, LARGE, NORMAL, STUBNET, HIDDEN, SUMMARY, TAG, EXTERNAL) CF_KEYWORDS(RX, BUFFER, LARGE, NORMAL, STUBNET, HIDDEN, SUMMARY, TAG, EXTERNAL)
CF_KEYWORDS(WAIT, DELAY, LSADB, ECMP, LIMIT, WEIGHT, NSSA, TRANSLATOR, STABILITY) CF_KEYWORDS(WAIT, DELAY, LSADB, ECMP, LIMIT, WEIGHT, NSSA, TRANSLATOR, STABILITY)
CF_KEYWORDS(GLOBAL, LSID, ROUTER, SELF, INSTANCE, REAL, NETMASK, TX, PRIORITY, LENGTH) CF_KEYWORDS(GLOBAL, LSID, ROUTER, SELF, INSTANCE, REAL, NETMASK, TX, PRIORITY, LENGTH)
CF_KEYWORDS(SECONDARY, MERGE, LSA, SUPPRESSION, OSPF2, OSPF3) CF_KEYWORDS(SECONDARY, MERGE, LSA, SUPPRESSION)
%type <ld> lsadb_args %type <ld> lsadb_args
%type <i> ospf_variant nbma_eligible %type <i> ospf_variant nbma_eligible

View File

@ -146,8 +146,9 @@ krt_capable(rte *e)
{ {
rta *a = e->attrs; rta *a = e->attrs;
/* XXXX device routes are broken */
return return
((a->dest == RTD_UNICAST && !a->nh.next) /* No multipath support */ ((a->dest == RTD_UNICAST && ipa_nonzero(a->nh.gw) && !a->nh.next) /* No multipath support */
#ifdef RTF_REJECT #ifdef RTF_REJECT
|| a->dest == RTD_UNREACHABLE || a->dest == RTD_UNREACHABLE
#endif #endif
@ -254,7 +255,7 @@ krt_send_route(struct krt_proto *p, int cmd, rte *e)
af = AF_INET6; af = AF_INET6;
break; break;
default: default:
log(L_ERR "KRT: Not sending VPN route %N to kernel", net->n.addr); log(L_ERR "KRT: Not sending route %N to kernel", net->n.addr);
return -1; return -1;
} }
@ -299,6 +300,7 @@ krt_send_route(struct krt_proto *p, int cmd, rte *e)
sockaddr_fill(&gate, ipa_is_ip4(i->addr->ip) ? AF_INET : AF_INET6, i->addr->ip, NULL, 0); sockaddr_fill(&gate, ipa_is_ip4(i->addr->ip) ? AF_INET : AF_INET6, i->addr->ip, NULL, 0);
msg.rtm.rtm_addrs |= RTA_GATEWAY; msg.rtm.rtm_addrs |= RTA_GATEWAY;
break;
} }
default: default:

View File

@ -1142,7 +1142,9 @@ krt_start(struct proto *P)
{ {
case NET_IP4: p->af = AF_INET; break; case NET_IP4: p->af = AF_INET; break;
case NET_IP6: p->af = AF_INET6; break; case NET_IP6: p->af = AF_INET6; break;
#ifdef AF_MPLS
case NET_MPLS: p->af = AF_MPLS; break; case NET_MPLS: p->af = AF_MPLS; break;
#endif
default: log(L_ERR "KRT: Tried to start with strange net type: %d", p->p.net_type); return PS_START; break; default: log(L_ERR "KRT: Tried to start with strange net type: %d", p->p.net_type); return PS_START; break;
} }