diff options
author | yasuoka <yasuoka@openbsd.org> | 2018-07-25 02:18:36 +0000 |
---|---|---|
committer | yasuoka <yasuoka@openbsd.org> | 2018-07-25 02:18:36 +0000 |
commit | baaa6b9ace4ef876739b74eac92d8a330517f7e8 (patch) | |
tree | b22d329e3d28a7970df7d79c715565ce7cecf420 /usr.sbin | |
parent | Add support for the i2c controller on the Marvell ARMADA 7K/8K SoC as well. (diff) | |
download | wireguard-openbsd-baaa6b9ace4ef876739b74eac92d8a330517f7e8.tar.xz wireguard-openbsd-baaa6b9ace4ef876739b74eac92d8a330517f7e8.zip |
Fix the prefix length of the IP address in the error message which shows
failure of assigning requested IP address on IPCP, it was mistakenly "-1"
on little endians. Found by IIJ.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/npppd/npppd/npppd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/npppd/npppd/npppd.c b/usr.sbin/npppd/npppd/npppd.c index 7f474030869..a60c3bc8f01 100644 --- a/usr.sbin/npppd/npppd/npppd.c +++ b/usr.sbin/npppd/npppd/npppd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: npppd.c,v 1.47 2017/08/12 11:20:34 goda Exp $ */ +/* $OpenBSD: npppd.c,v 1.48 2018/07/25 02:18:36 yasuoka Exp $ */ /*- * Copyright (c) 2005-2008,2009 Internet Initiative Japan Inc. @@ -29,7 +29,7 @@ * Next pppd(nppd). This file provides a npppd daemon process and operations * for npppd instance. * @author Yasuoka Masahiko - * $Id: npppd.c,v 1.47 2017/08/12 11:20:34 goda Exp $ + * $Id: npppd.c,v 1.48 2018/07/25 02:18:36 yasuoka Exp $ */ #include "version.h" #include <sys/param.h> /* ALIGNED_POINTER */ @@ -1661,7 +1661,7 @@ npppd_assign_ip_addr(npppd *_this, npppd_ppp *ppp, uint32_t req_ip4) ppp_log(ppp, LOG_NOTICE, "Requested IP address (%d.%d.%d.%d)/%d " "is %s", IP_4OCT(req_ip4), - netmask2prefixlen(htonl(ip4mask)), reason); + netmask2prefixlen(ip4mask), reason); if (fallback_dyna) goto dyna_assign; return 1; |