Thx

It works as expected.


2013/1/31 YASUOKA Masahiko <yasu...@yasuoka.net>:
> Hi,
>
> On Tue, 29 Jan 2013 20:20:24 +0100
> csszep <css...@gmail.com> wrote:
>> I tried to start npppd with the default config with tun0 interface on
>> my Alix board:
>>
>> I get the following error message:
>>
>> # npppd -d
>> 2013-01-29 19:54:38:NOTICE: Starting npppd pid=13464 version=5.0.0
>> 2013-01-29 19:54:38:NOTICE: Load configuration
>> from='/etc/npppd/npppd.conf' successfully.
>> 2013-01-29 19:54:38:ERR: tun0 delete ipaddress tun0 failed: Device not
>> configured
>
> This was from a bug.  I fixed it on cvs.  Please update your source
> code from cvs or apply a patch below.
>
> Thank you for your report.
>
> Index: privsep.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/npppd/npppd/privsep.c,v
> retrieving revision 1.7
> diff -u -p -r1.7 privsep.c
> --- privsep.c   28 Sep 2012 23:46:00 -0000      1.7
> +++ privsep.c   31 Jan 2013 02:03:36 -0000
> @@ -463,7 +463,7 @@ priv_get_if_addr(const char *ifname, str
>         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, str
>         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, in
>         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, in
>         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;

Reply via email to