Re: New ujoy(4) device for USB gamecontrollers

2021-01-15 Thread Marcus Glocker
On Fri, 15 Jan 2021 06:23:01 -0700 Thomas Frohwein wrote: > On Sat, Jan 09, 2021 at 10:16:16AM +0100, Marcus Glocker wrote: > > On Thu, Jan 07, 2021 at 08:20:35PM +0100, Marcus Glocker wrote: > > > > > > I have heard from others who tried the diff that the PS4 > > > > controller is causing

Re: New ujoy(4) device for USB gamecontrollers

2021-01-15 Thread Marcus Glocker
On Fri, 15 Jan 2021 11:37:47 -0500 Bryan Steele wrote: > On Fri, Jan 15, 2021 at 06:23:01AM -0700, Thomas Frohwein wrote: > > On Sat, Jan 09, 2021 at 10:16:16AM +0100, Marcus Glocker wrote: > > > On Thu, Jan 07, 2021 at 08:20:35PM +0100, Marcus Glocker wrote: > > > > > > > > I have heard

usb_init_task(9): correct type

2021-01-15 Thread Anton Lindqvist
Hi, The usb_init_task(9) macro accepts a `struct usb_task'. Comments? OK? Index: share/man/man9/usb_add_task.9 === RCS file: /cvs/src/share/man/man9/usb_add_task.9,v retrieving revision 1.2 diff -u -p -r1.2 usb_add_task.9 ---

Re: bpf_mtap_ether doesnt need to encode packet priority

2021-01-15 Thread Klemens Nanni
On Fri, Jan 15, 2021 at 11:14:17AM +1000, David Gwynne wrote: > bpf should be showing what will be or has been on the wire, which is > what the ether_vtag in the mbuf has. the prio is either about to be > decoded from the tag on the wya into the stack, or has been encoded by > vlan(4) on the way

pf af-to sysctl forwarding

2021-01-15 Thread Alexander Bluhm
Hi, sysctl net.inet.ip.forwarding is checked before ip_input() passes the packet to ip_forward(). But with an af-to rule, pf(4) calls ip_forward() directly. I think we should check the sysctl also in pf to get consistent behaviour. ok? bluhm Index: net/pf.c

ugen(4) and uhidev(4) data toggle problem

2021-01-15 Thread Marcus Glocker
There are a few threads going on related to problems with ugen(4) and uhidev(4) devices on xhci(4). This is related to the issue patrick@ already explained; while ehci(4) can save the last data toggle state, xhci(4) resets it on every open/close cycle, getting out of sync with the device. This

sysctl ip.forwarding 2

2021-01-15 Thread Alexander Bluhm
Hi, As documented in sysctl(2) net.inet.ip.forwarding can be 2. netinet/ip_output.c:448 if (ipsec_in_use && (flags & IP_FORWARDING) && (ipforwarding == 2) && Current input validation prevents this. # sysctl net.inet.ip.forwarding=2 sysctl: net.inet.ip.forwarding: Invalid argument

Re: New ujoy(4) device for USB gamecontrollers

2021-01-15 Thread Thomas Frohwein
On Sat, Jan 09, 2021 at 10:16:16AM +0100, Marcus Glocker wrote: > On Thu, Jan 07, 2021 at 08:20:35PM +0100, Marcus Glocker wrote: > > > > I have heard from others who tried the diff that the PS4 controller is > > > causing problems with the way it attaches. I ordered one to trial-and- > > > error

Re: sysctl ip.forwarding 2

2021-01-15 Thread Klemens Nanni
On Fri, Jan 15, 2021 at 02:07:56PM +0100, Alexander Bluhm wrote: > As documented in sysctl(2) net.inet.ip.forwarding can be 2. > > netinet/ip_output.c:448 > if (ipsec_in_use && (flags & IP_FORWARDING) && (ipforwarding == 2) && > > Current input validation prevents this. > # sysctl

Re: XBox One gamecontroller support

2021-01-15 Thread Thomas Frohwein
On Sat, Jan 09, 2021 at 10:50:35AM -0700, Thomas Frohwein wrote: > Hi, > > This diff adds support for the XBox One gamecontroller in a similar way > to what we have for the (older) XBox 360 controller [1][2]. This diff > is based on the pertinent code in NetBSD's uhidev.c. > > Similarities

Re: sysctl ip.forwarding 2

2021-01-15 Thread Vitaliy Makkoveev
On Fri, Jan 15, 2021 at 02:07:56PM +0100, Alexander Bluhm wrote: > Hi, > > As documented in sysctl(2) net.inet.ip.forwarding can be 2. > > netinet/ip_output.c:448 > if (ipsec_in_use && (flags & IP_FORWARDING) && (ipforwarding == 2) && > > Current input validation prevents this. > #

Re: New ujoy(4) device for USB gamecontrollers

2021-01-15 Thread Raf Czlonka
On Fri, Jan 15, 2021 at 01:23:01PM GMT, Thomas Frohwein wrote: > On Sat, Jan 09, 2021 at 10:16:16AM +0100, Marcus Glocker wrote: > > On Thu, Jan 07, 2021 at 08:20:35PM +0100, Marcus Glocker wrote: > > > > > > I have heard from others who tried the diff that the PS4 controller is > > > > causing

Add if_mreqn support to IP_MULTICAST_IF

2021-01-15 Thread Claudio Jeker
I forgot to add ip_mreqn support to IP_MULTICAST_IF and so the IP_ADD_MEMBERSHIP change is not fixing all the issues I have. Linux supports calling IP_MULTICAST_IF with a struct in_addr, a struct ip_mreq, or a struct ip_mreqn. FreeBSD only does the first and last. I followed the Linux way because

Re: Add if_mreqn support to IP_MULTICAST_IF

2021-01-15 Thread Claudio Jeker
On Fri, Jan 15, 2021 at 02:53:17PM +0100, Claudio Jeker wrote: > I forgot to add ip_mreqn support to IP_MULTICAST_IF and so the > IP_ADD_MEMBERSHIP change is not fixing all the issues I have. > > Linux supports calling IP_MULTICAST_IF with a struct in_addr, a struct > ip_mreq, or a struct

Re: pf af-to sysctl forwarding

2021-01-15 Thread Klemens Nanni
On Fri, Jan 15, 2021 at 01:30:01PM +0100, Alexander Bluhm wrote: > sysctl net.inet.ip.forwarding is checked before ip_input() passes > the packet to ip_forward(). But with an af-to rule, pf(4) calls > ip_forward() directly. I think we should check the sysctl also in > pf to get consistent

Re: pf af-to sysctl forwarding

2021-01-15 Thread Alexander Bluhm
On Fri, Jan 15, 2021 at 03:24:43PM +0100, Klemens Nanni wrote: > Existing routers doing NAT64 for IPv6-only networks will require > `net.inet.ip.forwarding=1' for NAT64 to work. Actually you will need both of them. When sending "IPv6 -> pf-router -> IPv4" you need ip forwarding as pf translates

Re: pf af-to sysctl forwarding

2021-01-15 Thread Klemens Nanni
On Fri, Jan 15, 2021 at 04:03:09PM +0100, Alexander Bluhm wrote: > On Fri, Jan 15, 2021 at 03:24:43PM +0100, Klemens Nanni wrote: > > Existing routers doing NAT64 for IPv6-only networks will require > > `net.inet.ip.forwarding=1' for NAT64 to work. > > Actually you will need both of them. > >

Re: New ujoy(4) device for USB gamecontrollers

2021-01-15 Thread Bryan Steele
On Fri, Jan 15, 2021 at 06:23:01AM -0700, Thomas Frohwein wrote: > On Sat, Jan 09, 2021 at 10:16:16AM +0100, Marcus Glocker wrote: > > On Thu, Jan 07, 2021 at 08:20:35PM +0100, Marcus Glocker wrote: > > > > > > I have heard from others who tried the diff that the PS4 controller is > > > > causing

Re: Add if_mreqn support to IP_MULTICAST_IF

2021-01-15 Thread Robert Nagy
On 15/01/21 14:53 +0100, Claudio Jeker wrote: > I forgot to add ip_mreqn support to IP_MULTICAST_IF and so the > IP_ADD_MEMBERSHIP change is not fixing all the issues I have. > > Linux supports calling IP_MULTICAST_IF with a struct in_addr, a struct > ip_mreq, or a struct ip_mreqn. FreeBSD only

Re: tell pfctl(8) route-to and reply-to accept next-hop only

2021-01-15 Thread Alexander Bluhm
On Tue, Jan 12, 2021 at 08:45:22PM +0100, Alexandr Nedvedicky wrote: > I think bluhm@ and dlg@ have committed part of that change already. I have only commited a refactoring change. Next step in kernel would be to remove the check in pf_find_state() and see what happens. I was waiting for dlg@

Re: tell pfctl(8) route-to and reply-to accept next-hop only

2021-01-15 Thread Alexandr Nedvedicky
Hello, On Fri, Jan 15, 2021 at 06:26:48PM +0100, Alexander Bluhm wrote: > On Tue, Jan 12, 2021 at 08:45:22PM +0100, Alexandr Nedvedicky wrote: > > I think bluhm@ and dlg@ have committed part of that change already. > > I have only commited a refactoring change. Next step in kernel > would be to

Re: Add if_mreqn support to IP_MULTICAST_IF

2021-01-15 Thread Alexander Bluhm
On Fri, Jan 15, 2021 at 03:02:37PM +0100, Claudio Jeker wrote: > On Fri, Jan 15, 2021 at 02:53:17PM +0100, Claudio Jeker wrote: > > I forgot to add ip_mreqn support to IP_MULTICAST_IF and so the > > IP_ADD_MEMBERSHIP change is not fixing all the issues I have. > > > > Linux supports calling

rw_assert_wrlock((9) man page fix

2021-01-15 Thread Vitaliy Makkoveev
rw_assert_wrlock(9) has prototype "void rw_assert_wrlock(struct rwlock *)". Index: share/man/man9/rwlock.9 === RCS file: /cvs/src/share/man/man9/rwlock.9,v retrieving revision 1.25 diff -u -p -r1.25 rwlock.9 ---