bn_add.c cleanup

2018-07-10 Thread Theo Buehler
Our current implementations of BN_{,u}{add,sub}() are plain disgusting. OpenSSL cleaned this up quite a bit recently -- still under '(the "License")' -- and now you can actually follow what is going on. There should be no performance impact from this change, the code is doing essentially the same t

Re: bgpd: announce prefixes with priority n

2018-07-10 Thread Sebastian Benoit
hi, allows you to announce prefixes from the kernel routing table selected by priority. lightly tested, as in, the config part works. network inet priority 32 ok? (benno_bgpd_announce_network_by_priority.diff) diff --git usr.sbin/bgpd/bgpd.conf.5 usr.sbin/bgpd/bgpd.conf.5 index d49a239ca22.

ospfd: change control socket to ospfd.sock.

2018-07-10 Thread Remi Locherer
Hi, This changes the name of the ospfd control socket to include the rdomain. It's similar to what bgpd does. OK? Remi Index: ospfd/ospfd.c === RCS file: /cvs/src/usr.sbin/ospfd/ospfd.c,v retrieving revision 1.98 diff -u -p -r1.98

Re: pledge ospf6d

2018-07-10 Thread Remi Locherer
On Tue, Jul 10, 2018 at 07:12:01PM +0200, Florian Riehm wrote: > Hi, > > this adds pledge to the ospf6d route decision engine and the ospf engine. > It is compared to the ospfd quite simple, since ospf6d does not support > reload, > rdomains and kif-interfaces. > > ok? builds and runs fine. OK

Re: pledge ospf6d

2018-07-10 Thread Florian Obser
Reads good. OK florian On July 10, 2018 7:12:01 PM GMT+02:00, Florian Riehm wrote: >Hi, > >this adds pledge to the ospf6d route decision engine and the ospf >engine. >It is compared to the ospfd quite simple, since ospf6d does not support >reload, >rdomains and kif-interfaces. > >ok? > >friehm >

pledge ospf6d

2018-07-10 Thread Florian Riehm
Hi, this adds pledge to the ospf6d route decision engine and the ospf engine. It is compared to the ospfd quite simple, since ospf6d does not support reload, rdomains and kif-interfaces. ok? friehm Index: ospfe.c === RCS file: /hom

bgpd use struct filterstate in more places

2018-07-10 Thread Claudio Jeker
This uses struct filterstate in rde_update_dispatch() and passes the struct to a few functions down (rde_update_update, path_update and some more friends). After that it should become easier to move nexthop and later maybe the peer out of struct rde_aspath into struct prefix. -- :wq Claudio Ind

soii addresses for interfaces without layer 2 addresses

2018-07-10 Thread Florian Obser
When an interface doesn't have a layer 2 address in6_get_soii_ifid() failes and then later on a in in6_get_ifid() a layer 2 address is "borrowed" from from another interface. Do the "borrowing" in in6_get_soii_ifid(), too so that semantically opaque interface identifiers wo

stable IPv6 link local addresses for interfaces without layer 2 addresses

2018-07-10 Thread Florian Obser
When an interface doesn't have a layer 2 address in6_get_ifid() tries to "borrow" one from another interface. But then it checks if the U bit is set int the generated EUI64 address and rejects it. On the other hand for interfaces that do have a layer 2 address this check is

Re: usbdevs & hub ports status

2018-07-10 Thread David Bern
On Sun, 8 Jul 2018 22:09:02 +0200 Martin Pieuchot wrote: > On 04/07/18(Wed) 17:00, Martin Pieuchot wrote: > > Diff below adds support for printing USB ports status. It includes an > > ABI change as we currently do not export port status/change to userland. > > > > I'd really like to export the

fix a few clang warnings for gnu cvs

2018-07-10 Thread Theo Buehler
Had these Ms in my trees for a while. Does not fix all warnings, but a few simple ones: Use "%s" to print modifiable strings, add a couple of braces, ansify a few functions and remove a few extra parens. Index: diff/diff3.c === RCS

yet another bgpd cleanup diff

2018-07-10 Thread Claudio Jeker
Again lots of minuses that can be replaced with very few plus lines. This moves the prefixlen check into rde_update_get_prefix*() functions since those can already return an error that is actually the same. OK? -- :wq Claudio Index: rde.c =

Re: Remove DELAY(1000) from ip_carp.c

2018-07-10 Thread Sebastian Benoit
Alexander Bluhm(alexander.bl...@gmx.net) on 2018.07.10 13:17:45 +0200: > On Tue, Jul 10, 2018 at 01:04:54PM +0200, Florian Riehm wrote: > > Several people, including myself, asked why we need the DELAY(1000) in > > netinet/ip_carp.c. It exists since the initial revision of carp(4). > > Nobody can e

Re: ospfd: track gateway addresses of cloning routes

2018-07-10 Thread Sebastian Benoit
nice, ok benno@ Florian Riehm(m...@friehm.de) on 2018.07.10 12:18:15 +0200: > Hi, > > since we use multiple cloning routes (mpath) if more than one ip address > exists in the same network, the routes are distinguished by their gateway > address, which is the associated interface address. > The os

ospf6d: depend on

2018-07-10 Thread Remi Locherer
Hi, With the "depend on" option routes are sent out with a metric of 65535 if the referenced interface is down or in state backup. This is especially useful on a carp cluster to ensure all traffic goes to the carp master. This is similar to what we have for ospfd. A configuration using this feat

Re: ospf6d: Do not try to change cloning routes into gateway routes

2018-07-10 Thread Claudio Jeker
On Tue, Jul 10, 2018 at 01:56:37PM +0200, Florian Riehm wrote: > Hi, > > If intra area prefixes move from one router to another router, cloning routes > may become gateway routes and contrary. The kernel does not allow to change > the > flags RTF_GATEWAY / RTF_CLONING in RTM_CHANGE messages, but

ospf6d: Do not try to change cloning routes into gateway routes

2018-07-10 Thread Florian Riehm
Hi, If intra area prefixes move from one router to another router, cloning routes may become gateway routes and contrary. The kernel does not allow to change the flags RTF_GATEWAY / RTF_CLONING in RTM_CHANGE messages, but ospf6d tries this anyway. The result is a broken route. Instead of modifying

Re: ospfd: track gateway addresses of cloning routes

2018-07-10 Thread Claudio Jeker
On Tue, Jul 10, 2018 at 12:18:15PM +0200, Florian Riehm wrote: > Hi, > > since we use multiple cloning routes (mpath) if more than one ip address > exists in the same network, the routes are distinguished by their gateway > address, which is the associated interface address. > The ospfd has to tra

Re: Remove DELAY(1000) from ip_carp.c

2018-07-10 Thread Alexander Bluhm
On Tue, Jul 10, 2018 at 01:04:54PM +0200, Florian Riehm wrote: > Several people, including myself, asked why we need the DELAY(1000) in > netinet/ip_carp.c. It exists since the initial revision of carp(4). > Nobody can exactly explain why it was added and tests work fine without it. > I would like

ospfd: track gateway addresses of cloning routes

2018-07-10 Thread Florian Riehm
Hi, since we use multiple cloning routes (mpath) if more than one ip address exists in the same network, the routes are distinguished by their gateway address, which is the associated interface address. The ospfd has to track the gateway addresses so that kroute_matchgw() is able to find the corre

Remove DELAY(1000) from ip_carp.c

2018-07-10 Thread Florian Riehm
Hi, Several people, including myself, asked why we need the DELAY(1000) in netinet/ip_carp.c. It exists since the initial revision of carp(4). Nobody can exactly explain why it was added and tests work fine without it. I would like to remove it, since it blocks unlocking efforts of tb@ und mpi@. I

Re: bgpd parse.y: dont let rtable number overflow

2018-07-10 Thread Claudio Jeker
On Tue, Jul 10, 2018 at 11:15:51AM +0200, Sebastian Benoit wrote: > we only support up to RT_TABLEID_MAX rtables. > > ok? OK > (benno_bgpd_rtable_max.diff) > > Index: parse.y > === > RCS file: /cvs/src/usr.sbin/bgpd/parse.y,v > re

bgpd parse.y: dont let rtable number overflow

2018-07-10 Thread Sebastian Benoit
we only support up to RT_TABLEID_MAX rtables. ok? (benno_bgpd_rtable_max.diff) Index: parse.y === RCS file: /cvs/src/usr.sbin/bgpd/parse.y,v retrieving revision 1.325 diff -u -p -r1.325 parse.y --- parse.y 9 Jul 2018 12:05:11 -0

Re: pfctl: recognize MLDv2 Listener Report icmp6 type

2018-07-10 Thread Sebastian Benoit
ok Jeremie Courreges-Anglas(j...@wxcvbn.org) on 2018.07.10 10:33:17 +0200: > > Described in https://tools.ietf.org/html/rfc3810 > > ok? > > > Index: pfctl_parser.c > === > RCS file: /d/cvs/src/sbin/pfctl/pfctl_parser.c,v > retri

pfctl: recognize MLDv2 Listener Report icmp6 type

2018-07-10 Thread Jeremie Courreges-Anglas
Described in https://tools.ietf.org/html/rfc3810 ok? Index: pfctl_parser.c === RCS file: /d/cvs/src/sbin/pfctl/pfctl_parser.c,v retrieving revision 1.319 diff -u -p -p -u -r1.319 pfctl_parser.c --- pfctl_parser.c 8 Feb 2018 0