diff options
author | Dug Song <dugsong@cvs.openbsd.org> | 2002-01-02 20:56:15 +0000 |
---|---|---|
committer | Dug Song <dugsong@cvs.openbsd.org> | 2002-01-02 20:56:15 +0000 |
commit | bd962896f31431d940809289907da5d46cd4447b (patch) | |
tree | 07bc49c350d1b202d47f26c751af5476e343c6c7 | |
parent | 420eb88367b657084545ad35792707cdae119c02 (diff) |
allow for setting of the loopback MTU, set IFF_RUNNING on address configuration
-rw-r--r-- | sys/net/if_loop.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c index 307702dd0e7..80cad1e86a1 100644 --- a/sys/net/if_loop.c +++ b/sys/net/if_loop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_loop.c,v 1.21 2001/12/18 23:07:49 deraadt Exp $ */ +/* $OpenBSD: if_loop.c,v 1.22 2002/01/02 20:56:14 dugsong Exp $ */ /* $NetBSD: if_loop.c,v 1.15 1996/05/07 02:40:33 thorpej Exp $ */ /* @@ -457,7 +457,7 @@ loioctl(ifp, cmd, data) switch (cmd) { case SIOCSIFADDR: - ifp->if_flags |= IFF_UP; + ifp->if_flags |= IFF_UP | IFF_RUNNING; ifa = (struct ifaddr *)data; if (ifa != 0 /*&& ifa->ifa_addr->sa_family == AF_ISO*/) ifa->ifa_rtrequest = lortrequest; @@ -490,6 +490,11 @@ loioctl(ifp, cmd, data) } break; + case SIOCSIFMTU: + ifr = (struct ifreq *)data; + ifp->if_mtu = ifr->ifr_mtu; + break; + default: error = EINVAL; } |