Re: bgpd, fix RTR connect

2021-05-03 Thread Denis Fondras
Le Mon, May 03, 2021 at 03:01:13PM +0200, Claudio Jeker a écrit : > The RTR connect code calls addr2sa() as an argument to connect() but also > uses the len argument in both calls. It seems in some cases this is > optimised the wrong way. I think it is better to write this code using two > steps

newfs_msdos(8): fix FAT32 partitions formatting

2021-04-26 Thread Denis Fondras
The 16-bit total count of sectors is set by newfs_msdos(8) when the number of sectors is less than MAXU16 even if asked to format in FAT32. This diff fixes that according to the FAT32 spec : "For FAT32 volumes, this field [BPB_TotSec16] must be 0" OK ? Index: newfs_msdos.c

Re: show negotiated capabilities in bgpctl show neighbor output

2021-04-26 Thread Denis Fondras
Le Mon, Apr 26, 2021 at 04:21:16PM +0200, Claudio Jeker a écrit : > The bgpctl show neighbor output is a bit missleading for capabilities. > It currently shows the capabilities sent by the neighbor and not the ones > that then got selected for the session. This matters especially for the >

Allow mounting small FAT32 partitions

2021-04-22 Thread Denis Fondras
If partition is smaller than 32MB, mount_msdos(8) will yield "not an MSDOS filesystem". pmp->pm_Sectors is set by newfs_msdos(8) when the number of sectors is less than MAXU16 even if asked to format in FAT32. I choosed to fix mounting instead of formatting (newfs_msdos.c frightens me...)

Re: [External] : Re: XCP-ng, OpenBSD and network interface changes

2021-02-01 Thread Denis Fondras
Le Mon, Feb 01, 2021 at 01:49:09PM +0100, Alexandr Nedvedicky a écrit : > Hello Denis, > > I think we need to refresh expected value in 'flags' > with every loop iteration. does diff below help? > Thank you but it does not help. Same panic and also same panic if I test with loop++ > 10.

XCP-ng, OpenBSD and network interface changes

2021-01-31 Thread Denis Fondras
I am using XCP-ng with the latest OpenBSD snapshot. Whenever I make an hardware change in networking on the VM (connect or disconnect an interface, change associated network), the VM panics : openbsd# panic: grant table reference 5912 is held by domain 0: frame 0x1f1a4 flags 0x19 Stopped at

Re: route sourceaddr: simplify code & get out of ART

2021-01-23 Thread Denis Fondras
Le Sat, Jan 09, 2021 at 06:50:50PM +0100, Denis Fondras a écrit : > This diff place the user-set source address outside of struct art_root and > make > the code more readable (to me). > > Based on a concept by mpi@ > ping.

Re: bgpd adjust aspath_neighbor to follow RFC more closely

2021-01-14 Thread Denis Fondras
Le Thu, Jan 14, 2021 at 02:20:26PM +0100, Claudio Jeker a écrit : > The aspath_neighbor function returns the first AS of a path. Now if the > first element is an AS_SET then this does not really make sense. > RFC4271 has this bit in section 9.1.2.2 > > Similarly, neighborAS(n) is a

Re: Change bgpd_addr encoding of VPN v4 and v6 addresses

2021-01-14 Thread Denis Fondras
Le Tue, Jan 12, 2021 at 10:06:46AM +0100, Claudio Jeker a écrit : > On Tue, Jan 05, 2021 at 11:17:22AM +0100, Claudio Jeker wrote: > > While changing log_addr() I noticed that struct bgpd_addr could benefit > > from changing the encoding of AID_VPN_IPv4 and AID_VPN_IPv6 addrs. > > Instead of

Re: bgpd refactor route decision process

2021-01-13 Thread Denis Fondras
Le Tue, Jan 12, 2021 at 05:39:02PM +0100, Claudio Jeker a écrit : > This diff changes two things: > - First, it move the kroute update into rde_generate_updates() simplifying > prefix_evaluate a little bit. > > - Second, it changes prefix_evaluate to take an additional argument for the > old

route sourceaddr: simplify code & get out of ART

2021-01-09 Thread Denis Fondras
This diff place the user-set source address outside of struct art_root and make the code more readable (to me). Based on a concept by mpi@ Index: net/art.h === RCS file: /cvs/src/sys/net/art.h,v retrieving revision 1.20 diff -u -p

Re: Port httpd(8) 'strip' directive to relayd(8)

2021-01-07 Thread Denis Fondras
Le Thu, Jan 07, 2021 at 12:03:54PM +0100, Hiltjo Posthuma a écrit : > Hi Denis, > > I like this feature. For example it would be useful for using relayd as a > reverse-proxy to forward it to an internal network running a httpd with some > service. Then the path can be stripped without having to

Re: minor cleanup in bgpd's process startup

2021-01-04 Thread Denis Fondras
Le Mon, Jan 04, 2021 at 05:04:51PM +0100, Claudio Jeker a écrit : > bgpd will get a new process for RTR handling. Because of this it makes > sense to cleanup the startup code a bit and not use flags to indicate > which process to run but instead use the enum bgpd_process. > Additionally change the

Re: Port httpd(8) 'strip' directive to relayd(8)

2021-01-03 Thread Denis Fondras
Le Fri, Dec 11, 2020 at 10:53:56AM +, Olivier Cherrier a écrit : > > Hello tech@, > > Is there any interest for this feature to be commited? > I find it very useful. Thank you Denis! > Here is an up to date diff, looking for OKs. Index: parse.y

Re: Rename SIMPLEQ_ to STAILQ_, diff 1/7

2020-12-30 Thread Denis Fondras
Le Tue, Dec 29, 2020 at 12:36:22PM -0700, Todd C. Miller a écrit : > On Sat, 26 Dec 2020 15:07:36 -0700, "Theo de Raadt" wrote: > > > Well in that case this should still be a multistep process. > > > > Add STAILQ > > > > Convert things, including everything in ports > > > > No diff should change

Re: Rename SIMPLEQ_ to STAILQ_, diff 1/7

2020-12-26 Thread Denis Fondras
Le Sat, Dec 26, 2020 at 06:55:09PM +0100, Mark Kettenis a écrit : > > Date: Sat, 26 Dec 2020 18:39:36 +0100 > > From: Denis Fondras > > > > Le Sat, Dec 26, 2020 at 06:23:41PM +0100, Mark Kettenis a écrit : > > > > > This diff renames SIMPLEQ_* t

Re: Rename SIMPLEQ_ to STAILQ_, diff 1/7

2020-12-26 Thread Denis Fondras
Le Sat, Dec 26, 2020 at 06:23:41PM +0100, Mark Kettenis a écrit : > > > This diff renames SIMPLEQ_* to STAILQ_* in /usr/src/sys/sys to unify with > > > FreeBSD and Linux. > > > > > > I added aliases at the end of queue.h to avoid breaking base too much. > > > they will > > > be removed as soon

Rename SIMPLEQ_ to STAILQ_, diff 6/7 (usr.bin)

2020-12-26 Thread Denis Fondras
Rename SIMPLEQ_* to STAILQ_* in /usr/src/usr.bin Index: ctfconv/dw.c === RCS file: /cvs/src/usr.bin/ctfconv/dw.c,v retrieving revision 1.4 diff -u -p -r1.4 dw.c --- ctfconv/dw.c27 Sep 2017 08:59:38 - 1.4 +++

Rename SIMPLEQ_ to STAILQ_, diff 5/7 (usr.sbin)

2020-12-26 Thread Denis Fondras
Rename SIMPLEQ_* to STAILQ_* in /usr/src/usr.sbin Index: bgpd/bgpd.c === RCS file: /cvs/src/usr.sbin/bgpd/bgpd.c,v retrieving revision 1.230 diff -u -p -r1.230 bgpd.c --- bgpd/bgpd.c 5 Nov 2020 11:52:59 - 1.230 +++

Rename SIMPLEQ_ to STAILQ_, diff 7/7 (man+regress)

2020-12-26 Thread Denis Fondras
Rename SIMPLEQ_* to STAILQ_* in /usr/src/share and /usr/src/regress Index: regress/usr.sbin/bgpd/unittests/rde_sets_test.c === RCS file: /cvs/src/regress/usr.sbin/bgpd/unittests/rde_sets_test.c,v retrieving revision 1.7 diff -u -p

Rename SIMPLEQ_ to STAILQ_, diff 4/7 (sbin)

2020-12-26 Thread Denis Fondras
Rename SIMPLEQ_* to STAILQ_* in /usr/src/sbin Index: iked/iked.h === RCS file: /cvs/src/sbin/iked/iked.h,v retrieving revision 1.179 diff -u -p -r1.179 iked.h --- iked/iked.h 21 Dec 2020 22:49:36 - 1.179 +++ iked/iked.h 25

Rename SIMPLEQ_ to STAILQ_, diff 3/7 (lib)

2020-12-26 Thread Denis Fondras
Rename SIMPLEQ_ to STAILQ_ in /usr/src/lib Index: libc/gen/posix_spawn.c === RCS file: /cvs/src/lib/libc/gen/posix_spawn.c,v retrieving revision 1.10 diff -u -p -r1.10 posix_spawn.c --- libc/gen/posix_spawn.c 28 Jun 2019

Rename SIMPLEQ_ to STAILQ_, diff 1/7

2020-12-26 Thread Denis Fondras
mpi@ reminded me I had this diff cooking. This diff renames SIMPLEQ_* to STAILQ_* in /usr/src/sys/sys to unify with FreeBSD and Linux. I added aliases at the end of queue.h to avoid breaking base too much. they will be removed as soon as diff 2,3,4,5,6,7 are commited. net/sniproxy has a patch

Re: Document art locking fields

2020-11-11 Thread Denis Fondras
On Wed, Nov 11, 2020 at 05:25:25AM -0300, Martin Pieuchot wrote: > While discussing the new source address mechanism with denis@, I figured > those ought to be documented. > > Note that `ar_rtableid' is unused and can die. The ART code is actually > free from any network knowledge. > > ok? >

Use selected source IP when replying to reflecting ICMP

2020-11-08 Thread Denis Fondras
ICMP error replies are sent from the IP of the interface the packet came in even when the source IP was forced with route(8). Index: netinet/ip_icmp.c === RCS file: /cvs/src/sys/netinet/ip_icmp.c,v retrieving revision 1.183 diff -u

route sourceaddr works with p2p interfaces

2020-11-02 Thread Denis Fondras
Hi, route(8) sourceaddr is not used with p2p interfaces. My initial fear was about tunnel interfaces but after some more testing, there is no need to be so. Here is the diff: Index: sbin/route/route.8 === RCS file:

Re: Minor tweak relayd agentx manpage

2020-10-30 Thread Denis Fondras
On Fri, Oct 30, 2020 at 09:53:08AM +0100, Martijn van Duren wrote: > I think metrics is a better word than statistics and it might help > people if they knew where to query for these metrics. > > OK? I also find it more accurate. OK denis@ > martijn@ > > Index: relayd.conf.5 >

Re: relayd(8) remove snmp keyword

2020-10-30 Thread Denis Fondras
On Thu, Oct 29, 2020 at 03:51:24PM +0100, Martijn van Duren wrote: > 6.8 is out in the wild. I guess this is as good a time as any to remove > the old snmp keyword. > > OK? > OK denis@ And while it is fresh, is this the right time to update plus.html and current.html ?

Re: httpd(8): add location access tests

2020-10-27 Thread Denis Fondras
On Tue, Oct 27, 2020 at 12:02:18PM +0100, Matthias Pressfreund wrote: > True. Updated patch below. > Thanks, I have been using the diff (from your GH account) since a few weeks. OK denis@ I will commit tonight if nobody stands against. > > > Index: usr.sbin/httpd/httpd.conf.5 >

Re: httpd(8): add location access tests

2020-10-27 Thread Denis Fondras
Thanks Matthias, comment below. On Tue, Oct 27, 2020 at 08:37:39AM +0100, Matthias Pressfreund wrote: > Index: usr.sbin/httpd/httpd.conf.5 > === > RCS file: /cvs/src/usr.sbin/httpd/httpd.conf.5,v > retrieving revision 1.113 > diff

relayd: allow mix of TLS and non-TLS backend

2020-10-26 Thread Denis Fondras
With this config : --- relay "proxy" { listen on {{publicip}} port 443 tls protocol "httpproxy" forward with tls to port 443 forward to port 10100 } --- relayd(8) will currently use TLS for all backends. This diff will use TLS only if 'with tls' is used. In the example above, relayd

Re: httpd(8): fix location duplicate detection

2020-10-26 Thread Denis Fondras
On Mon, Oct 26, 2020 at 09:28:54AM +0100, m...@fn.de wrote: > Ping. Latest diff below. > OK denis@ I will commit tonight if nobody stands against. Thank you. > Index: usr.sbin/httpd/parse.y > === > RCS file:

Re: Port httpd(8) 'strip' directive to relayd(8)

2020-10-25 Thread Denis Fondras
Previous one had a typo... :/ On Sat, Oct 24, 2020 at 08:01:36PM +0200, Hiltjo Posthuma wrote: > Thanks for working on this. I haven't tested the patch yet except compiling, > but this feature would be very nice to have imho. > > I find the current "path replace" syntax confusing and it doesn't

Re: Port httpd(8) 'strip' directive to relayd(8)

2020-10-25 Thread Denis Fondras
On Sat, Oct 24, 2020 at 08:01:36PM +0200, Hiltjo Posthuma wrote: > Thanks for working on this. I haven't tested the patch yet except compiling, > but this feature would be very nice to have imho. > > I find the current "path replace" syntax confusing and it doesn't work for > this > use-case. >

Port httpd(8) 'strip' directive to relayd(8)

2020-10-24 Thread Denis Fondras
The 'strip' directive from httpd(8) is useful when forwarding to another server. This diff adds the feature to relayd(8). With : match request path "/server/*" tag psonoserver match request tagged psonoserver path strip 1 match request tagged psonoserver forward to

Re: net.inet.ip.forwarding=0 vs lo(4)

2020-10-18 Thread Denis Fondras
On Sun, Oct 18, 2020 at 02:04:31PM +1000, David Gwynne wrote: > or is there a way i can do this without a diff already? > I am also curious... > thoughts? > The diff works as advertise.

Diff to allow selection of source IP address

2020-10-13 Thread Denis Fondras
Is anyone interested in this ? This diff allows to select the default source IP address (for TCP/UDP connections) on multi-homed & "multi-addressed" machines. Looking for feedbacks on what I broke. Do not test with ping(8) as it uses another source address selection codepath. `curl ifconfig.co`

Re: /etc/daily: use find -delete

2020-10-08 Thread Denis Fondras
On Thu, Oct 08, 2020 at 05:32:15AM -0600, Todd C. Miller wrote: > We can use find's built-in -delete primary to remove old /tmp files > and directories. This is somewhat less error-prone than execing > rm or rmdir. > OK denis@ > - todd > > Index: etc/daily >

Re: ifconfig: consistent display of P2P link

2020-10-07 Thread Denis Fondras
On Wed, Oct 07, 2020 at 01:01:29PM +0200, Claudio Jeker wrote: > On Wed, Oct 07, 2020 at 12:27:04PM +0200, Denis Fondras wrote: > > All tunnels & point-to-point addresses are separated by "->" but inet. > > > > Before : > > gre0: flags=8051 mtu

ifconfig: consistent display of P2P link

2020-10-07 Thread Denis Fondras
All tunnels & point-to-point addresses are separated by "->" but inet. Before : gre0: flags=8051 mtu 1476 index 6 priority 0 llprio 6 encap: vnetid none txprio payload rxprio packet groups: gre tunnel: inet 192.0.2.1 -> 198.51.100.1 ttl 64 nodf ecn inet

Re: fix: ospf6d(8): wrong intra area announcement

2020-10-03 Thread Denis Fondras
On Fri, Oct 02, 2020 at 02:01:09AM +0200, Jan Klemkow wrote: > Hi, > > The new intra area db entry has to be saved into the tree before > orig_intra_area_prefix_lsas() is called. If not, the ospf6d will not > announce the new intra area db for a newly learned link from another > ospf router of

[diff] Allow preferred source IP selection

2020-10-01 Thread Denis Fondras
This updated diff unbreak P2P links where local address was not the same as preferred source address. Sending to tech@ may help get more feedback on what I broke. Example usage : Set 2001:db8::1 as source : route source 2001:db8::1 Unset previously set IPv6 address on rdomain 10 : route -T10

ifconfig: consistent display of P2P link

2020-10-01 Thread Denis Fondras
All tunnels & point-to-point addresses are separated by "->" but inet. Denis Index: ifconfig.c === RCS file: /cvs/src/sbin/ifconfig/ifconfig.c,v retrieving revision 1.426 diff -u -p -r1.426 ifconfig.c --- ifconfig.c 15 Sep 2020

ifconfig: consistent display of P2P link

2020-09-17 Thread Denis Fondras
All tunnels & point-to-point addresses are separated by "->" but inet. Denis Index: ifconfig.c === RCS file: /cvs/src/sbin/ifconfig/ifconfig.c,v retrieving revision 1.426 diff -u -p -r1.426 ifconfig.c --- ifconfig.c 15 Sep 2020

[diff] Allow preferred source IP selection

2020-09-17 Thread Denis Fondras
This updated diff unbreak P2P links where local address was not the same as preferred source address. Sending to tech@ may help get more feedback on what I broke. Example usage : Set 2001:db8::1 as source : route source 2001:db8::1 Unset previously set IPv6 address on rdomain 10 : route -T10

route.8, remove unprinted text

2020-09-10 Thread Denis Fondras
I can't see where these two lines are printed. Index: route.8 === RCS file: /cvs/src/sbin/route/route.8,v retrieving revision 1.91 diff -u -p -r1.91 route.8 --- route.8 19 Jan 2020 18:22:31 - 1.91 +++ route.8 10 Sep

Re: snmpd refactor listen on grammar

2020-09-10 Thread Denis Fondras
On Wed, Sep 09, 2020 at 07:45:32AM +0200, Martijn van Duren wrote: > On Tue, 2020-09-08 at 19:33 +0200, Denis Fondras wrote: > > On Sun, Sep 06, 2020 at 10:11:02PM +0200, Martijn van Duren wrote: > > > Moving towards individual transport mappings, it's becoming more > &

Re: snmpd refactor listen on grammar

2020-09-08 Thread Denis Fondras
On Sun, Sep 06, 2020 at 10:11:02PM +0200, Martijn van Duren wrote: > Moving towards individual transport mappings, it's becoming more > convenient to have the protocol directly after the listen on statement. > This gives me more flexibility in using mapping-specific APIs, also > when other

Re: snmpd remove snmpe_dispatch_parent

2020-09-06 Thread Denis Fondras
On Sun, Sep 06, 2020 at 06:37:17PM +0200, Martijn van Duren wrote: > going for another easy picking: snmpe_dispatch_parent is just an empty > stub. proc.c assigns proc_dispatch_null to p_cb if it's null, which > effectively does the same thing. > > OK? > OK denis@ > martijn@ > > Index:

Re: Refine IPv6 source address selection

2020-08-24 Thread Denis Fondras
On Mon, Aug 24, 2020 at 06:42:02PM +0200, Florian Obser wrote: > To clarify, this is independent of my recent work in > in6_ifawithscope(), -ifa did not work with the old code, either. > Of course ! Sorry if my message led to think you were responsible for it.

Refine IPv6 source address selection

2020-08-24 Thread Denis Fondras
While working on source selection, I noticed the IPv6 source was not honored when set from route(8) with -ifa. After discussing with florian@, here is a proposed change. It chooses the source address associated with the route (hence honoring -ifa) instead of the first address of the output

Re: empty rc.firsttime when installing

2020-07-14 Thread Denis Fondras
On Tue, Jul 14, 2020 at 02:14:55PM +0100, Stuart Henderson wrote: > On 2020/07/14 15:03, Denis Fondras wrote: > > I was upgrading an EdgeRouter and it restarted multiple times instead of > > booting > > /bsd > > > > When I had a chance to boot it c

empty rc.firsttime when installing

2020-07-14 Thread Denis Fondras
I was upgrading an EdgeRouter and it restarted multiple times instead of booting /bsd When I had a chance to boot it correctly, I noticed that sysmerge and fw_update were run multiple times. This diff avoids filling rc.firsttime and rc.sysmerge. Index: distrib/miniroot/install.sub

Re: 11n Tx aggregation for iwm(4)

2020-06-27 Thread Denis Fondras
On Fri, Jun 26, 2020 at 02:45:53PM +0200, Stefan Sperling wrote: > This patch adds support for 11n Tx aggregation to iwm(4). iwm0 at pci2 dev 0 function 0 "Intel Dual Band Wireless AC 7260" rev 0x73, msi AP is Zyxel USG40W Before : bandwidth min/avg/max/std-dev = 9.800/14.000/14.214/0.606 Mbps

update vxlan(4) man

2020-06-26 Thread Denis Fondras
vxlan(4) actually supports IPv6 tunnel endpoints. Only multicast endpoints are unsupported. Index: vxlan.4 === RCS file: /cvs/src/share/man/man4/vxlan.4,v retrieving revision 1.8 diff -u -p -r1.8 vxlan.4 --- vxlan.4 22 Nov 2018

Re: Some redundant code lines in sys

2020-06-05 Thread Denis Fondras
On Fri, Jun 05, 2020 at 12:56:21PM +0200, Prof. Dr. Steffen Wendzel wrote: > Dear all: > > just in case this appears useful to you: I found some redundant code > lines in the following files. > > sys/net/pipex.h: >struct pipex_session *pipex_pppoe_lookup_session (struct mbuf *); >struct

ospf6d: enable reload

2020-05-30 Thread Denis Fondras
This diff provides a working 'ospf6ctl reload'. Must be applied after https://marc.info/?l=openbsd-tech=159084971620177=2 Index: ospf6ctl/ospf6ctl.c === RCS file: /home/denis/dev/cvs/src/usr.sbin/ospf6ctl/ospf6ctl.c,v retrieving

ospf6d: change the way interfaces are handled

2020-05-30 Thread Denis Fondras
This diff updates how ospf6d(8) handles interfaces. It is now in line with what ospfd(8) does. Last step before enabling reload. Tested against Mikrotik and Zebra implementations. Warning: it changes the default behaviour. No prefix is announced if no "redistribute" statement is present in

Re: snmp(1) cleanup snmpd legacy

2020-05-19 Thread Denis Fondras
On Mon, May 18, 2020 at 12:18:47PM +0200, Martijn van Duren wrote: > Anyone feeling like trimming a little fat? > OK denis@ > On Fri, 2020-05-08 at 11:41 +0200, Martijn van Duren wrote: > > Diff below removes fields from struct oid used by snmpd but not useful > > for snmp(1). Minus 503LoC and

Re: ospfctl json support

2020-05-18 Thread Denis Fondras
On Mon, May 18, 2020 at 09:04:06AM +0200, Claudio Jeker wrote: > There is a file missing in the diff. > > One thing I have seen in the original diff from Richard was that the > copyright in the new file should be copied from ospfctl.c since this is > mostly a copy paste action and not new work. >

Re: ospfctl json support

2020-05-17 Thread Denis Fondras
On Fri, May 15, 2020 at 11:34:58AM +0100, Richard Chivers wrote: > Hi, > > I have now resolved the spacing/tabbing issues I think correctly > following style(9), along with a couple of other indent issues. > > Would appreciate a cursory look at this stage to spot any further common > issues. >

Re: bgpctl paged output for show rib

2020-05-17 Thread Denis Fondras
> This implements a way to add a limit for bgpctl show rib output. > When a limit is set then the output will include a token (at the end) > that can be used to get the next batch of output. These two things allow > to build a frontend that puts the output onto multiple pages. > Both regular

ospf6d: remove F_IFACE_AVAIL

2020-05-16 Thread Denis Fondras
This information is never used/checked. Index: kroute.c === RCS file: /cvs/src/usr.sbin/ospf6d/kroute.c,v retrieving revision 1.63 diff -u -p -r1.63 kroute.c --- kroute.c16 May 2020 15:54:12 - 1.63 +++ kroute.c16 May

scan_ffs prints negative size

2020-05-16 Thread Denis Fondras
Small diff to fix size printing. Before : $ doas scan_ffs -v sd0 block 55167 id 758d4818,f2894c98 size -859043093 After: $ doas ./obj/scan_ffs -v sd0 block 55167 id 758d4818,f2894c98 size 3435924203 Index: scan_ffs.c === RCS file:

Re: ospfctl json support

2020-05-14 Thread Denis Fondras
On Thu, May 14, 2020 at 07:15:41PM +0100, Richard Chivers wrote: > Shall I effectively fix issues in the original code at this stage, or only > where I have moved and refactored? > Thanks. Limit the changes to what is relative to json support. The diff is already big enough :)

ospf6d: remove IMSG_IFDELETE

2020-05-14 Thread Denis Fondras
Following https://marc.info/?l=openbsd-tech=158946552515632=2, when IMSG_IFADD is removed, IMSG_IFDELETE becomes useless... Index: kroute.c === RCS file: /home/denis/dev/cvs/src/usr.sbin/ospf6d/kroute.c,v retrieving revision 1.62

Re: ospfctl json support

2020-05-14 Thread Denis Fondras
On Thu, May 14, 2020 at 05:51:58PM +0100, Richard Chivers wrote: > Let me know if this now works for you. > This is better, I can apply it :) However, there are many style(9) issues. Can you fix them please before I review the changes ? Thank you.

ospf6d: remove IMSG_IFADD

2020-05-14 Thread Denis Fondras
IMSG_IFADD is never used, wipe it. Index: ospf6d.h === RCS file: /cvs/src/usr.sbin/ospf6d/ospf6d.h,v retrieving revision 1.46 diff -u -p -r1.46 ospf6d.h --- ospf6d.h5 Apr 2020 18:19:04 - 1.46 +++ ospf6d.h14 May 2020

Re: ospfctl json support

2020-05-14 Thread Denis Fondras
Please provide a properly formatted diff. On Thu, May 14, 2020 at 07:16:31AM +0100, Richard Chivers wrote: > Hi, > > I have done the work to implement ospfctl json support, but as > discussed i will provide it in two diffs. > > This first one externalises the output aspect of ospfctl and there

Re: add support for STAILQ_* to queue.h

2020-04-23 Thread Denis Fondras
On Thu, Apr 23, 2020 at 10:31:53AM -0600, Theo de Raadt wrote: > I would be happy wit such unification. > > Are there any objectors? > > (finishing this might need to be put off for about a month, tho) > I am currently building base with a diff that converts SIMPLEQ_* to STAILQ_*

Re: add support for STAILQ_* to queue.h

2020-04-23 Thread Denis Fondras
On Thu, Apr 23, 2020 at 08:18:16AM -0600, Todd C. Miller wrote: > Singly-linked tail queues are functionally equivalent to the "simple > queues" we already have. Do we really need two implementations of > what are effectively the same thing or should we just define STAIL_* > in terms of SIMPLEQ_*

add support for STAILQ_* to queue.h

2020-04-23 Thread Denis Fondras
I don't know if it is useful to anyone else but it is required by lsquic, a library that implements QUIC / HTTP3. Index: share/man/man3/queue.3 === RCS file: /cvs/src/share/man/man3/queue.3,v retrieving revision 1.66 diff -u -p

Re: slaacd(8): honour rdomain we are running in

2020-04-12 Thread Denis Fondras
On Sun, Apr 12, 2020 at 07:53:23PM +0200, Florian Obser wrote: > OK? > OK denis@ > diff --git slaacd.c slaacd.c > index 58f15bcda37..dae2eab3434 100644 > --- slaacd.c > +++ slaacd.c > @@ -755,7 +755,7 @@ configure_gateway(struct imsg_configure_dfr *dfr, uint8_t > rtm_type) >

ospf6d: update to connected routes

2020-04-01 Thread Denis Fondras
Handle connected routes as ospfd(8) does. (diff to ospf6d and ospf6ctl) Index: ospf6ctl/ospf6ctl.c === RCS file: /cvs/src/usr.sbin/ospf6ctl/ospf6ctl.c,v retrieving revision 1.50 diff -u -p -r1.50 ospf6ctl.c --- ospf6ctl/ospf6ctl.c

Re: ospf6d: bring ospf6d closer to ospfd

2020-03-28 Thread Denis Fondras
On Sat, Mar 28, 2020 at 05:00:11PM +0100, Remi Locherer wrote: > On Sat, Mar 21, 2020 at 05:25:45PM +0100, Denis Fondras wrote: > > Biggest chunk is rework of rde_asext_get()/rde_asext_put(). > > Also change get_net_link() and get_rtr_link() to work like ospfd couterpart. >

Re: tar confused error messages

2020-03-22 Thread Denis Fondras
On Sun, Mar 22, 2020 at 11:41:55AM +0100, Marc Espie wrote: > If tar can't create intermediate directories due to permission > issues, the resulting message is confusing: > > ./tar xf gcc.tar gcc-8.3.0/include/obstack.h > tar: Unable to create gcc-8.3.0/include/obstack.h: No such file or

ospf6d: bring ospf6d closer to ospfd

2020-03-21 Thread Denis Fondras
Biggest chunk is rework of rde_asext_get()/rde_asext_put(). Also change get_net_link() and get_rtr_link() to work like ospfd couterpart. Index: rde.c === RCS file: /cvs/src/usr.sbin/ospf6d/rde.c,v retrieving revision 1.84 diff -u -p

Re: Improve handling of IPv6 SLAAC renumbering scenarios

2020-03-15 Thread Denis Fondras
On Sat, Mar 14, 2020 at 12:54:20PM -0300, Fernando Gont wrote: > Folks, > > This improves IPv6 SLAAC handling of renumbering scenarios. At the time of > this writing, this doesn't follow the spec, but is the right thing. > > Essentially, PIOs will employ these default values: > Preferred

ospf6d: rework rde_lsdb.c

2020-02-15 Thread Denis Fondras
3 changes in rde_lsdb.c - lsa_find_lsid() has redondant parameters - call to lsa_self() can be simplified (== ospfd) - update debug messages to be more suitable Index: rde.c === RCS file: /cvs/src/usr.sbin/ospf6d/rde.c,v retrieving

ospf6d: rework rde_lsdb.c

2020-01-27 Thread Denis Fondras
3 changes in rde_lsdb.c - lsa_find_lsid() has redondant parameters - call to lsa_self() can be simplified (== ospfd) - update debug messages to be more suitable Index: rde.c === RCS file: /cvs/src/usr.sbin/ospf6d/rde.c,v retrieving

Re: ospf6d: simplify lsa_snap()

2020-01-21 Thread Denis Fondras
On Tue, Jan 21, 2020 at 09:35:06AM +0100, Remi Locherer wrote: > > @@ -235,6 +233,7 @@ lsa_check(struct rde_nbr *nbr, struct ls > > case LSA_TYPE_NETWORK: > > if ((len % sizeof(u_int32_t)) || > > len < sizeof(lsa->hdr) + sizeof(u_int32_t)) { > > +

Re: ospf(6)d: allow "type p2p" globally or per area

2020-01-21 Thread Denis Fondras
On Tue, Jan 21, 2020 at 09:41:28AM +0100, Remi Locherer wrote: > On Mon, Jan 20, 2020 at 05:08:26PM +0100, Denis Fondras wrote: > > On Sun, Jan 19, 2020 at 11:04:16PM +0100, Remi Locherer wrote: > > > This makes the interface setting "type p2p" configurable globally

Re: bgpctl show neighbor errors better

2020-01-21 Thread Denis Fondras
On Tue, Jan 21, 2020 at 09:31:36AM +0100, Claudio Jeker wrote: > So the 'Last error:' message for sessions that failed do often not include > the suberror and also it is only shown for NOTIFICATIONS we sent but not > for received notifications. The following diff fixes this. > > So instead of: >

Re: ospf(6)d: allow "type p2p" globally or per area

2020-01-20 Thread Denis Fondras
On Sun, Jan 19, 2020 at 11:04:16PM +0100, Remi Locherer wrote: > This makes the interface setting "type p2p" configurable globally or > per area. ospf(6)d allows this for almost all interface related settings. > > As a side-effect of this diff ospf(6)d -nv prints "type p2p" also for >

ospf6d: simplify lsa_snap()

2020-01-20 Thread Denis Fondras
No need to pass peerid to lsa_snap() While at it, remove unused variable. Index: rde.c === RCS file: /cvs/src/usr.sbin/ospf6d/rde.c,v retrieving revision 1.82 diff -u -p -r1.82 rde.c --- rde.c 2 Jan 2020 10:16:46 -

Re: bgpd and time stamps

2020-01-09 Thread Denis Fondras
On Tue, Dec 31, 2019 at 04:32:24PM +0100, Claudio Jeker wrote: > This changes bgpd to only use CLOCK_MONOTONIC via the getmonotime() > function. Additionally it changes the export of RIB entries to report the > last modified time relative to now. Other places also needed some fixup, > like the mrt

Re: ospf(6)d.conf: define interface parameters per area or globally

2020-01-08 Thread Denis Fondras
On Wed, Jan 08, 2020 at 09:14:48AM +0100, Remi Locherer wrote: > > I have a diff to allow parameters after interface or area definition. > > Not sure if we want to do that though. > > I would appreciate that! ;-) > The ospfd diff needs some more work. Crypt authentication handling is not

Re: ospf(6)d.conf: define interface parameters per area or globally

2020-01-04 Thread Denis Fondras
On Sat, Jan 04, 2020 at 11:11:36PM +0100, Remi Locherer wrote: > Hi, > > interface-specific parameters can be defined globally or per area. > But they are applied to the interfaces only if the interfaces are > declared afterwards. > I have a diff to allow parameters after interface or area

ospf6d: sync hello.c with ospfd

2020-01-02 Thread Denis Fondras
Sync with ospfd's hello.c Index: hello.c === RCS file: /cvs/src/usr.sbin/ospf6d/hello.c,v retrieving revision 1.21 diff -u -p -r1.21 hello.c --- hello.c 23 Dec 2019 11:25:41 - 1.21 +++ hello.c 2 Jan 2020 16:11:19

ospf6d: sync database.c with ospfd(8)

2020-01-02 Thread Denis Fondras
This is mostly log messages sync. Index: database.c === RCS file: /cvs/src/usr.sbin/ospf6d/database.c,v retrieving revision 1.18 diff -u -p -r1.18 database.c --- database.c 23 Dec 2019 07:33:49 - 1.18 +++ database.c 2 Jan

ospf6d: control.c cleanup

2019-12-31 Thread Denis Fondras
Nothing fancy here, just some cleaning work. Index: control.c === RCS file: /cvs/src/usr.sbin/ospf6d/control.c,v retrieving revision 1.27 diff -u -p -r1.27 control.c --- control.c 1 Sep 2018 19:21:10 - 1.27 +++ control.c

Re: bgpd, fairer imsg processing

2019-12-31 Thread Denis Fondras
On Mon, Dec 30, 2019 at 06:35:28PM +0100, Claudio Jeker wrote: > The imsg processing in the RDE is sometimes a bit unfair. The problem is > that peers sending many UPDATES starve out the others especially on > intial table dumps. This comes from the fact that imsg are processed to > completion and

ospf6d: remove useless orig_rtr_lsa()

2019-12-31 Thread Denis Fondras
Rename orig_rtr_lsa_area() to orig_rtr_lsa() Now that area is part of iface, original orig_rtr_lsa() is useless. Also verifying that area != NULL is not needed in some cases (these are leftovers of the previous diff). Index: interface.c

ospf6d: refactor link state ack/req

2019-12-24 Thread Denis Fondras
Refactor link state ack/req in ospf6d so it looks closer to ospfd. Index: lsack.c === RCS file: /cvs/src/usr.sbin/ospf6d/lsack.c,v retrieving revision 1.7 diff -u -p -r1.7 lsack.c --- lsack.c 11 Dec 2019 21:33:56 - 1.7

Re: ospf6d: type p2p

2019-12-24 Thread Denis Fondras
On Mon, Dec 23, 2019 at 11:09:42PM +0100, Remi Locherer wrote: > Hi, > > this brings support for interface "type p2p" to ospf6d (ospfd got it a few > weeks ago). > > The configuration looks like this: > > area 0.0.0.0 { > interface em0 { > type p2p > } > } > > OK? >

Re: ospf6d: add basic regress tests

2019-12-23 Thread Denis Fondras
On Mon, Dec 23, 2019 at 03:53:23PM +0100, Claudio Jeker wrote: > On Mon, Dec 23, 2019 at 03:24:31PM +0100, Remi Locherer wrote: > > On Sun, Dec 22, 2019 at 08:36:41PM +0100, Denis Fondras wrote: > > > Add basic regress test to ospf6d. > > > > Works for me. OK remi@ &

Re: ospf6d: warn when a neighbor changes its source address

2019-12-22 Thread Denis Fondras
On Sun, Dec 22, 2019 at 10:06:40PM +0100, Remi Locherer wrote: > this is similar to ospfd's hello.c rev 1.23. > > OK? > > Remi > > > Index: hello.c > === > RCS file: /cvs/src/usr.sbin/ospf6d/hello.c,v > retrieving revision 1.19 >

ospf6d: add basic regress tests

2019-12-22 Thread Denis Fondras
Add basic regress test to ospf6d. Index: ospf6d/Makefile === RCS file: ospf6d/Makefile diff -N ospf6d/Makefile --- /dev/null 1 Jan 1970 00:00:00 - +++ ospf6d/Makefile 22 Dec 2019 19:27:27 - @@ -0,0 +1,10 @@ +# $OpenBSD$

ospf6d: add reference to area in struct iface

2019-12-22 Thread Denis Fondras
area is now part of struct iface Code looks cleaner and more like ospfd. Index: area.c === RCS file: /cvs/src/usr.sbin/ospf6d/area.c,v retrieving revision 1.4 diff -u -p -r1.4 area.c --- area.c 28 Dec 2008 20:08:31 -

ospf6d: scale send buffer

2019-12-22 Thread Denis Fondras
Trivial diff to scale send buffer on socket. Index: interface.c === RCS file: /cvs/src/usr.sbin/ospf6d/interface.c,v retrieving revision 1.25 diff -u -p -r1.25 interface.c --- interface.c 28 Jun 2019 13:32:49 - 1.25 +++

  1   2   3   4   >