summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2013-01-31 02:14:47 +0000
committerYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2013-01-31 02:14:47 +0000
commit0ab6f3ee1c5caaa7ead25b1c36da0f3deb0361ad (patch)
treeb07d2bff58ebd8cd12e00144e0c1a0b7b2553856 /usr.sbin
parenta028dd5b9a8c44a608e53998b68ddc8b2a9b1d8f (diff)
Deleting ip address of tun inteface was failed. This was caused by
passing wrong inteface name to ioctl(). pointed out by csszep at gmail.com
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/npppd/npppd/privsep.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/npppd/npppd/privsep.c b/usr.sbin/npppd/npppd/privsep.c
index 08bfd0b90a2..36343c61a47 100644
--- a/usr.sbin/npppd/npppd/privsep.c
+++ b/usr.sbin/npppd/npppd/privsep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: privsep.c,v 1.7 2012/09/28 23:46:00 yasuoka Exp $ */
+/* $OpenBSD: privsep.c,v 1.8 2013/01/31 02:14:46 yasuoka Exp $ */
/*
* Copyright (c) 2010 Yasuoka Masahiko <yasuoka@openbsd.org>
@@ -463,7 +463,7 @@ priv_get_if_addr(const char *ifname, struct in_addr *addr)
struct PRIVSEP_GET_IF_ADDR_RESP r;
a.cmd = PRIVSEP_GET_IF_ADDR;
- strlcpy(a.ifname, ifname, sizeof(ifname));
+ strlcpy(a.ifname, ifname, sizeof(a.ifname));
if ((retval = send(privsep_sock, &a, sizeof(a), 0)) < 0)
return retval;
if ((retval = recv(privsep_sock, &r, sizeof(r), 0)) < 0) {
@@ -488,7 +488,7 @@ priv_delete_if_addr(const char *ifname)
struct PRIVSEP_DEL_IF_ADDR_ARG a;
a.cmd = PRIVSEP_DEL_IF_ADDR;
- strlcpy(a.ifname, ifname, sizeof(ifname));
+ strlcpy(a.ifname, ifname, sizeof(a.ifname));
if ((retval = send(privsep_sock, &a, sizeof(a), 0)) < 0)
return retval;
retval = privsep_common_resp();
@@ -503,7 +503,7 @@ priv_set_if_addr(const char *ifname, struct in_addr *addr)
struct PRIVSEP_SET_IF_ADDR_ARG a;
a.cmd = PRIVSEP_SET_IF_ADDR;
- strlcpy(a.ifname, ifname, sizeof(ifname));
+ strlcpy(a.ifname, ifname, sizeof(a.ifname));
a.addr = *addr;
if ((retval = send(privsep_sock, &a, sizeof(a), 0)) < 0)
return retval;
@@ -519,7 +519,7 @@ priv_get_if_flags(const char *ifname, int *pflags)
struct PRIVSEP_GET_IF_FLAGS_RESP r;
a.cmd = PRIVSEP_GET_IF_FLAGS;
- strlcpy(a.ifname, ifname, sizeof(ifname));
+ strlcpy(a.ifname, ifname, sizeof(a.ifname));
if ((retval = send(privsep_sock, &a, sizeof(a), 0)) < 0)
return retval;
if ((retval = recv(privsep_sock, &r, sizeof(r), 0)) < 0) {
@@ -543,7 +543,7 @@ priv_set_if_flags(const char *ifname, int flags)
struct PRIVSEP_SET_IF_FLAGS_ARG a;
a.cmd = PRIVSEP_SET_IF_FLAGS;
- strlcpy(a.ifname, ifname, sizeof(ifname));
+ strlcpy(a.ifname, ifname, sizeof(a.ifname));
a.flags = flags;
if ((retval = send(privsep_sock, &a, sizeof(a), 0)) < 0)
return retval;