Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 08 Feb 2018 13:35:10 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-net@FreeBSD.org
Subject:   [Bug 218517] ppp fails adding route with error Value too large to be stored in data type
Message-ID:  <bug-218517-2472-W7Fyb2qRgd@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-218517-2472@https.bugs.freebsd.org/bugzilla/>
References:  <bug-218517-2472@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D218517

--- Comment #16 from emikulic@gmail.com ---
(In reply to Eugene Grosbein from comment #15)

--- a/usr.sbin/ppp/id.c
+++ b/usr.sbin/ppp/id.c
@@ -50,6 +50,7 @@
 #include <libutil.h>
 #endif
 #include <utmpx.h>
+#include <errno.h>

 #include "log.h"
 #include "main.h"
@@ -93,10 +94,14 @@ int
 ID0ioctl(int fd, unsigned long req, void *arg)
 {
   int ret;
+  int saved_errno;

   ID0set0();
   ret =3D ioctl(fd, req, arg);
+  saved_errno =3D errno;
   log_Printf(LogID0, "%d =3D ioctl(%d, %lu, %p)\n", ret, fd, req, arg);
+  log_Printf(LogID0, "bug 218517: errno =3D %d (%s)\n", saved_errno,
+    strerror(saved_errno));
   ID0setuser();
   return ret;
 }

Resulting in:

ppp[4390]: tun0: IPV6CP: deflink: LayerUp.
ppp[4390]: tun0: ID0: 2 =3D socket(28, 2, 0)
ppp[4390]: tun0: ID0: -1 =3D ioctl(2, 2156423451, 0x7fffffffd790)
ppp[4390]: tun0: ID0: bug 218517: errno =3D 17 (File exists)
ppp[4390]: tun0: Warning: iface add: ioctl(SIOCAIFADDR_IN6,
fe80::a9df:fac8:17ee:204d -> fe80::5aac:78ff:fe22:8f00): Value too large to=
 be
stored in data type
ppp[4390]: tun0: Error: ipv6cp_InterfaceUp: unable to set ipv6 address
ppp[4390]: tun0: IPV6CP: deflink: LayerDown: fe80::a9df:fac8:17ee:204d

errno must be getting clobbered somewhere between ioctl() and the "iface ad=
d"
log line.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-218517-2472-W7Fyb2qRgd>