Re: sppp/pppoe on sparc64

2013-12-11 Thread Todd C. Miller
On Wed, 11 Dec 2013 17:54:06 +0100, =?utf-8?Q?J=C3=A9r=C3=A9mie_Courr=C3=A8ges-
Anglas?= wrote:

> As reported by on bugs@[1].  I had a longer diff but got no reply so
> let's try to get this in first.

OK but please just change the unsigned long to u_int32_t.  There's
no need for this to be any more than a one line diff.

 - todd



Re: PATCH: Fix invalid size to 'memcmp' in 'rn_lexobetter'

2013-12-11 Thread Todd C. Miller
Your diff looks correct to me.  In the old code, we had this loop:

for (lim = mp + *mp; mp < lim;)
if (*mp++ > *np++)
return 1;
return 0;

Which was replaced by:

lim = mp + *mp;
return (memcmp(mp, np, *lim) > 0);

which is not equivalent since lim points to one byte past the end
up m_arg.  The key length is stored in the first byte so using *mp
should be correct.

 - todd



sppp/pppoe on sparc64

2013-12-11 Thread Jérémie Courrèges-Anglas

As reported by on bugs@[1].  I had a longer diff but got no reply so
let's try to get this in first.

ok?

[1] http://marc.info/?l=openbsd-bugs&m=138513728419554&w=2

Index: if_spppsubr.c
===
RCS file: /cvs/src/sys/net/if_spppsubr.c,v
retrieving revision 1.113
diff -u -p -r1.113 if_spppsubr.c
--- if_spppsubr.c   20 Nov 2013 08:21:33 -  1.113
+++ if_spppsubr.c   11 Dec 2013 16:46:05 -
@@ -4488,10 +4488,12 @@ sppp_keepalive(void *dummy)
sppp_cisco_send (sp, CISCO_KEEPALIVE_REQ, ++sp->pp_seq,
sp->pp_rseq);
else if (sp->pp_phase >= PHASE_AUTHENTICATE) {
-   unsigned long nmagic = htonl (sp->lcp.magic);
+   u_int32_t nmagic;
+
+   nmagic = htonl(sp->lcp.magic);
sp->lcp.echoid = ++sp->pp_seq;
-   sppp_cp_send (sp, PPP_LCP, ECHO_REQ,
-   sp->lcp.echoid, 4, &nmagic);
+   sppp_cp_send (sp, PPP_LCP, ECHO_REQ, sp->lcp.echoid,
+   4, &nmagic);
}
}
splx(s);



Re: PATCH: Allow shared semaphores to be really shared

2013-12-11 Thread Ted Unangst
On Wed, Dec 11, 2013 at 11:12, Vadim Zhukov wrote:
>> If we go back to returning ENOMEM or whatever in sem_init, does that
>> fix KDE?
> 
> If we stop pretending we support shared unnamed semaphores, then, yes,
> this will help KDE. But I cannot gurantee there will be no other
> fallout. This needs a deep scan of all ports source as minimum...

> I'd rather disable shared semaphores totally, until all issues are
> fixed, then. I don't see a point in having half-working stuff in tree
> which gets picked up and used.

Maybe I wasn't clear, that's exactly what I wanted to do.

Anyway, I just went ahead and did it. sem_init(pshared) will return
EPERM as before.



Re: add new device to cdce.4

2013-12-11 Thread Mike Belopuhov
On 11 December 2013 10:14, Kirill Bychkov  wrote:
> Hi!
> This Yota dongle works fine. I think adding this into manual would be useful
> for russian OpenBSD users.
>
> umass1 at uhub0 port 1 configuration 1 interface 0 "GCT SEMICONDUCTOR Inc
> Modem Yota" rev 2.00/1.00 addr 4
> umass1: using SCSI over Bulk-Only
> scsibus4 at umass1: 2 targets, initiator 0
> cd0 at scsibus4 targ 1 lun 0:  SCSI0 5/cdrom removable
> cd0 detached
> scsibus4 detached
> umass1 detached
> cdce0 at uhub0 port 1 configuration 1 interface 0 "GCT SEMICONDUCTOR Inc Modem
> Yota" rev 2.00/1.00 addr 4
> cdce0: address 2a:cb:01:dd:01:00
> ehci_idone: ex=0xd349f200 is done!
>

sure, why not.



add new device to cdce.4

2013-12-11 Thread Kirill Bychkov
Hi!
This Yota dongle works fine. I think adding this into manual would be useful
for russian OpenBSD users.

umass1 at uhub0 port 1 configuration 1 interface 0 "GCT SEMICONDUCTOR Inc
Modem Yota" rev 2.00/1.00 addr 4
umass1: using SCSI over Bulk-Only
scsibus4 at umass1: 2 targets, initiator 0
cd0 at scsibus4 targ 1 lun 0:  SCSI0 5/cdrom removable
cd0 detached
scsibus4 detached
umass1 detached
cdce0 at uhub0 port 1 configuration 1 interface 0 "GCT SEMICONDUCTOR Inc Modem
Yota" rev 2.00/1.00 addr 4
cdce0: address 2a:cb:01:dd:01:00
ehci_idone: ex=0xd349f200 is done!

Index: cdce.4
===
RCS file: /cvs/src/share/man/man4/cdce.4,v
retrieving revision 1.18
diff -u -r1.18 cdce.4
--- cdce.4  16 Jul 2013 16:05:48 -  1.18
+++ cdce.4  11 Dec 2013 09:10:58 -
@@ -66,6 +66,8 @@
 .It
 Sony Ericsson F3705g
 .It
+Yota LU156
+.It
 Zyxel P-971M
 .El
 .Pp