On Fri, May 10, 2013 at 08:46:06AM +0100, Stuart Henderson wrote: > Has anyone tried this against other routers yet?
I spent some time with this. It does not properly work. One of the issues is that it tries to send some packets to 0.0.0.0 because the dst address is not initialized. There are troubles with reload and a comparing the tcpdumps with a cisco seems to indicate that we use the multicast address way more often then Cisco does. > In gmane.os.openbsd.misc, I wrote: > > On 2013-04-13, Hrvoje Popovski <hrv...@srce.hr> wrote: > >> On 13.4.2013. 17:29, Stuart Henderson wrote: > >>> ospfd doesn't support point-to-point on ethernet interfaces, you will > >>> need to remove this from cisco config for now. > >>> > >>> might not be too hard to add though.. (as in, I have a diff which builds, > >>> but I have no idea if it works ;-) > >>> > >> > >> could you post that diff, i'm willing to test it > >> > >> > > > > naive diff, and tested on a hack box only: if you run it in > > production and it eats your network, don't blame me. ;-) > > > > (for anyone wondering if this is useful: if you are sure you'll > > only have the 2 routers on a segment, it avoids waiting for $dead-time > > before bringing up adjacencies). > > > > > > > > Index: ospfd/interface.c > >=================================================================== > > RCS file: /cvs/src/usr.sbin/ospfd/interface.c,v > > retrieving revision 1.75 > > diff -u -p -r1.75 interface.c > > --- ospfd/interface.c 14 May 2012 10:17:21 -0000 1.75 > > +++ ospfd/interface.c 13 Apr 2013 20:18:55 -0000 > > @@ -348,6 +348,10 @@ if_act_start(struct iface *iface) > > iface->name); > > iface->passive = 1; > > } > > + if (iface->pointopoint) { > > + log_warnx("if_act_start: interface %s configured as > > point-to-point", iface->name); > > + iface->type = IF_TYPE_POINTOPOINT; > > + } > > > > gettimeofday(&now, NULL); > > iface->uptime = now.tv_sec; > > Index: ospfd/ospfd.c > >=================================================================== > > RCS file: /cvs/src/usr.sbin/ospfd/ospfd.c,v > > retrieving revision 1.79 > > diff -u -p -r1.79 ospfd.c > > --- ospfd/ospfd.c 22 Mar 2013 11:29:01 -0000 1.79 > > +++ ospfd/ospfd.c 13 Apr 2013 20:18:55 -0000 > > @@ -813,6 +813,7 @@ merge_interfaces(struct area *a, struct > > * - new interfaces (easy) > > * - deleted interfaces (needs to be done via fsm?) > > * - changing passive (painful?) > > + * - changing point-to-point (painful?) > > */ > > for (i = LIST_FIRST(&a->iface_list); i != NULL; i = ni) { > > ni = LIST_NEXT(i, entry); > > @@ -872,6 +873,15 @@ merge_interfaces(struct area *a, struct > > if (ospfd_process == PROC_OSPF_ENGINE) > > if_fsm(i, IF_EVT_DOWN); > > i->passive = xi->passive; > > + if (ospfd_process == PROC_OSPF_ENGINE) > > + if_fsm(i, IF_EVT_UP); > > + } > > + > > + if (i->pointopoint != xi->pointopoint) { > > + /* need to restart interface to cope with this change?? > > */ > > + if (ospfd_process == PROC_OSPF_ENGINE) > > + if_fsm(i, IF_EVT_DOWN); > > + i->pointopoint = xi->pointopoint; > > if (ospfd_process == PROC_OSPF_ENGINE) > > if_fsm(i, IF_EVT_UP); > > } > > Index: ospfd/ospfd.h > >=================================================================== > > RCS file: /cvs/src/usr.sbin/ospfd/ospfd.h,v > > retrieving revision 1.91 > > diff -u -p -r1.91 ospfd.h > > --- ospfd/ospfd.h 17 Jan 2013 10:07:56 -0000 1.91 > > +++ ospfd/ospfd.h 13 Apr 2013 20:18:55 -0000 > > @@ -350,6 +350,7 @@ struct iface { > > u_int8_t linkstate; > > u_int8_t priority; > > u_int8_t passive; > > + u_int8_t pointopoint; > > }; > > > > struct ifaddrdel { > > Index: ospfd/parse.y > >=================================================================== > > RCS file: /cvs/src/usr.sbin/ospfd/parse.y,v > > retrieving revision 1.74 > > diff -u -p -r1.74 parse.y > > --- ospfd/parse.y 6 Mar 2013 21:36:57 -0000 1.74 > > +++ ospfd/parse.y 13 Apr 2013 20:18:55 -0000 > > @@ -120,7 +120,7 @@ typedef struct { > > %token AREA INTERFACE ROUTERID FIBUPDATE REDISTRIBUTE RTLABEL RDOMAIN > > %token RFC1583COMPAT STUB ROUTER SPFDELAY SPFHOLDTIME EXTTAG > > %token AUTHKEY AUTHTYPE AUTHMD AUTHMDKEYID > > -%token METRIC PASSIVE > > +%token METRIC PASSIVE POINTOPOINT > > %token HELLOINTERVAL FASTHELLOINTERVAL TRANSMITDELAY > > %token RETRANSMITINTERVAL ROUTERDEADTIME ROUTERPRIORITY > > %token SET TYPE > > @@ -664,6 +664,7 @@ interfaceopts_l : interfaceopts_l interf > > ; > > > > interfaceoptsl : PASSIVE { iface->passive = 1; } > > + | POINTOPOINT { iface->pointopoint = 1; } > > | DEMOTE STRING { > > if (strlcpy(iface->demote_group, $2, > > sizeof(iface->demote_group)) >= > > @@ -734,6 +735,7 @@ lookup(char *s) > > {"msec", MSEC}, > > {"no", NO}, > > {"passive", PASSIVE}, > > + {"point-to-point", POINTOPOINT}, > > {"rdomain", RDOMAIN}, > > {"redistribute", REDISTRIBUTE}, > > {"retransmit-interval", RETRANSMITINTERVAL}, > > Index: ospfd/printconf.c > >=================================================================== > > RCS file: /cvs/src/usr.sbin/ospfd/printconf.c,v > > retrieving revision 1.16 > > diff -u -p -r1.16 printconf.c > > --- ospfd/printconf.c 6 Mar 2013 15:43:23 -0000 1.16 > > +++ ospfd/printconf.c 13 Apr 2013 20:18:55 -0000 > > @@ -119,6 +119,8 @@ print_iface(struct iface *iface) > > > > if (*iface->demote_group) > > printf("\t\tdemote %s\n", iface->demote_group); > > + if (iface->pointopoint) > > + printf("\t\tpoint-to-point\n"); > > if (iface->passive) > > printf("\t\tpassive\n"); > > else { > -- :wq Claudio