diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-09-16 22:31:31 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-09-16 22:31:31 +0000 |
commit | 5143d65d315fdb722683cbbad4324a8a864007e4 (patch) | |
tree | 4035b3323459de3749e691081c6081acd27f395f /sys/net/rtsock.c | |
parent | cce6f8bb3aaa193e0d2562fc59e8b2e0f1f58d90 (diff) |
handle route labels on RTM_CHANGE, ok mcbride, prodded my markus some time ago
Diffstat (limited to 'sys/net/rtsock.c')
-rw-r--r-- | sys/net/rtsock.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 41962950d62..f19aabbf2cd 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtsock.c,v 1.42 2004/08/03 11:22:15 henning Exp $ */ +/* $OpenBSD: rtsock.c,v 1.43 2004/09/16 22:31:29 henning Exp $ */ /* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */ /* @@ -402,6 +402,13 @@ report: rt->rt_ifa->ifa_rtrequest(RTM_ADD, rt, &info); if (genmask) rt->rt_genmask = genmask; + if (info.rti_info[RTAX_LABEL] != NULL) { + char *rtlabel = ((struct sockaddr_rtlabel *) + info.rti_info[RTAX_LABEL])->sr_label; + rtlabel_unref(rt->rt_labelid); + rt->rt_labelid = + rtlabel_name2id(rtlabel); + } /* fallthrough */ case RTM_LOCK: rt->rt_rmx.rmx_locks &= ~(rtm->rtm_inits); |