bgpctl(8): Print MPLS label info in show rib detail output

2021-11-29 Thread Mitchell Krome
Hi, I noticed bgpctl didn't seem to have a way to show the MPLS label attached to MPLS L3VPN routes. The label was already there in the prefix info it just wasn't printed, so this diff adds printing the label info if the prefix has one in the show rib detail command. Example output below. I was

rtsock: Check prefixlength before deciding an existing L2 cached route is the same as a new route being added

2021-11-27 Thread Mitchell Krome
Hi, I ran into a problem where when using /31 netmasks on point to point links, I am unable to add a larger summary route that happens to have the same network address as the /31 link route the box has. It's a bit hard to explain so hopefully the art below helps. bsd1

bfd: respond to poll sequence from peer

2019-06-03 Thread Mitchell Krome
Hi, Testing bfd against frr on linux, their bfd implementation sends polls as soon as the session is up even if the session timers haven't changed from what it was advertising while it was in the down state. Currently openbsd bfd doesn't respond to polls, so this diff adds that support. tcpdump

bfd: Fixup state and flags bitmask

2019-06-02 Thread Mitchell Krome
I copied the defines from the sys/net bfd code to use in tcpdump and noticed that I wasn't seeing any poll bits from the remote side, even though tcpdump on the remote side showed it was sending them. Turns out the bitmask for state and flags is a bit off. Diff below fixes them to match what's in

BFD: fix reporting of up->down transition in routing message

2019-05-25 Thread Mitchell Krome
Hi, I was playing with BFD and noticed that the transition from up to down didnt seem to be reported correctly in the routing message. The uptime didn't seem to reset and both state and laststate show as down. RTM_BFD: bidirectional forwarding detection: len 136 BFD: async state down

tcp_trace print flag names instead of f's

2019-04-05 Thread Mitchell Krome
The macro for printing flags just prints a bunch of f's in an order you can't tell a whole lot from. This code looks like it hasn't been touched in 20 years so maybe an old compiler used to do something different? This makes it print the flag names. Before: 0x808b4cc0 ESTABLISHED:output

Re: ospfd: Apply netmask to stub prefixes before adding the route to the route table

2019-04-02 Thread Mitchell Krome
On 2/04/2019 3:30 pm, Remi Locherer wrote: > Hi Mitchell > > On Sat, Mar 30, 2019 at 04:10:09PM +1000, Mitchell Krome wrote: >> I kept finding I had a lingering /30 route when I turned off one of my >> test boxes. I tracked it down to ospfd sending RTM_ADD for a stub &g

ospfd: Apply netmask to stub prefixes before adding the route to the route table

2019-03-30 Thread Mitchell Krome
I kept finding I had a lingering /30 route when I turned off one of my test boxes. I tracked it down to ospfd sending RTM_ADD for a stub network with the non-masked prefix. The RTM_ADD path applies the mask inside the kernel, so the route got added as expected, but the RTM_DELETE enforces an exact

Re: ospfd: Warn when the router ID changes during config reload

2019-03-23 Thread Mitchell Krome
On 24/03/2019 7:23 am, Theo de Raadt wrote: > Sebastian Benoit wrote: > >> Mitchell Krome(mitchellkr...@gmail.com) on 2019.03.23 20:27:17 +1000: >>> Was messing around with ospf and got myself into a situation where the >>> router ID's were the same on two box