diff options
| author | 2000-05-23 11:23:22 +0000 | |
|---|---|---|
| committer | 2000-05-23 11:23:22 +0000 | |
| commit | be3828fb275beecd6e20ee78d7cadd48b67e946c (patch) | |
| tree | f85b49749432ce58ac73033f2fd9ff54c12187ee /usr.sbin/rtadvd/if.c | |
| parent | doc actual tun behaviour; jon@spock.org (diff) | |
| download | wireguard-openbsd-be3828fb275beecd6e20ee78d7cadd48b67e946c.tar.xz wireguard-openbsd-be3828fb275beecd6e20ee78d7cadd48b67e946c.zip | |
sync with latest kame.
- weaken logging priority for /etc/resolv.conf open failure
- gather stats, emit stats by SIGUSR1
- use SIOCGIFMTU to get interface MTU (just a matter of #ifdef)
From: "Todd T. Fries" <todd@fries.net>
Diffstat (limited to 'usr.sbin/rtadvd/if.c')
| -rw-r--r-- | usr.sbin/rtadvd/if.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/usr.sbin/rtadvd/if.c b/usr.sbin/rtadvd/if.c index 6740ea68787..ac28bb90e07 100644 --- a/usr.sbin/rtadvd/if.c +++ b/usr.sbin/rtadvd/if.c @@ -1,4 +1,5 @@ -/* $OpenBSD: if.c,v 1.3 2000/03/13 06:16:11 itojun Exp $ */ +/* $OpenBSD: if.c,v 1.4 2000/05/23 11:23:23 itojun Exp $ */ +/* $KAME: if.c,v 1.8 2000/05/22 22:04:37 itojun Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -148,7 +149,7 @@ if_nametosdl(char *name) int if_getmtu(char *name) { -#if defined(__FreeBSD__) || defined(__NetBSD__) +#ifndef __bsdi__ struct ifreq ifr; int s; @@ -165,8 +166,7 @@ if_getmtu(char *name) close(s); return(ifr.ifr_mtu); -#endif -#ifdef __bsdi__ +#else struct ifaddrs *ifap, *ifa; struct if_data *ifd; @@ -185,8 +185,6 @@ if_getmtu(char *name) freeifaddrs(ifap); return 0; #endif - /* last resort */ - return 0; } /* give interface index and its old flags, then new flags returned */ |
