Merge pull request #697 from donaldsharp/rt_proto_fixes

tools, zebra: Fix netlink notification of who owns the routes
This commit is contained in:
Jafar Al-Gharaibeh 2017-06-08 10:28:35 -05:00 committed by GitHub
commit b61246cacf
3 changed files with 18 additions and 2 deletions

View File

@ -5,4 +5,6 @@
188 ospf
189 rip
190 ripng
191 static
191 nhrp
192 eigrp
193 ldp

View File

@ -121,7 +121,9 @@ static inline int is_selfroute(int proto)
{
if ((proto == RTPROT_BGP) || (proto == RTPROT_OSPF) ||
(proto == RTPROT_STATIC) || (proto == RTPROT_ZEBRA) ||
(proto == RTPROT_ISIS) || (proto == RTPROT_RIPNG)) {
(proto == RTPROT_ISIS) || (proto == RTPROT_RIPNG) ||
(proto == RTPROT_NHRP) || (proto == RTPROT_EIGRP) ||
(proto == RTPROT_LDP)) {
return 1;
}
@ -150,6 +152,15 @@ static inline int get_rt_proto(int proto)
case ZEBRA_ROUTE_RIPNG:
proto = RTPROT_RIPNG;
break;
case ZEBRA_ROUTE_NHRP:
proto = RTPROT_NHRP;
break;
case ZEBRA_ROUTE_EIGRP:
proto = RTPROT_EIGRP;
break;
case ZEBRA_ROUTE_LDP:
proto = RTPROT_LDP;
break;
default:
proto = RTPROT_ZEBRA;
break;

View File

@ -33,6 +33,9 @@
#define RTPROT_OSPF 188
#define RTPROT_RIP 189
#define RTPROT_RIPNG 190
#define RTPROT_NHRP 191
#define RTPROT_EIGRP 192
#define RTPROT_LDP 193
void rt_netlink_init (void);