diff options
author | Michele Marchetto <michele@cvs.openbsd.org> | 2009-07-07 12:07:24 +0000 |
---|---|---|
committer | Michele Marchetto <michele@cvs.openbsd.org> | 2009-07-07 12:07:24 +0000 |
commit | 1340466e7b5c0619f81916c63ff7e64d8d270794 (patch) | |
tree | 45f56d383842c76e0d97ef49b691a92fe4f7d082 /usr.sbin/ripd | |
parent | 196bd7eb5ab99ca0934c1ec41057eca1446b23bb (diff) |
Make ripd(8) aware of MPLS routes.
ok claudio@
Diffstat (limited to 'usr.sbin/ripd')
-rw-r--r-- | usr.sbin/ripd/kroute.c | 6 | ||||
-rw-r--r-- | usr.sbin/ripd/ripd.h | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/ripd/kroute.c b/usr.sbin/ripd/kroute.c index 6554f17c09e..f42fd63a4d8 100644 --- a/usr.sbin/ripd/kroute.c +++ b/usr.sbin/ripd/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.16 2009/06/05 22:40:24 chris Exp $ */ +/* $OpenBSD: kroute.c,v 1.17 2009/07/07 12:07:23 michele Exp $ */ /* * Copyright (c) 2004 Esben Norby <norby@openbsd.org> @@ -178,7 +178,7 @@ kr_change(struct kroute *kroute) action = RTM_CHANGE; else { /* a non-rip route already exists. not a problem */ if (!(kr->r.flags & (F_BGPD_INSERTED| - F_OSPFD_INSERTED))) { + F_OSPFD_INSERTED|F_LDPD_INSERTED))) { kr->r.flags |= F_RIPD_INSERTED; return (0); } @@ -1113,6 +1113,8 @@ dispatch_rtmsg(void) flags |= F_BGPD_INSERTED; if (rtm->rtm_flags & RTF_PROTO2) flags |= F_OSPFD_INSERTED; + if (rtm->rtm_flags & RTF_MPLS) + flags |= F_LDPD_INSERTED; break; default: continue; diff --git a/usr.sbin/ripd/ripd.h b/usr.sbin/ripd/ripd.h index aebb9c8c0f7..94b7045bb3e 100644 --- a/usr.sbin/ripd/ripd.h +++ b/usr.sbin/ripd/ripd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ripd.h,v 1.15 2009/06/06 18:31:42 pyr Exp $ */ +/* $OpenBSD: ripd.h,v 1.16 2009/07/07 12:07:23 michele Exp $ */ /* * Copyright (c) 2004 Esben Norby <norby@openbsd.org> @@ -59,6 +59,7 @@ #define F_REDISTRIBUTED 0x0100 #define F_REJECT 0x0200 #define F_BLACKHOLE 0x0400 +#define F_LDPD_INSERTED 0x0800 #define REDISTRIBUTE_ON 0x01 |