summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorMichele Marchetto <michele@cvs.openbsd.org>2009-07-07 10:38:50 +0000
committerMichele Marchetto <michele@cvs.openbsd.org>2009-07-07 10:38:50 +0000
commit196bd7eb5ab99ca0934c1ec41057eca1446b23bb (patch)
tree081ab452a2d90fa23980d7d210a2ad51913e19be /sys/net
parente02e214e0e9fce685689e610f64bba71d9467d86 (diff)
When adding or changing a MPLS route, add RTF_MPLS flag to
routing message. We can then rely on that flag to spot out MPLS routes coming from routing socket. ok claudio@
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/rtsock.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
index 01b2aef98f3..a8e82dac76b 100644
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtsock.c,v 1.92 2009/06/26 10:14:24 blambert Exp $ */
+/* $OpenBSD: rtsock.c,v 1.93 2009/07/07 10:38:49 michele Exp $ */
/* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */
/*
@@ -738,8 +738,13 @@ flush:
if (rtm) {
if (error)
rtm->rtm_errno = error;
- else
+ else {
+#ifdef MPLS
+ if (rt && rt->rt_flags & RTF_MPLS)
+ rtm->rtm_flags |= RTF_MPLS;
+#endif
rtm->rtm_flags |= RTF_DONE;
+ }
}
if (rt)
rtfree(rt);