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 +++

ospf6d: rename & move function

2019-12-22 Thread Denis Fondras
Rename and move calc_nexthop_clear()/calc_nexthop_add() to vertex_nexthop_clear()/vertex_nexthop_add() It brings ospf6d closer to ospfd. Index: rde.h === RCS file: /cvs/src/usr.sbin/ospf6d/rde.h,v retrieving revision 1.22 diff -u

Re: ospf6d: rework priority handling

2019-12-16 Thread Denis Fondras
On Sun, Dec 15, 2019 at 04:07:11PM +0100, Sebastian Benoit wrote: > unrelated to this diff: I wonder if the manpage (of both ospfd and pspf6d) > should mention that changing fib-priority with a reload is equivalent toa > uncouple/couple? > If I understand correctly what you mean, I don't think

ospf6d: rework priority handling

2019-12-15 Thread Denis Fondras
Index: kroute.c === RCS file: /cvs/src/usr.sbin/ospf6d/kroute.c,v retrieving revision 1.61 diff -u -p -r1.61 kroute.c --- kroute.c12 Dec 2019 08:21:34 - 1.61 +++ kroute.c15 Dec 2019 08:42:10 - @@ -97,10 +97,11

ospf6d: makes area part of struct iface

2019-12-14 Thread Denis Fondras
As the subject says. By request of remi@ (https://marc.info/?l=openbsd-tech=157635822315646=2) Index: database.c === RCS file: /cvs/src/usr.sbin/ospf6d/database.c,v retrieving revision 1.17 diff -u -p -r1.17 database.c --- database.c

Re: ospf6d: rework redist_list and area

2019-12-14 Thread Denis Fondras
On Sat, Dec 14, 2019 at 10:15:36PM +0100, Remi Locherer wrote: > On Sat, Dec 14, 2019 at 12:05:57PM +0100, Denis Fondras wrote: > > Still working towards bringing ospf6d and ospfd closer. > > > > area is now part of struct iface. > > Makes sense to me. > > >

Re: bgpd rde refactor

2019-12-14 Thread Denis Fondras
On Fri, Dec 13, 2019 at 05:18:17PM +0100, Claudio Jeker wrote: > This diff changes the way session or peer related imsgs are handled. > Instead of passing the imsg.hdr.peerid down and doing the lookup for the > peer in each function move that code up into the imsg handler. > The plan is to add an

ospf6d: rework redist_list and area

2019-12-14 Thread Denis Fondras
Still working towards bringing ospf6d and ospfd closer. area is now part of struct iface. redist_list is part of struct area. Some changes, related to reloading, are not in use now but it feels like the right time to get it in. Denis Index: area.c

Re: vm.conf: owner: do not default to root

2019-12-12 Thread Denis Fondras
On Thu, Dec 12, 2019 at 12:52:34PM +0100, Klemens Nanni wrote: > On Thu, Dec 05, 2019 at 08:46:01PM +0100, Klemens Nanni wrote: > > vm.conf(5) states it must be `owner user[:group]' or `owner group', not > > specifying a value is undocumented and ought to be invalid syntax, yet > > `owner' is

Re: ospf6d: convert sendto() to sendmsg()

2019-12-11 Thread Denis Fondras
On Wed, Dec 11, 2019 at 07:06:26PM +0100, Claudio Jeker wrote: > While it makes sense to pass the ibuf like in ospfd I see no reason to > switch to sendmsg(). In ospfd this is done to prepend the IP header but > that seems not needed here. Is there another reason to switch to > sendmsg()? >

ospf6d: convert sendto() to sendmsg()

2019-12-11 Thread Denis Fondras
Use sendmsg() instead of sendto() like ospfd(8) does. Index: database.c === RCS file: /cvs/src/usr.sbin/ospf6d/database.c,v retrieving revision 1.16 diff -u -p -r1.16 database.c --- database.c 10 May 2019 13:50:34 - 1.16

Re: ospf6d: refactor kernel route message handling

2019-12-11 Thread Denis Fondras
On Tue, Dec 10, 2019 at 09:51:12PM +0100, Remi Locherer wrote: > Unfortunately redistribute does not work anymore. > Indeed, simple tests are too simple... Here is an updated diff. Index: kroute.c === RCS file:

ospf6d: refactor kernel route message handling

2019-12-09 Thread Denis Fondras
Give some love to ospf6d. The goal is to have ospf6d looks like ospfd, this could be useful to have changes made in one daemon from one go inside the other. I will do it step by step until I get to the point where "ospf6ctl reload" works. First step is to refactor kernel route message handling,

Re: first part of output splitting in bgpctl

2019-12-07 Thread Denis Fondras
On Fri, Dec 06, 2019 at 05:46:52PM +0100, Claudio Jeker wrote: > The output processing in bgpctl is not very extensible. And output flags > like ssv have to hacked into the output in a bad way. > > This is the first bit of a much bigger shuffling action to make the output > handling more

ospfd: correct function name in error message

2019-11-09 Thread Denis Fondras
Fix function name in error message. Index: kroute.c === RCS file: /cvs/src/usr.sbin/ospfd/kroute.c,v retrieving revision 1.112 diff -u -p -r1.112 kroute.c --- kroute.c28 Dec 2018 19:25:10 - 1.112 +++ kroute.c9 Nov

ospfd: more explicit error message

2019-11-01 Thread Denis Fondras
Newer version after a comment by claudio@. Currently ospfd logs routing message type code instead of name. Make it more explicit. remi@ is OK but wonders if rtm_type_name() will be updated as needed. What do you think ? Denis Index: kroute.c

ospfd: more explicit error message

2019-11-01 Thread Denis Fondras
Currently ospfd logs routing message type code instead of name. Make it more explicit. remi@ is OK but wonders if rtm_type_name() will be updated as needed (that's why I also log the typecode) What do you think ? Denis Index: kroute.c

sysctl.2 update

2019-08-11 Thread Denis Fondras
document ip.arpq and remove ip, ip6 and mpls ifq. Index: sysctl.2 === RCS file: /cvs/src/lib/libc/sys/sysctl.2,v retrieving revision 1.27 diff -u -p -r1.27 sysctl.2 --- sysctl.29 May 2019 15:05:47 - 1.27 +++ sysctl.2

sysupgrade: select sets to install

2019-07-09 Thread Denis Fondras
Hello, Here is a diff to allow selection of packages to install. My routers do not need X or games to be installed. $ doas sysupgrade -s -CGMX SHA256.sig 100% |***| 2141 00:00 Signature Verified INSTALL.amd64

tcpdump.c : move snaplen test

2019-06-09 Thread Denis Fondras
Hi, In tcpdump.c, at line 471 : i = pcap_snapshot(pd); if (snaplen < i) { warning("snaplen raised from %d to %d", snaplen, i); snaplen = i; } is only useful when reading a pcap file. In other cases, pd->snapshot = snaplen (set in

Re: bgpd set nexthop 198.51.100.42 clarifications

2019-05-27 Thread Denis Fondras
On Mon, May 13, 2019 at 09:03:41PM +0200, Claudio Jeker wrote: > When using a rule forcing the nexthop to a specific address bgpd > currently does not mark that nexthop as no-modify. In other words > the default rules for nexthop propagation applies. This means that > for ebgp it only sends out

Re: bgpd <3 RB trees also for peers

2019-05-25 Thread Denis Fondras
On Sat, May 25, 2019 at 07:37:07PM +0200, Claudio Jeker wrote: > getpeerbyid() is currently walking the peer list to find the right one. > This is rather inefficent once you have more then a handful of peers. > Switch it to a RB tree and save a lot of time: > OK denis@ > Before: > %

Re: ospf6d: allow specifying area by number as well as id

2019-05-24 Thread Denis Fondras
On Thu, May 23, 2019 at 10:58:51PM +0200, Remi Locherer wrote: > Hi tech@, > > David sent a diff for ospfd which allows specifying an area by number > as well as id. > --> https://marc.info/?l=openbsd-tech=155650284619263=2 > > This diff does the same for ospf6d and ospf6ctl without modifying

Re: ospfd: allow specifying area by number as well as id

2019-05-16 Thread Denis Fondras
On Wed, May 15, 2019 at 11:15:03PM +0200, Remi Locherer wrote: > Any opinions or comments on this? I think this would be a valuable addition > to ospfd. > I can't see any harm in it. OK denis@ > > > > Below diff changes ospfctl to accept the address and number format for > > "ospfct show

ospfd: do not change router-id on reload if unspecified

2019-05-15 Thread Denis Fondras
When router-id is unspecified, ospfd will choose the lowest IP address of the host. I added an area and an IP lower than the existing ones and on reload ospfd asked me to restart and did not activate the new area. Why would it update the router-id in such a case ? This diff changes this

ripd: typo

2019-05-12 Thread Denis Fondras
additional "s" laying around. Index: printconf.c === RCS file: /cvs/src/usr.sbin/ripd/printconf.c,v retrieving revision 1.7 diff -u -p -r1.7 printconf.c --- printconf.c 31 Dec 2018 20:34:16 - 1.7 +++ printconf.c 12 May 2019

Re: route(8): -n means numeric for default too

2019-05-11 Thread Denis Fondras
On Sat, May 11, 2019 at 01:15:16PM -0400, Alexander Bluhm wrote: > What is wrong with "default"? Why is "0.0.0.0/0" and "::/0" better? > Nothing wrong per-se. I was comparing the output of "bgpctl sh fib" and "route show" when I noticed this.

route(8): -n means numeric for default too

2019-05-11 Thread Denis Fondras
When using "route -n", also print numeric value for default route. Before : [denis@jig-ai] route -n show -inet6 Routing tables Internet6: DestinationGatewayFlags Refs Use Mtu Prio Iface default2a00:6060:1::1

Re: tmux: cannot select pane after prefix-b q

2019-05-07 Thread Denis Fondras
On Tue, May 07, 2019 at 11:55:51AM +0100, Nicholas Marriott wrote: > Hi > > You have the right idea general idea of the problem. display-panes > blocks the queue until it is finished, so the key press isn't processed > until then, which is too late. > > But your change defeats the purpose, the

tmux: cannot select pane after prefix-b q

2019-05-06 Thread Denis Fondras
As discovered and reported by solene@, since a few day selecting a pane after C-b q (display pane index) does not work. >From what I understand, the number entered is sent after the select-pane command, too late... Here is a diff : Index: cmd-queue.c

ifconfig: add carriage return when printing transceiver

2019-04-26 Thread Denis Fondras
When transceiver is unknown (among others), a carriage return is missing. Before : [root@er6p:~] ifconfig cnmac0 sff cnmac0: flags=8802 mtu 1500 lladdr 18:e8:29:b6:d4:a9 index 1 priority 0 llprio 3 media: Ethernet autoselect (none)

man4/openprom.4 missing for armv7

2019-04-24 Thread Denis Fondras
Noticed by visa@ Index: Makefile === RCS file: /cvs/src/share/man/man4/man4.armv7/Makefile,v retrieving revision 1.24 diff -u -p -r1.24 Makefile --- Makefile1 Feb 2019 01:41:52 - 1.24 +++ Makefile24 Apr 2019

openprom man missing for arm64

2019-04-23 Thread Denis Fondras
Noticed by visa@ Index: man4.arm64/Makefile === RCS file: /cvs/src/share/man/man4/man4.arm64/Makefile,v retrieving revision 1.6 diff -u -p -r1.6 Makefile --- man4.arm64/Makefile 2 Apr 2019 19:41:53 - 1.6 +++

man4/openprom.4 is missing on Octeon

2019-04-22 Thread Denis Fondras
Here is the lost manpage. Index: Makefile === RCS file: /cvs/src/share/man/man4/man4.octeon/Makefile,v retrieving revision 1.13 diff -u -p -r1.13 Makefile --- Makefile12 Jan 2019 17:07:16 - 1.13 +++ Makefile22 Apr

Re: bgpd: unbreak route origin validation

2019-03-31 Thread Denis Fondras
On Sun, Mar 31, 2019 at 06:03:01PM +0200, Claudio Jeker wrote: > On Fri, Mar 22, 2019 at 09:25:32PM +0100, Denis Fondras wrote: > > (better when the right diff is sent...) > > > > ROV has been broken since the configuration reload changes.

Re: MPLSv6 2/2 : bgpd diff

2019-03-25 Thread Denis Fondras
On Sun, Mar 24, 2019 at 10:03:15PM +1300, Richard Procter wrote: > The ldpd issue might merit a hint in the man page as I found it difficult to > diagnose > as a newbie (see attached patch), and the man page, while not wrong, threw me > by > stating that GTSM is mandatory for LDPv6; it is now

Re: pfctl should allow administrator to flush _anchors

2019-03-24 Thread Denis Fondras
On Sun, Mar 24, 2019 at 09:24:34AM +0100, Alexandr Nedvedicky wrote: > I think all the above calls for a new standalone option, which I named as > 'Unconfigure'. Patch below suggest unconfigure behavior for PF. > Doing 'pfctl -U' will bring PF back to its initial state (e.g. right before >

bgpd: unbreak route origin validation

2019-03-22 Thread Denis Fondras
(better when the right diff is sent...) ROV has been broken since the configuration reload changes. Index: rde.c === RCS file: /cvs/src/usr.sbin/bgpd/rde.c,v retrieving revision 1.466 diff -u -p -r1.466 rde.c --- rde.c 13 Mar

bgpd: unbreak route origin validation

2019-03-22 Thread Denis Fondras
ROV has been broken since the configuration reload changes. Index: rde.c === RCS file: /cvs/src/usr.sbin/bgpd/rde.c,v retrieving revision 1.466 diff -u -p -r1.466 rde.c --- rde.c 13 Mar 2019 14:35:39 - 1.466 +++ rde.c

npppd(8): remove dead code

2019-03-13 Thread Denis Fondras
There is some code that dates back to 2010 and cannot compile if -DUSE_NPPPD_ARP. So I guess we can safely remove. Denis Index: npppd/npppd.c === RCS file: /cvs/src/usr.sbin/npppd/npppd/npppd.c,v retrieving revision 1.49 diff -u

Pass IPv6 through pppx(4)

2019-03-04 Thread Denis Fondras
Simple diff to allow IPv6 through pppx(4). Denis Index: net/if_pppx.c === RCS file: /cvs/src/sys/net/if_pppx.c,v retrieving revision 1.66 diff -u -p -r1.66 if_pppx.c --- net/if_pppx.c 11 Jul 2018 21:18:23 - 1.66 +++

npppd-users.5 typo fix

2019-02-20 Thread Denis Fondras
Documentation better be accurate when syntax is not checked :) Index: npppd/npppd-users.5 === RCS file: /cvs/src/usr.sbin/npppd/npppd/npppd-users.5,v retrieving revision 1.7 diff -u -p -r1.7 npppd-users.5 --- npppd/npppd-users.5 13

Re: bgpd L3VPN rework

2019-02-11 Thread Denis Fondras
On Thu, Feb 07, 2019 at 11:41:39AM +0100, Claudio Jeker wrote: > At a2k19 David (dlg@) and I sat down and looked at BGP L3 MPLS VPN > support. Now David wants to use this in production and realized that > in his case it would be great to have more than one mpe(4) interface per > rdomain. This way

Re: ospf6d: fib-priority

2018-12-29 Thread Denis Fondras
On Fri, Dec 28, 2018 at 09:50:50PM +0100, Remi Locherer wrote: > Hi tech, > > this allows to adjust the priority of the routes that ospf6d inserts > into the kernel routing table. > > It's basically the same change that I commited to ospfd today (without > reload support). > Is there any

Re: CVS: cvs.openbsd.org: src

2018-12-29 Thread Denis Fondras
On Fri, Dec 28, 2018 at 03:05:15PM -0700, Denis Fondras wrote: > CVSROOT: /cvs > Module name: src > Changes by: de...@cvs.openbsd.org 2018/12/28 15:05:15 > > Modified files: > usr.sbin/bgpd : kroute.c > > Log message: > move kroute_find() call

Re: MPLSv6 2/2 : bgpd diff

2018-12-28 Thread Denis Fondras
On Fri, Dec 28, 2018 at 06:08:16PM +0100, Klemens Nanni wrote: > On Fri, Dec 28, 2018 at 05:21:02PM +0100, Denis Fondras wrote: > > int > > +krVPN6_change(struct ktable *kt, struct kroute_full *kl, u_int8_t fib_prio) > > +{ > > + struct kroute6_node *k

Re: MPLSv6 2/2 : bgpd diff

2018-12-28 Thread Denis Fondras
On Fri, Dec 28, 2018 at 03:15:35PM +0100, Claudio Jeker wrote: > > /* > > * This function will have undefined behaviour if the passed in prefixlen > > is > > - * to large for the respective bgpd_addr address family. > > + * too large for the respective bgpd_addr address family. > > */ > >

bgpd: remove intermediate value in MP capabilities

2018-12-28 Thread Denis Fondras
The parser sets curpeer->conf.capabilities.mp to -1 before setting it to either 1 or 0 by default. Set it to 0 by default and change it to 1 when needed. Index: parse.y === RCS file: /cvs/src/usr.sbin/bgpd/parse.y,v retrieving

tcpdump: print SAFI name

2018-12-28 Thread Denis Fondras
Print well-known SAFI name instead of value. * Before: BGP (OPEN: Version 4, AS #65530, Holdtime 90, ID 10.2.2.2, Option length 44 ((CAP MULTI_PROTOCOL [IPv4 Unicast], CAP MULTI_PROTOCOL [IPv4 #128], CAP MULTI_PROTOCOL [IPv6 #128], CAP ROUTE_REFRESH, CAP GRACEFUL_RESTART [R], Time 90s (IPv4

Re: MPLSv6 1/2: kernel diff

2018-12-27 Thread Denis Fondras
On Thu, Dec 27, 2018 at 03:23:07PM -0200, Martin Pieuchot wrote: > On 26/12/18(Wed) 17:13, Denis Fondras wrote: > > Interface needs IFF_MULTICAST when enabling IPv6 as per in6_ifattach(). > > When an address is configured, the interface joins multicast groups with > > in6_j

Re: iSerialNumber -> serial

2018-12-27 Thread Denis Fondras
On Thu, Dec 27, 2018 at 02:36:36PM -0200, Martin Pieuchot wrote: > On 25/12/18(Tue) 20:32, Martin Pieuchot wrote: > > Simple change to have verbose USB device fit into 80 chars in usbdevs(8): > > New version using 'iSerial'. This is coherent w/ what lsusb(8) displays > and isn't ambiguous with

mpls_do_error() refactoring

2018-12-27 Thread Denis Fondras
The previous diff was a failure. This one works and makes icmp_reflect() closer to icmp6_reflect(). Index: netinet/ip_icmp.c === RCS file: /cvs/src/sys/netinet/ip_icmp.c,v retrieving revision 1.181 diff -u -p -r1.181 ip_icmp.c ---

Re: MPLSv6 1/2: kernel diff

2018-12-26 Thread Denis Fondras
Please ignore, this one is broken... On Wed, Dec 26, 2018 at 09:27:59PM +0100, Denis Fondras wrote: > Resend because of nasty typo :/ > > On Mon, Dec 24, 2018 at 08:43:10PM -0200, Martin Pieuchot wrote: > > I'm not happy with adding the IFF_MULTICAST flag and SIOC{ADD,DEL}M

Re: MPLSv6 1/2: kernel diff

2018-12-26 Thread Denis Fondras
Resend because of nasty typo :/ On Mon, Dec 24, 2018 at 08:43:10PM -0200, Martin Pieuchot wrote: > I'm not happy with adding the IFF_MULTICAST flag and SIOC{ADD,DEL}MULTI > ioctls. It seems to be a common pattern between in existing pseudo-driver, > so this shouldn't block you. However I'd

Re: MPLSv6 1/2: kernel diff

2018-12-26 Thread Denis Fondras
On Mon, Dec 24, 2018 at 08:43:10PM -0200, Martin Pieuchot wrote: > I'm not happy with adding the IFF_MULTICAST flag and SIOC{ADD,DEL}MULTI > ioctls. It seems to be a common pattern between in existing pseudo-driver, > so this shouldn't block you. However I'd greatly appreciate if you > could

Re: MPLS: mpls_do_error() cleanup

2018-12-25 Thread Denis Fondras
On Tue, Dec 25, 2018 at 06:47:27PM -0200, Martin Pieuchot wrote: > > Index: netinet/ip_icmp.c > > === > > RCS file: /cvs/src/sys/netinet/ip_icmp.c,v > > retrieving revision 1.181 > > diff -u -p -r1.181 ip_icmp.c > > ---

MPLS: mpls_do_error() cleanup

2018-12-25 Thread Denis Fondras
On Mon, Dec 24, 2018 at 08:43:10PM -0200, Martin Pieuchot wrote: > It would be great if you could think the IPv4 version as well to take > a 'struct sockaddr' argument instead of a `struct in_ifaddr'. > Here is a diff to convert "struct in_ifaddr" to "struct sockaddr" Index: netinet/ip_icmp.c

Re: MPLSv6 1/2: kernel diff

2018-12-25 Thread Denis Fondras
On Tue, Dec 25, 2018 at 04:50:17PM -0200, Martin Pieuchot wrote: > On 25/12/18(Tue) 10:25, Denis Fondras wrote: > > On Mon, Dec 24, 2018 at 08:43:10PM -0200, Martin Pieuchot wrote: > > > On 24/12/18(Mon) 17:31, Denis Fondras wrote: > > >

Re: MPLSv6 1/2: kernel diff

2018-12-25 Thread Denis Fondras
On Mon, Dec 24, 2018 at 08:43:10PM -0200, Martin Pieuchot wrote: > On 24/12/18(Mon) 17:31, Denis Fondras wrote: > > Index: net/if_ethersubr.c > > === > > RCS file: /cvs/src/sys/net/if_ethersubr.c,v > >

Re: MPLSv6 1/2: kernel diff

2018-12-24 Thread Denis Fondras
Thank you for the comments Martin. Here is an improved diff. On Sun, Dec 23, 2018 at 02:22:45PM -0200, Martin Pieuchot wrote: > Comments below > > > Index: net/if_ethersubr.c > > === > > RCS file: /cvs/src/sys/net/if_ethersubr.c,v

Re: MPLS pseudowire over IPv6 1/2: ifconfig(8) diff

2018-12-23 Thread Denis Fondras
On Sun, Dec 23, 2018 at 10:05:01AM +, Jason McIntyre wrote: > unless you're trying somehow to emphasise that both types of address are > supported, you could simplify the text to just: > > The > .Ar dest-address > is used to find ... > Thank you for your input. Index:

Re: MPLS pseudowire over IPv6 1/2: ifconfig(8) diff

2018-12-23 Thread Denis Fondras
On Sat, Dec 22, 2018 at 11:42:36PM +0100, Klemens Nanni wrote: > I have no clue about MPLS, so this feedback is code-wise only: > > Did you consider using more AF agnostic code for parsing the IP address? > You are right, it is simpler. Thank you for the clue :) Updated diff : Index:

MPLS pseudowire over IPv6 1/2: ifconfig(8) diff

2018-12-22 Thread Denis Fondras
Allow the mpw(4) interface to establish VPLS tunnel over an IPv6-only MPLS core. This is the ifconfig(8) bit providing display and configuration of IPv6 neighbor on mpw(4) interface. pe1# ifconfig mpw0 mpw0: flags=51 mtu 1500 index 7 priority 0 llprio 3 encapsulation-type

MPLS pseudowire over IPv6 2/2: mpw(4) diff

2018-12-22 Thread Denis Fondras
Allow the mpw(4) interface to establish VPLS tunnel over an IPv6-only MPLS core. This is the mpw(4) bit. It requires the kernel diff from https://marc.info/?l=openbsd-tech=154513171617201=2 to avoid panic. --- pe1# cat /etc/ldpd.conf

MPLSv6 2/2 : bgpd diff

2018-12-18 Thread Denis Fondras
Here is a serie of diffs to enable MPLSv6, MPLS transport over IPv6. Second diff : add support for IPv6 MPLS routes exchange with bgpd(8). (***) pe1# cat /etc/hostname.mpe0 rdomain 2 mplslabel 42 inet6

MPLSv6 1/2: kernel diff

2018-12-18 Thread Denis Fondras
Here is a serie of diffs to enable MPLSv6, MPLS transport over IPv6. First diff : allow mpe(4) to handle IPv6 trafic. Index: net/if_ethersubr.c === RCS file: /cvs/src/sys/net/if_ethersubr.c,v retrieving revision 1.255 diff -u -p

Re: bgpd refactor aspath_match a bit

2018-12-10 Thread Denis Fondras
On Thu, Dec 06, 2018 at 12:21:19PM +0100, Claudio Jeker wrote: > On Wed, Nov 28, 2018 at 10:35:37AM +0100, Claudio Jeker wrote: > > On Tue, Nov 27, 2018 at 06:55:51PM +0100, Job Snijders wrote: > > > On Tue, Nov 27, 2018 at 06:23:53PM +0100, Claudio Jeker wrote: > > > > On Tue, Nov 27, 2018 at

libpcap: add basic MPLS support

2018-12-08 Thread Denis Fondras
Add basic MPLS support in libpcap. Index: gencode.c === RCS file: /cvs/src/lib/libpcap/gencode.c,v retrieving revision 1.51 diff -u -p -r1.51 gencode.c --- gencode.c 10 Nov 2018 10:17:37 - 1.51 +++ gencode.c 14 Nov 2018

Re: traceroute6 and ospf6d (icmp6 source addresses and link-locals)

2018-12-05 Thread Denis Fondras
On Wed, Dec 05, 2018 at 11:36:14AM +0100, Arnaud BRAND wrote: > Any feedback on this patch ? > I'm running it without problems since the 30th November. > > > Index: netinet6/icmp6.c > === > RCS file: /cvs/src/sys/netinet6/icmp6.c,v

Re: bgpd, network add broken with rdomains ?

2018-12-03 Thread Denis Fondras
On Mon, Dec 03, 2018 at 05:59:26PM +0100, Julien Dhaille wrote: > Hi. I am using bgpd within a rdomain (1). > After the upgrade to 6.4 stable, I can’t announce prefixes anymore via > bgpctl : > > router# ps aux -o rtable|grep bgp > > root  4039  0.0  0.1   300  1292 p0  S+p    5:12PM   

<    1   2   3   4   >