summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorRainer Giedat <rainer@cvs.openbsd.org>2009-06-06 12:31:18 +0000
committerRainer Giedat <rainer@cvs.openbsd.org>2009-06-06 12:31:18 +0000
commitcfe4fea0caf4150f011cd4f4ebb3201544b34da7 (patch)
tree36b6892682a176a1b4fcddd19fb5c974c8cc9046 /sys/net
parent89874b996b9fb501bd014bb5dce3122c235936e4 (diff)
when xflags got changed, tell the userland by routing sockets
ok henning@
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if.c3
-rw-r--r--sys/net/if.h4
-rw-r--r--sys/net/rtsock.c3
3 files changed, 6 insertions, 4 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index f12eb449425..b6311d511e3 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.195 2009/06/05 03:10:28 halex Exp $ */
+/* $OpenBSD: if.c,v 1.196 2009/06/06 12:31:17 rainer Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
@@ -1312,6 +1312,7 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, struct proc *p)
ifp->if_xflags = (ifp->if_xflags & IFXF_CANTCHANGE) |
(ifr->ifr_flags &~ IFXF_CANTCHANGE);
+ rt_ifmsg(ifp);
break;
case SIOCSIFMETRIC:
diff --git a/sys/net/if.h b/sys/net/if.h
index 65e40ef621f..ebec346c825 100644
--- a/sys/net/if.h
+++ b/sys/net/if.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.h,v 1.106 2009/06/05 00:05:21 claudio Exp $ */
+/* $OpenBSD: if.h,v 1.107 2009/06/06 12:31:17 rainer Exp $ */
/* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */
/*
@@ -424,7 +424,7 @@ struct if_msghdr {
u_short ifm_pad;
int ifm_addrs; /* like rtm_addrs */
int ifm_flags; /* value of if_flags */
- int ifm_pad2;
+ int ifm_xflags;
struct if_data ifm_data;/* statistics and other data about if */
};
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
index f1615869a99..358d918b89d 100644
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtsock.c,v 1.88 2009/06/05 00:05:22 claudio Exp $ */
+/* $OpenBSD: rtsock.c,v 1.89 2009/06/06 12:31:17 rainer Exp $ */
/* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */
/*
@@ -1017,6 +1017,7 @@ rt_ifmsg(struct ifnet *ifp)
ifm = mtod(m, struct if_msghdr *);
ifm->ifm_index = ifp->if_index;
ifm->ifm_flags = ifp->if_flags;
+ ifm->ifm_xflags = ifp->if_xflags;
ifm->ifm_data = ifp->if_data;
ifm->ifm_addrs = 0;
route_proto.sp_protocol = 0;