diff options
author | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2005-02-07 15:00:18 +0000 |
---|---|---|
committer | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2005-02-07 15:00:18 +0000 |
commit | 479870d83e372c6b6d1b97b9e2f9a60f4ab14e6c (patch) | |
tree | 2cdf846fd2fa071cc1541a650986172c7887263a /sys/net/if.c | |
parent | 968ced4fb7bf97052f93cb0a1de75ef4355b24f5 (diff) |
Add new function if_link_state_change() to take care of sending messages
on the routing socket and notifying carp() of link changes.
ok brad@ mpf@
Diffstat (limited to 'sys/net/if.c')
-rw-r--r-- | sys/net/if.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 94374a5ebe2..16308d8b767 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.103 2005/01/18 22:10:10 claudio Exp $ */ +/* $OpenBSD: if.c,v 1.104 2005/02/07 15:00:16 mcbride Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -1105,6 +1105,21 @@ if_up(struct ifnet *ifp) } /* + * Process a link state change. + * NOTE: must be called at splsoftnet or equivalent. + * XXX Should be converted to dohooks(). + */ +void +if_link_state_change(struct ifnet *ifp) +{ + rt_ifmsg(ifp); +#if NCARP > 0 + if (ifp->if_carp) + carp_carpdev_state(ifp); +#endif +} + +/* * Flush an interface queue. */ void |