https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218517

--- Comment #16 from emiku...@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 = ioctl(fd, req, arg);
+  saved_errno = errno;
   log_Printf(LogID0, "%d = ioctl(%d, %lu, %p)\n", ret, fd, req, arg);
+  log_Printf(LogID0, "bug 218517: errno = %d (%s)\n", saved_errno,
+    strerror(saved_errno));
   ID0setuser();
   return ret;
 }

Resulting in:

ppp[4390]: tun0: IPV6CP: deflink: LayerUp.
ppp[4390]: tun0: ID0: 2 = socket(28, 2, 0)
ppp[4390]: tun0: ID0: -1 = ioctl(2, 2156423451, 0x7fffffffd790)
ppp[4390]: tun0: ID0: bug 218517: errno = 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 add"
log line.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"

Reply via email to