aboutsummaryrefslogtreecommitdiff
path: root/sbin/nos-tun
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/nos-tun')
-rw-r--r--sbin/nos-tun/Makefile1
-rw-r--r--sbin/nos-tun/nos-tun.c13
2 files changed, 3 insertions, 11 deletions
diff --git a/sbin/nos-tun/Makefile b/sbin/nos-tun/Makefile
index 8934e138b49d..bef6878b7f25 100644
--- a/sbin/nos-tun/Makefile
+++ b/sbin/nos-tun/Makefile
@@ -1,4 +1,3 @@
-
PROG= nos-tun
MAN= nos-tun.8
WARNS?= 3
diff --git a/sbin/nos-tun/nos-tun.c b/sbin/nos-tun/nos-tun.c
index 509f928a2bb8..ca0e33b2509a 100644
--- a/sbin/nos-tun/nos-tun.c
+++ b/sbin/nos-tun/nos-tun.c
@@ -57,11 +57,6 @@
*
*/
-#ifndef lint
-static const char rcsid[] =
- "$FreeBSD$";
-#endif /* not lint */
-
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/signal.h>
@@ -146,7 +141,7 @@ tun_open(char *dev_name, struct sockaddr *ouraddr, char *theiraddr)
* when tunN have no addresses, so - log and ignore it.
*
*/
- if (ioctl(s, SIOCDIFADDR, &ifra) < 0) {
+ if (ioctl(s, SIOCDIFADDR, &ifrq) < 0) {
syslog(LOG_ERR,"SIOCDIFADDR - %m");
}
@@ -225,10 +220,8 @@ Finish(int signum)
/*
* Delete addresses for interface
*/
- bzero(&ifra.ifra_addr, sizeof(ifra.ifra_addr));
- bzero(&ifra.ifra_broadaddr, sizeof(ifra.ifra_addr));
- bzero(&ifra.ifra_mask, sizeof(ifra.ifra_addr));
- if (ioctl(s, SIOCDIFADDR, &ifra) < 0) {
+ bzero(&ifrq.ifr_addr, sizeof(ifrq.ifr_addr));
+ if (ioctl(s, SIOCDIFADDR, &ifrq) < 0) {
syslog(LOG_ERR,"can't delete interface's addresses - %m");
}
closing_fds: