Belkin PCMCIA wifi

2016-04-13 Thread hans
I have this Belkin card (model F5D8010)
which reports on current/amd64 as

unknown vendor 0x17cb product 0x0001 (class network subclass ethernet, rev 
0x01) at cardbus1 dev 0 function 0 not configured

but does not show up as an interface.
What can I do to help make it supported?

Jan



Re: OpenBSD 5.[8-9] and Quagga rip(ng)d ?

2016-04-13 Thread Christophe H. STux

Hello,

Jeremie Courreges-Anglas wrote :

Thanks, will try this.
This is the quagga configure script, right ?

Yes.  The patch should be applied from the ports tree:

   cd /usr/ports/net/quagga
   patch < /path/to/diff
   make clean repackage reinstall

Just done, and just works !

Jeremie, you're impressive ! :) and one more time I'd like to thank you !

Christophe.



Re: smtpd : reject with a message

2016-04-13 Thread Edgar Pettijohn
Sent from my iPhone

> On Apr 13, 2016, at 1:14 PM, Peter Fraser  wrote:
>
> Is there any method of added extra information when rejecting an email with
> smtpd
>
> I am looking for an equivalent effect to the .REDIRECT or error  message in
> sendmail's virtualusertable
>
> for example I had the following in sendmail's virtualusertable.
>
> @thinkage.on.caerror:5.1.1:553 " Please use thinkage.ca not
> thinkage.on.ca"
>
> and
>
> t...@thinkage.casupp...@thinkage.ca.REDIRECT
>

I don't think there is. You are probably better off opening a ticket on git
hub for a feature request.



Re: rescue booting system by cdrom bootloader

2016-04-13 Thread Maurice McCarthy

On 2016-04-13 18:03, Bambero wrote:

Hi

Now I'm booting from cdrom and using command:

boot hd0a:/bsd

and it works, but root filesystem is readonly.

How to make it rw?

Regards
Bambero


Try this

# mount -w /



Re: Recording computer sound.

2016-04-13 Thread lists
Wed, 13 Apr 2016 10:07:01 +0200 Alexandre Ratchov 
> On Tue, Apr 12, 2016 at 08:22:40AM +0300, li...@wrant.com wrote:
> > Mon, 11 Apr 2016 19:17:31 +0200 Alexandre Ratchov   
> > > On Sun, Apr 10, 2016 at 12:16:42PM +0300, li...@wrant.com wrote:  
> > > > 
> > > > Just an idea, before providing a diff, does it look like a good
> > > > candidate to go into FAQ13.4?  Thank you for your consideration.  
> > > 
> > > Yes, this would be good candidate (for the FAQ 13.5), as this is
> > > not the first time this is being discussed.  
> > 
> > Same observation here.  I was suggesting it could be a continuation of
> > the record audio sub-section 13.4, now doing it for 13.5 in accordance
> > with your recommendation and renumbering below (and the index page).
> > 
> > Thank you for clarifying the numbering point, mailing the diff shortly.
> >   
> > > Basically this proves that the code is not simple enough and
> > > usability needs to be improved.  
> > 
> > And additionally shows an important feature either not directly obvious
> > from the manual, or merely frequently used enough to need a FAQ mention.  
> 
> I use it all the time, others seem to use it as well; we should
> enable it by default

Thank you for considering these improvements worthwhile.  And much more
enjoying the sndiod(8) man page [http://man.openbsd.org/?query=sndiod]

While relevant, the quick idea to jot down the in flight tip at the
original query for other viewers, now thanks to ratchov@ tj@ tb@ got

FAQ section 13.5 [http://www.openbsd.org/faq/faq13.html#recordmon]



Re: Should random.seed on shutdown be saved a little later?

2016-04-13 Thread Theo de Raadt
>On April 13, 2016 4:28:13 PM GMT+02:00, Theo de Raadt  
>wrote:
>>>Kevin Chadwick wrote:
 Whilst likely not a major issue. I also started to wonder whilst
 reading man rc.shutdown, if a daemon or other process could
>>potentially
 use /dev/urandom between saving the seed and shutdown so
>>could/should
 the random.seed be saved a little later after /etc/rc.shutdown runs?
>>>
>>>
>>>that doesn't matter.
>>
>>indeed, randomization is initialized eons before then.
>>
>>http://www.openbsd.org/papers/hackfest2014-arc4random/index.html
>
>
>What's important to realize is that it's a seed being written to
>disk, not the random subsystem state. As such, the random numbers will
>not repeat themselves after reboot even if randomness was consumed
>after the seed was written.

No, it is even better than that.

On 99.9% of machines, the bootblocks will go through extra effort
to perturb that entropy payload...  (and succeed, because the
hardware provides means available to the bootblocks)

If all things go well, there is no correlation.  If things go badly,
the correlations that exist are still meaningless.  Even in a VM
environment, which is one of the toughest.

In this matter, many other systems are infantile.  Their design
patterns don't allow them to think outside the box.

Little wonder therefore that operating system users have developed
such doubts about these systems.  Everyone else sucks.



smtpd : reject with a message

2016-04-13 Thread Peter Fraser
Is there any method of added extra information when rejecting an email with
smtpd

I am looking for an equivalent effect to the .REDIRECT or error  message in
sendmail's virtualusertable

for example I had the following in sendmail's virtualusertable.

@thinkage.on.ca error:5.1.1:553 " Please use thinkage.ca not
thinkage.on.ca"

and

t...@thinkage.casupp...@thinkage.ca.REDIRECT



Re: OpenBSD 5.[8-9] and Quagga rip(ng)d ?

2016-04-13 Thread Jeremie Courreges-Anglas
"Christophe H. STux"  writes:

> Hi Jeremie :)
>
> Jeremie Courreges-Anglas wrote :
>> Try the following diff
>
> Thanks, will try this.
> This is the quagga configure script, right ?

Yes.  The patch should be applied from the ports tree:

  cd /usr/ports/net/quagga
  patch < /path/to/diff
  make clean repackage reinstall

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE



rescue booting system by cdrom bootloader

2016-04-13 Thread Bambero
Hi

Now I'm booting from cdrom and using command:

boot hd0a:/bsd

and it works, but root filesystem is readonly.

How to make it rw?

Regards
Bambero



Re: Should random.seed on shutdown be saved a little later?

2016-04-13 Thread Alexander Hall
On April 13, 2016 4:28:13 PM GMT+02:00, Theo de Raadt  
wrote:
>>Kevin Chadwick wrote:
>>> Whilst likely not a major issue. I also started to wonder whilst
>>> reading man rc.shutdown, if a daemon or other process could
>potentially
>>> use /dev/urandom between saving the seed and shutdown so
>could/should
>>> the random.seed be saved a little later after /etc/rc.shutdown runs?
>>
>>
>>that doesn't matter.
>
>indeed, randomization is initialized eons before then.
>
>http://www.openbsd.org/papers/hackfest2014-arc4random/index.html

What's important to realize is that it's a seed being written to disk, not the 
random subsystem state. As such, the random numbers will not repeat themselves 
after reboot even if randomness was consumed after the seed was written.

/Alexander 



Re: Getting started with an OpenBSD Desktop...

2016-04-13 Thread Mihai Popescu
> Some people like different UIs than other people. Seems like a strange
> thing to be upset about.

Some people like to shoot themselves in the foot. I am not upset about
it, but I don't like to hear screams and ambulance sirens. :-)



Re: Getting started with an OpenBSD Desktop...

2016-04-13 Thread Mike Burns
On 2016-04-13 19.20.24 +0300, Mihai Popescu wrote:
> So, what is the benefit of typing a text in a text box GUI rather than
> a terminal?
> Again, what is the benefit of displaying a list of wifi networks with
> funny beam sign (which tell you nothing, bytheway) rather that read a
> dBm result from scan option in terminal?

Some people like different UIs than other people. Seems like a strange
thing to be upset about.



Re: Getting started with an OpenBSD Desktop...

2016-04-13 Thread Mike Burns
On 2016-04-13 15.31.36 +0200, Erling Westenvik wrote:
> On Wed, Apr 13, 2016 at 09:37:53AM +, Mike Burns wrote:
> > I hooked some shell scripts up with zenity to make a wifi GUI.
> > 
> Interesting. Care to share the code somewhere? Maybe it could evolve
> into a port/package?

I'll share the code, but it has some caveats:

- I made this for my laptop and my use cases.
- I hate automation.
- It's not very good.
- The GUI gives no feedback after you select the access point.

Feel free to turn it into anything you'd like.

Attached is a man page for wifi(1), the wifi script itself, and wifi-gtk
which makes use of the wifi script. Run it as 'doas wifi-gtk -C $HOME/.wifi',
where $HOME/.wifi is your wifi config (see the attached man page).

===
wifi.1:
===

.Dd $Mdocdate$
.Dt WIFI 1
.Os
.Sh WIFI
.Nm wifi
.Nd connect to OpenBSD wifi
.Sh SYNOPSIS
.Nm progname
.Fl C Ar config
.Fl i Ar iface
.Ar nickname
.Sh DESCRIPTION
The
.Nm
utility connects to the wifi on the interface
.Ar iface
according to the
.Ar nickname
as read from
.Ar config .
.\" .Sh ENVIRONMENT
.\" For sections 1, 6, 7, and 8 only.
.Sh FILES
The configuration file follows a simple format:
.Pp
.Dl nickname: ifconfig-options autoconfiguration
.Pp
These three values are as follow:
.Bl -tag -width Ds
.It Va nickname
The name of the wifi network, to be passed to the
.Nm
program.
.It Va ifconfig-options
Options for
.Xr ifconfig 1 ,
such as
.Li nwid
and
.Li wpakey .
.It Va autoconfiguration
Either
.Li dhcp
for DHCP or
.Li rtsol
for IPv6 autoconf.
.El
.Sh EXIT STATUS
The exit status of
.Nm
is the same as the exit status of the
.Pa /etc/netstart
program.
.Sh EXAMPLES
.Pp
.Dl sudo wifi -C ~/.wifi -i iwn0 home
.Pp
.\" .Sh DIAGNOSTICS
.\" For sections 1, 4, 6, 7, 8, and 9 printf/stderr messages only.
.Sh SEE ALSO
.Xr ifconfig 1 ,
.Xr hostname.if 5
.\" .Sh STANDARDS
.\" .Sh HISTORY
.Sh AUTHORS
.An "Mike Burns" Aq mike+open...@mike-burns.com
.\" .Sh CAVEATS
.\" .Sh BUGS

===
wifi:
===

#!/bin/sh

usage() {
  echo usage: wifi -C config -i iface nickname
  exit 64
}

args=`getopt "C:i:" $*`

if [ $? -ne 0 ]; then
  usage
fi

set -- $args

while [ $# -ne 0 ]; do
  case "$1" in
-C)
  config="$2"
  shift; shift
  ;;
-i)
  iface="$2"
  shift; shift
  ;;
--)
  shift
  to_connect="$@"
  break
  ;;
  esac
done

if [ -z "$config" -o -z "$iface" -o -z "$to_connect" ]; then
  usage
fi

file="/etc/hostname.$iface"
dhcp_cfg=$(sed -ne "/^${to_connect}:.*dhcp/s/.*: *\(.*\) *dhcp/\1/p" "$config")
rtsol_cfg=$(sed -ne "/^${to_connect}:.*rtsol/s/.*: *\(.*\) *rtsol/\1/p" 
"$config")

if [ -z "$dhcp_cfg" -a -z "$rtsol_cfg" ]; then
  echo "Could not find '$to_connect' in $config" >&2
  exit 1
fi

echo "# Autogenerated by wifi(1)" > "$file"
echo "# Connection name: '${to_connect}'" >> "$file"

if [ -n "$dhcp_cfg" ]; then
  echo "$dhcp_cfg" >> "$file"
  echo dhcp >> "$file"
fi

if [ -n "$rtsol_cfg" ]; then
  echo "$rtsol_cfg" >> "$file"
  echo rtsol >> "$file"
fi

exec sh /etc/netstart

===
wifi-gtk
===

#!/bin/sh

if [ $# -ne 2 ]; then
  echo usage: wifi-gtk -C config
  exit 64
fi

config="$2"

nwid=$(sed -ne 's/\(.*\):.*/\1/p' "$config" | zenity --list --title Wifi 
--column nwids)

if [ -n "$nwid" ]; then
  exec /home/mike/.bin/wifi -C "$config" -i iwn0 "$nwid"
fi



Re: Getting started with an OpenBSD Desktop...

2016-04-13 Thread Mihai Popescu
> Maybe it could evolve into a port/package?

So, what is the benefit of typing a text in a text box GUI rather than
a terminal?
Again, what is the benefit of displaying a list of wifi networks with
funny beam sign (which tell you nothing, bytheway) rather that read a
dBm result from scan option in terminal?

That so called GUI will bring you nothing different from a general
confusion. WiFi connect is an utility not a graphical application.



Re: OpenBSD 5.[8-9] and Quagga rip(ng)d ?

2016-04-13 Thread Christophe H. STux

Hi Jeremie :)

Jeremie Courreges-Anglas wrote :

Try the following diff


Thanks, will try this.
This is the quagga configure script, right ?



tmux status line doesn't display process name

2016-04-13 Thread Teng Zhang
uname output: OpenBSD zhangteng.my.domain 5.9 GENERIC.MP#1616 i386
hardware: Thinkpad T420(if necessary, i will show dmesg output)
tmux cofiguration: default(don't change anything)
problem description:  I run the following command:
tmux
doas dd if=debian.iso of=/dev/rsd1c

and then, the output of status line: [1]   0:ksh*
about 15 minutes later, the output of status line:[1] 0:dd*
comment: any other programs are shown normally at the status line

Could you please tell me how to solve the problem ?



Re: Should random.seed on shutdown be saved a little later?

2016-04-13 Thread Theo de Raadt
>Kevin Chadwick wrote:
>> Whilst likely not a major issue. I also started to wonder whilst
>> reading man rc.shutdown, if a daemon or other process could potentially
>> use /dev/urandom between saving the seed and shutdown so could/should
>> the random.seed be saved a little later after /etc/rc.shutdown runs?
>
>
>that doesn't matter.

indeed, randomization is initialized eons before then.

http://www.openbsd.org/papers/hackfest2014-arc4random/index.html



Re: Getting started with an OpenBSD Desktop...

2016-04-13 Thread Erling Westenvik
On Wed, Apr 13, 2016 at 09:37:53AM +, Mike Burns wrote:
> On 2016-04-13 10.42.28 +0200, Erling Westenvik wrote:
> > On Tue, Apr 12, 2016 at 08:34:16PM -0400, Implausibility wrote:
> > Various attempts on creating "generic" wifi network connection manager
> > scripts have been made. None with a true GUI AFAIK.
> 
> I hooked some shell scripts up with zenity to make a GUI.
> 
Interesting. Care to share the code somewhere? Maybe it could evolve
into a port/package?



Re: Getting started with an OpenBSD Desktop...

2016-04-13 Thread Implausibility
Thanks to everyone for their comments!

I'm going to put a fresh install of OpenBSD 5.9 on my laptop, and I'll try all
of your recommendations.

Take care.

> On Apr 13, 2016, at 5:37 AM, Mike Burns 
wrote:
>
> On 2016-04-13 10.42.28 +0200, Erling Westenvik wrote:
>> On Tue, Apr 12, 2016 at 08:34:16PM -0400, Implausibility wrote:
>> Various attempts on creating "generic" wifi network connection manager
>> scripts have been made. None with a true GUI AFAIK.
>
> I hooked some shell scripts up with zenity to make a GUI.



Re: OpenSMTPD on OpenBSD 5.9

2016-04-13 Thread Gilles Chehade
On Wed, Apr 13, 2016 at 03:15:59PM +1100, Rod Whitworth wrote:
> On Sun, 10 Apr 2016 12:31:35 +1100, Rod Whitworth wrote:
> 
> >On Sat, 9 Apr 2016 10:12:23 -0500, Edgar Pettijohn wrote:
> >
> >>On 04/08/16 23:25, Rod Whitworth wrote:
> >>> I'm trying to replace Postfix with OpenSMTPD and I'm having a battle.
> >>>
> >>> I don't seem to be able to get the clues to match the hardware and the
> >>> configure recipes that I need.
> >>>
> >>> The most up to date I can find breaks at the second stanza and I can
> >>> guess that the instructions for configuring for PF are for OpenBSD 5.6
> >>> means that I should find a up to date have clue set.
> >>>
> >>> Does anyone have pointer to a rescue?
> >>>
> >>> Rod/
> >>> (who doesn't want to revert to Postfix..)
> >>>
> >>> *** NOTE *** Please DO NOT CC me. I  subscribed to the list.
> >>> Mail to the sender address that does not originate at the list server is 
> >>> tarpitted. The reply-to: address is provided for those who feel compelled 
> >>> to reply off list. Thankyou.
> >>>
> >>> Rod/
> >>> ---
> >>> This life is not the real thing.
> >>> It is not even in Beta.
> >>> If it was, then OpenBSD would already have a man page for it.
> >>>
> >>I think you may need to describe what you are trying to achieve. Perhaps 
> >>your old postfix configuration as well.
> >>
> >
> >What I am trying to achieve is a copy of the up-to-date instructions.
> >
> >As I said the most recent copy is around 5.6.
> >I am running 5.9.
> >
> >The most recent recipe is written by someone who makes considerable
> >mods and I like to   refrain from making changes until I find a change
> >that appears to have a solid reason.
> >
> >Postfix is no help in getting OpenSMTPD working. Believe me and I've
> >been running Postfix since about OpenBSD 2.5 and doing it for some
> >large businesses.
> >
> >The present instructions for OpenSMTPD go likes this:
> >1 Install some packages (3)
> >
> >2 Create Maildir
> >
> >Crash. Well it doesn't work as it is suppose to.
> >
> >Study further and realise that you need up to date instructions.
> >
> >So try to install 5.9 OpenBSD and run
> >http://puffysecurity.com/wiki/opensmtpd.html
> >
> >Lots-a-luck.
> >
> >Rod/
> >
> >From the land "down under": Australia.
> >Do we look  from up over?
> >
> 
> Well it seems I must go to Postfix..
>

Postfix is good software, nice choice.


> What I needed was a version 5.9 as distributed not a hero's advanced
> version already heading to 6.0. That is for developers and I respect
> them but they are not for me: I'm not that smart.
> 
> There are some (apart from the 5.9+ code) which are not for me as they
> are (a) not 5.9 code or (b) not polished trying to try for 5.9
> 

After reading the whole thread, I still don't understand your problem,
what you're trying to achieve and what information you're looking for.


> I would love to see someone reply telling me that I have bad eyes and a
> 5.9 is running and it's getting it correct.
>

I'd love to tell you that you have bad eyes, but not knowing what is
your problem nor what you're trying to achieve, I wouldn't know what
I should look for.


> Meanwhile I have to bring up a new server and Postfix seems to be the
> only candidate.
> 
> At least I can build a mailserver that works on that.
> 

Again, good choice, if you're comfortable with running Postfix and you
can't get OpenSMTPD running, I don't know why you're struggling :-)


> Sorry for the noise
> 

np


-- 
Gilles Chehade

https://www.poolp.org  @poolpOrg



Re: Getting started with an OpenBSD Desktop...

2016-04-13 Thread lists
Tue, 12 Apr 2016 20:40:52 -0400 Michael McConville 
> Implausibility wrote:
> > I know how to install things via the ports, but traversing the
> > directory structure to find useful packages is painful.  If there's a
> > more friendly way to search for and discover new/interesting ports
> > packages, I'd appreciate a link.  
> 
> 'pkg_info -Q $YOUR_QUERY' will show package names containing
> $YOUR_QUERY.

This provides description for a specific package:

$ pkg_info -d pkg_mgr

Description:
pkg_mgr is a high-level, user-friendly package browser for OpenBSD..

This installs a package:

$ pkg_add -v pkg_mgr

The cvsweb has a category sysutils for more ports like pkg_mgr:

[http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/sysutils/]

You use the pkg_mgr to quickly browse, pkg_add to install, and cvsweb
to read ports details should you need these.

For some additional web based convenience you can at times query the
external page:

[http://openports.se/sysutils]



Re: Need help to install OpenBSD 5.9 macppc via pxe

2016-04-13 Thread Solène Rapenne
Try tcpdumping the connection and see why it thinks the file doesn't 
exist.


It might be the / try does:
 boot enet:, ofwboot bsd.rd
change the behaviour?

hth

Fred



It boot correctly after changing the following line in dhcpd.conf

option root-path "192.168.1.5:/usr/local/www/thttpd";

to

option root-path "/usr/local/www/thttpd";


Thanks for your help :)

Kind regards



Re: Need help to install OpenBSD 5.9 macppc via pxe

2016-04-13 Thread Solène Rapenne

Le 2016-04-08 00:55, Fred a écrit :

On 04/07/16 13:09, Solène Rapenne wrote:

Hello,

my dhcpd.conf (isc-dhcpd) :

allow booting;
allow bootp;
authoritative;
subnet 192.168.1.0 netmask 255.255.255.0 {
  range 192.168.1.20 192.168.1.50;
  option broadcast-address 192.168.1.255;
}

host macmini {
  next-server 192.168.1.5;
  option subnet-mask 255.255.255.0;
  option routers 192.168.1.5;
  option root-path "192.168.1.5:/usr/local/www/thttpd";
  fixed-address 192.168.1.22;
  hardware ethernet 00:14:51:1f:52:70;
}


Kind regards



Try tcpdumping the connection and see why it thinks the file doesn't 
exist.


It might be the / try does:
 boot enet:, ofwboot bsd.rd
change the behaviour?

hth

Fred


Hello Fred,

I tried bsd.rd instead of /bsd.rd and no more success. With wireshark I 
found that it was the protocol MOUNT that was failing with a ERR_NOENT 
reply from my NFS server. I started mountd in foreground and I get this 
output :


mountd: getting export list
mountd: reading exports from /etc/exports
mountd: got line /usr/local/www/thttpd/ -alldirs -ro -mapall=nobody 
-network 192.168.1.0/24

mountd: making new ep fs=0xbf62e9a4,0x4e951dde
mountd: doing opt -alldirs -ro -mapall=nobody -network 192.168.1.0/24
mountd: doing opt -ro -mapall=nobody -network 192.168.1.0/24
mountd: doing opt -mapall=nobody -network 192.168.1.0/24
mountd: doing opt -network 192.168.1.0/24
setting OP_MASKLEN
get_net: v4 addr 192.168.1.0
mountd: getting mount list
mountd: here we go
mountd: stat failed on /usr/local/www/thttpd/192.168.1.5:
mountd: stat failed on /192.168.1.5:
mountd: stat failed on /192.168.1.5:
mountd: stat failed on /192.168.1.5:
mountd: stat failed on /192.168.1.5:
mountd: stat failed on /192.168.1.5:
mountd: stat failed on /192.168.1.5:
mountd: stat failed on /192.168.1.5:
mountd: stat failed on /192.168.1.5:
mountd: stat failed on /192.168.1.5:
mountd: stat failed on /192.168.1.5:
mountd: stat failed on /192.168.1.5:
mountd: stat failed on /192.168.1.5:


It seems that the client wants to mount 192.168.1.5:/192.168.1.5 if I 
understand. This is not what I want and I don't understand this 
behavior.




Re: routes get assigned to a wrong interface, openbsd 5.9

2016-04-13 Thread Martin Pieuchot
On 13/04/16(Wed) 13:27, Mart Tõnso wrote:
> Thank you! Assigning a proper ppp netmask solved this issue. I'll see
> if I can get arround to testing the patch. Is there a chance of
> including it in the "current"?

I'm waiting for you report, if it is positive I'll ask for reviews.  If
the review are ok, it will be included.



Re: routes get assigned to a wrong interface, openbsd 5.9

2016-04-13 Thread Mart Tõnso
Thank you! Assigning a proper ppp netmask solved this issue. I'll see
if I can get arround to testing the patch. Is there a chance of
including it in the "current"?

> By the way why do you use the same src and dst address?

I've been wondering about that myself, but that's how the client
interface ends up when server is running with "subnet" topology. It
seems to work well with bsd/linux/macos/windows clients, so I haven't
gone digging deeper.

Regards,

Mart

On Wed, Apr 13, 2016 at 10:45 AM, Martin Pieuchot  wrote:
> Hello Mart,
>
> On 13/04/16(Wed) 09:22, Mart Tõnso wrote:
>> Ah, yes, sorry about that. Here's the full routing info with ifconfig
output:
>>
>> # ifconfig
>> [...]
>> ppp0: flags=8051 mtu 1500
>> priority: 0
>> groups: ppp egress
>> inet 10.128.195.179 --> 10.64.64.64 netmask 0xff00
>   ^^
> Here is the problem.  For historical reasons the code that finds
> a matching interface to attach your route matches your gateway
> with ppp0's address/netmask.
>
> A workaround would be to change your ppp0 setup to use a /32 mask.
>
> A correct fix is included below, I'll be interested to hear if it
> works for you.
>
>> tun0: flags=8051 mtu 1500
>> priority: 0
>> groups: tun
>> status: active
>> inet 10.88.0.124 --> 10.88.0.124 netmask 0xff00
> ^^
> By the way why do you use the same src and dst address?
>
> Index: net/route.c
> ===
> RCS file: /cvs/src/sys/net/route.c,v
> retrieving revision 1.298
> diff -u -p -r1.298 route.c
> --- net/route.c 26 Mar 2016 21:56:04 -  1.298
> +++ net/route.c 13 Apr 2016 07:38:11 -
> @@ -740,20 +740,16 @@ ifa_ifwithroute(int flags, struct sockad
> ifa = ifaof_ifpforaddr(dst, ifp);
> if_put(ifp);
> } else {
> -   ifa = ifa_ifwithnet(gateway, rtableid);
> -   }
> -   }
> -   if (ifa == NULL) {
> -   struct rtentry  *rt = rtalloc(gateway, 0, rtableid);
> -   /* The gateway must be local if the same address family. */
> -   if (!rtisvalid(rt) || ((rt->rt_flags & RTF_GATEWAY) &&
> -   rt_key(rt)->sa_family == dst->sa_family)) {
> +   struct rtentry *rt;
> +
> +   rt = rtalloc(gateway, RT_RESOLVE, rtableid);
> +   if (rt != NULL)
> +   ifa = rt->rt_ifa;
> rtfree(rt);
> -   return (NULL);
> }
> -   ifa = rt->rt_ifa;
> -   rtfree(rt);
> }
> +   if (ifa == NULL)
> +   return (NULL);
> if (ifa->ifa_addr->sa_family != dst->sa_family) {
> struct ifaddr   *oifa = ifa;
> ifa = ifaof_ifpforaddr(dst, ifa->ifa_ifp);



Re: Getting started with an OpenBSD Desktop...

2016-04-13 Thread Mike Burns
On 2016-04-13 10.42.28 +0200, Erling Westenvik wrote:
> On Tue, Apr 12, 2016 at 08:34:16PM -0400, Implausibility wrote:
> Various attempts on creating "generic" wifi network connection manager
> scripts have been made. None with a true GUI AFAIK.

I hooked some shell scripts up with zenity to make a GUI.



Re: OpenBSD 5.[8-9] and Quagga rip(ng)d ?

2016-04-13 Thread Jeremie Courreges-Anglas
"Christophe H. STux"  writes:

[...]

> If using 5.9 obsd and 0.99.24p1 quagga absolutely nothing works about
> RIPv2 :
>
> quagga's ripd complains about (on all network interfaces) :
>
> RIP: can't setsockopt IP_ADD_MEMBERSHIP Can't assign requested address

Try the following diff

Index: patches/patch-configure
===
RCS file: patches/patch-configure
diff -N patches/patch-configure
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-configure 13 Apr 2016 07:36:28 -
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- configure.orig Wed Apr 13 09:35:57 2016
 configure  Wed Apr 13 09:36:22 2016
+@@ -16888,7 +16888,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ int
+ main ()
+ {
+-#if (defined(__FreeBSD__) && ((__FreeBSD_version >= 500022 && 
__FreeBSD_version < 70) || (__FreeBSD_version < 50 && __FreeBSD_version 
>= 44))) || (defined(__NetBSD__) && defined(__NetBSD_Version__) && 
__NetBSD_Version__ >= 10601) || defined(__OpenBSD__) || defined(__APPLE__) 
|| defined(__DragonFly__) || defined(__sun)
++#if (defined(__FreeBSD__) && ((__FreeBSD_version >= 500022 && 
__FreeBSD_version < 70) || (__FreeBSD_version < 50 && __FreeBSD_version 
>= 44))) || (defined(__NetBSD__) && defined(__NetBSD_Version__) && 
__NetBSD_Version__ >= 10601) || defined(__APPLE__) || 
defined(__DragonFly__) || defined(__sun)
+   return (0);
+ #else
+   #error No support for BSD struct ip_mreq hack detected

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE



Re: Getting started with an OpenBSD Desktop...

2016-04-13 Thread Craig Skinner
Hi there,

On 2016-04-12 Tue 20:34 PM |, Implausibility wrote:
> 
> I don't need a lot, I spend most of my time at a shell prompt, but I'm
> thinking I need a better window manager, possibly Firefox (or a recommended
> lightweight alternative) and any invaluable X-based utilities.
> 

dillo is a useful lightweight non-java-script GUI web browser,
great for simple sites, web searches, etc.

claws-mail is a pretty good GUI mail client.

Cool.
-- 
"I cannot and will not cut my conscience to fit this year's fashions."
-- Lillian Hellman



Re: Getting started with an OpenBSD Desktop...

2016-04-13 Thread Erling Westenvik
On Tue, Apr 12, 2016 at 08:34:16PM -0400, Implausibility wrote:
> Hi.
> 
> I have a few old ThinkPads here, and I'd like to explore getting OpenBSD
> running as a lightweight desktop computer.
> 
> I don't need a lot, I spend most of my time at a shell prompt, but I'm
> thinking I need a better window manager, possibly Firefox (or a recommended
> lightweight alternative) and any invaluable X-based utilities.
> 
> I've had trouble getting the laptop connected to my local WiFi network,
> despite having compatible cards and a straightforward security config (WPA2),
> despite having followed the documentation.  If there's a
> network-connection-manager GUI available, that would be nice, but isn't
> essential.

Various attempts on creating "generic" wifi network connection manager
scripts have been made. None with a true GUI AFAIK. I used the shell script from
github below for some time on my T500 but lately it hasn't worked as
expected and I haven't had the time to investigate. (Currently I just
have half a dozen shell scripts, one for each wifi network I'm
connecting to.)

https://github.com/devious/wiconfig

> 
> I know how to install things via the ports, but traversing the directory
> structure to find useful packages is painful.  If there's a more friendly way
> to search for and discover new/interesting ports packages, I'd appreciate a
> link.

There is pkg_mgr(1) in packages. I use it a lot to poke around looking
for interesting packages. Have a look at its description by issuing:

$ pkg_info pkg_mgr

and install it with:

# pkg_add pkg_mgr


When looking for ports I use:

$ cd /usr/ports
$ make search key=


> Thanks.

Regards,

Erling



Re: Recording computer sound.

2016-04-13 Thread Alexandre Ratchov
On Tue, Apr 12, 2016 at 08:22:40AM +0300, li...@wrant.com wrote:
> Mon, 11 Apr 2016 19:17:31 +0200 Alexandre Ratchov 
> > On Sun, Apr 10, 2016 at 12:16:42PM +0300, li...@wrant.com wrote:
> > > 
> > > Just an idea, before providing a diff, does it look like a good
> > > candidate to go into FAQ13.4?  Thank you for your consideration.
> > 
> > Yes, this would be good candidate (for the FAQ 13.5), as this is
> > not the first time this is being discussed.
> 
> Same observation here.  I was suggesting it could be a continuation of
> the record audio sub-section 13.4, now doing it for 13.5 in accordance
> with your recommendation and renumbering below (and the index page).
> 
> Thank you for clarifying the numbering point, mailing the diff shortly.
> 
> > Basically this proves that the code is not simple enough and
> > usability needs to be improved.
> 
> And additionally shows an important feature either not directly obvious
> from the manual, or merely frequently used enough to need a FAQ mention.

I use it all the time, others seem to use it as well; we should
enable it by default



Re: routes get assigned to a wrong interface, openbsd 5.9

2016-04-13 Thread Martin Pieuchot
Hello Mart,

On 13/04/16(Wed) 09:22, Mart Tõnso wrote:
> Ah, yes, sorry about that. Here's the full routing info with ifconfig output:
> 
> # ifconfig
> [...]
> ppp0: flags=8051 mtu 1500
> priority: 0
> groups: ppp egress
> inet 10.128.195.179 --> 10.64.64.64 netmask 0xff00
  ^^
Here is the problem.  For historical reasons the code that finds
a matching interface to attach your route matches your gateway
with ppp0's address/netmask.

A workaround would be to change your ppp0 setup to use a /32 mask.

A correct fix is included below, I'll be interested to hear if it
works for you.

> tun0: flags=8051 mtu 1500
> priority: 0
> groups: tun
> status: active
> inet 10.88.0.124 --> 10.88.0.124 netmask 0xff00
^^
By the way why do you use the same src and dst address?

Index: net/route.c
===
RCS file: /cvs/src/sys/net/route.c,v
retrieving revision 1.298
diff -u -p -r1.298 route.c
--- net/route.c 26 Mar 2016 21:56:04 -  1.298
+++ net/route.c 13 Apr 2016 07:38:11 -
@@ -740,20 +740,16 @@ ifa_ifwithroute(int flags, struct sockad
ifa = ifaof_ifpforaddr(dst, ifp);
if_put(ifp);
} else {
-   ifa = ifa_ifwithnet(gateway, rtableid);
-   }
-   }
-   if (ifa == NULL) {
-   struct rtentry  *rt = rtalloc(gateway, 0, rtableid);
-   /* The gateway must be local if the same address family. */
-   if (!rtisvalid(rt) || ((rt->rt_flags & RTF_GATEWAY) &&
-   rt_key(rt)->sa_family == dst->sa_family)) {
+   struct rtentry *rt;
+
+   rt = rtalloc(gateway, RT_RESOLVE, rtableid);
+   if (rt != NULL)
+   ifa = rt->rt_ifa;
rtfree(rt);
-   return (NULL);
}
-   ifa = rt->rt_ifa;
-   rtfree(rt);
}
+   if (ifa == NULL)
+   return (NULL);
if (ifa->ifa_addr->sa_family != dst->sa_family) {
struct ifaddr   *oifa = ifa;
ifa = ifaof_ifpforaddr(dst, ifa->ifa_ifp);



Re: routes get assigned to a wrong interface, openbsd 5.9

2016-04-13 Thread Mart Tõnso
Ah, yes, sorry about that. Here's the full routing info with ifconfig output:

# ifconfig
lo0: flags=8049 mtu 32768
priority: 0
groups: lo
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x6
inet 127.0.0.1 netmask 0xff00
re0: flags=18843 mtu 1500
lladdr 00:0d:b9:40:bc:54
priority: 0
media: Ethernet autoselect (none)
status: no carrier
inet 172.16.1.0 netmask 0xff00 broadcast 172.16.1.255
re1: flags=18843 mtu 1500
lladdr 00:0d:b9:40:bc:55
priority: 0
media: Ethernet autoselect (none)
status: no carrier
re2: flags=18802 mtu 1500
lladdr 00:0d:b9:40:bc:56
priority: 0
media: Ethernet autoselect (10baseT half-duplex)
status: no carrier
athn0: flags=8802 mtu 1500
lladdr 04:f0:21:17:40:15
priority: 4
groups: wlan
media: IEEE802.11 autoselect
status: no network
ieee80211: nwid ""
enc0: flags=0<>
priority: 0
groups: enc
status: active
ppp0: flags=8051 mtu 1500
priority: 0
groups: ppp egress
inet 10.128.195.179 --> 10.64.64.64 netmask 0xff00
tun0: flags=8051 mtu 1500
priority: 0
groups: tun
status: active
inet 10.88.0.124 --> 10.88.0.124 netmask 0xff00


# netstat -rn
Routing tables

Internet:
DestinationGatewayFlags   Refs  Use   Mtu  Prio Iface
default10.64.64.64UGS2   12 - 8 ppp0
10.64.64.6410.128.195.179 UH 11 - 8 ppp0
10.88.0/24 10.88.0.124UGS00 - 8 tun0
10.88.0.12410.88.0.124UHl00 - 1 tun0
10.88.0.12410.88.0.124UH 00 - 8 tun0
10.90.0/24 10.88.0.1  UGS00 - 8 ppp0
10.99.0/24 10.88.0.1  UGS00 - 8 ppp0
10.128.195.179 10.128.195.179 UHl03 - 1 ppp0
127/8  127.0.0.1  UGRS   00 32768 8 lo0
127.0.0.1  127.0.0.1  UHl0  310 32768 1 lo0
172.16.1.0 00:0d:b9:40:bc:54  UHLl   00 - 1 re0
172.16.1/24172.16.1.0 C  00 - 4 re0
172.16.1.255   172.16.1.0 Hb 00 - 1 re0
224/4  127.0.0.1  URS00 32768 8 lo0

Internet6:
DestinationGateway
Flags   Refs  Use   Mtu  Prio Iface
::/104 ::1UGRS
  00 32768 8 lo0
::/96  ::1UGRS
  00 32768 8 lo0
::1::1UHl
  00 32768 1 lo0
::127.0.0.0/104::1UGRS
  00 32768 8 lo0
::224.0.0.0/100::1UGRS
  00 32768 8 lo0
::255.0.0.0/104::1UGRS
  00 32768 8 lo0
:::0.0.0.0/96  ::1UGRS
  00 32768 8 lo0
2002::/24  ::1UGRS
  00 32768 8 lo0
2002:7f00::/24 ::1UGRS
  00 32768 8 lo0
2002:e000::/20 ::1UGRS
  00 32768 8 lo0
2002:ff00::/24 ::1UGRS
  00 32768 8 lo0
fe80::/10  ::1UGRS
  00 32768 8 lo0
fe80::1%lo0fe80::1%lo0UHl
  00 32768 1 lo0
fec0::/10  ::1UGRS
  00 32768 8 lo0
ff01::/16  ::1UGRS
  00 32768 8 lo0
ff01::%lo0/32  ::1UC
  01 32768 4 lo0
ff02::/16  ::1UGRS
  00 32768 8 lo0
ff02::%lo0/32  ::1UC
  01 32768 4 lo0

Note the excerpt from openvpn log:

Apr 13 09:12:29 ruuter_dev01 openvpn[26943]: /sbin/ifconfig tun0
10.88.0.124 10.88.0.124 mtu 1500 netmask 255.255.255.0 up
Apr 13 09:12:29 ruuter_dev01 openvpn[26943]: /sbin/route add -net