Re: ospfd: point-to-point on ethernet interfaces

2019-07-04 Thread Remi Locherer
On Thu, Jul 04, 2019 at 09:20:59AM +0300, Kapetanakis Giannis wrote:
> Hi,
> 
> This does not work for me with IOS.
> 
> neighbor is full,
> rib is ok
> fib does not list the routes to IOS and
> routing table is not updated on BSD
> 
> On IOS I do have the loopback route the BSD is announcing.

Thank you for testing!

Can you send me your ospfd.conf, the output from ospfd -dv and the output
from tcpdump showing the ospf traffic?

> On 24/06/2019 01:33, Remi Locherer wrote:
> > Diff below adds to ospfd point to point support for Ethernet interfaces.
> > I successfully tested this against Junos and FastIron.
> >
> > I first made the key word in the config "point-to-point". But then I
> > changed to "type p2p". The later would allow for "type nbma" or "type p2mp"
> > should we implement these types.
> >
> > On Junos it looks like this:
> >
> > area 0.0.0.0 {
> > interface ge-0/0/1.0 {
> > interface-type p2p;
> > }
> > }
> >
> > On FastIron it's similar to IOS:
> >
> > interface ethernet 1/2/1
> >  ip address 10.10.10.5 255.255.255.0
> >  ip ospf area 0
> >  ip ospf network point-to-point
> >
> > Comments, test reports and OKs are welcome.
> >
> > Remi
> >
> >
> > Index: interface.c
> > ===
> > RCS file: /cvs/src/usr.sbin/ospfd/interface.c,v
> > retrieving revision 1.82
> > diff -u -p -r1.82 interface.c
> > --- interface.c 11 Mar 2018 13:16:49 -  1.82
> > +++ interface.c 23 Jun 2019 11:27:57 -
> > @@ -190,6 +190,8 @@ if_new(struct kif *kif, struct kif_addr 
> > if (kif->flags & IFF_BROADCAST &&
> > kif->flags & IFF_MULTICAST)
> > iface->type = IF_TYPE_BROADCAST;
> > +   if (iface->p2p)
> > +   iface->type = IF_TYPE_POINTOPOINT;
> > if (kif->flags & IFF_LOOPBACK) {
> > iface->type = IF_TYPE_POINTOPOINT;
> > iface->passive = 1;
> > @@ -351,6 +353,9 @@ if_act_start(struct iface *iface)
> > orig_rtr_lsa(iface->area);
> > return (0);
> > }
> > +
> > +   if (iface->p2p)
> > +   iface->type = IF_TYPE_POINTOPOINT;
> >  
> > switch (iface->type) {
> > case IF_TYPE_POINTOPOINT:
> > Index: ospfd.c
> > ===
> > RCS file: /cvs/src/usr.sbin/ospfd/ospfd.c,v
> > retrieving revision 1.108
> > diff -u -p -r1.108 ospfd.c
> > --- ospfd.c 16 May 2019 05:49:22 -  1.108
> > +++ ospfd.c 23 Jun 2019 21:06:44 -
> > @@ -911,6 +911,22 @@ merge_interfaces(struct area *a, struct 
> > if_fsm(i, IF_EVT_UP);
> > }
> >  
> > +   if (i->p2p != xi->p2p) {
> > +   /* re-add interface to enable or disable DR election */
> > +   if (ospfd_process == PROC_OSPF_ENGINE)
> > +   if_fsm(i, IF_EVT_DOWN);
> > +   else if (ospfd_process == PROC_RDE_ENGINE)
> > +   rde_nbr_iface_del(i);
> > +   LIST_REMOVE(i, entry);
> > +   if_del(i);
> > +   LIST_REMOVE(xi, entry);
> > +   LIST_INSERT_HEAD(>iface_list, xi, entry);
> > +   xi->area = a;
> > +   if (ospfd_process == PROC_OSPF_ENGINE)
> > +   xi->state = IF_STA_NEW;
> > +   continue;
> > +   }
> > +
> > strlcpy(i->dependon, xi->dependon,
> > sizeof(i->dependon));
> > i->depend_ok = xi->depend_ok;
> > Index: ospfd.conf.5
> > ===
> > RCS file: /cvs/src/usr.sbin/ospfd/ospfd.conf.5,v
> > retrieving revision 1.57
> > diff -u -p -r1.57 ospfd.conf.5
> > --- ospfd.conf.510 Jun 2019 06:07:15 -  1.57
> > +++ ospfd.conf.523 Jun 2019 22:10:32 -
> > @@ -419,6 +419,9 @@ Router.
> >  .It Ic transmit-delay Ar seconds
> >  Set the transmit delay.
> >  The default value is 1; valid range is 1\-3600 seconds.
> > +.It Ic type p2p
> > +Set the interface type to point to point.
> > +This disables the election of a DR and BDR for the given interface.
> >  .El
> >  .Sh FILES
> >  .Bl -tag -width "/etc/ospfd.conf" -compact
> > Index: ospfd.h
> > ===
> > RCS file: /cvs/src/usr.sbin/ospfd/ospfd.h,v
> > retrieving revision 1.104
> > diff -u -p -r1.104 ospfd.h
> > --- ospfd.h 16 May 2019 05:49:22 -  1.104
> > +++ ospfd.h 23 Jun 2019 11:28:24 -
> > @@ -363,6 +363,7 @@ struct iface {
> > u_int8_t linkstate;
> > u_int8_t priority;
> > u_int8_t passive;
> > +   u_int8_t p2p;
> >  };
> >  
> >  struct ifaddrchange {
> > Index: parse.y
> > ===
> > RCS file: /cvs/src/usr.sbin/ospfd/parse.y,v
> > retrieving revision 1.98
> > diff -u -p -r1.98 parse.y

Re: ospfd: point-to-point on ethernet interfaces

2019-07-04 Thread Kapetanakis Giannis
Hi,

This does not work for me with IOS.

neighbor is full,
rib is ok
fib does not list the routes to IOS and
routing table is not updated on BSD

On IOS I do have the loopback route the BSD is announcing.

G

On 24/06/2019 01:33, Remi Locherer wrote:
> Diff below adds to ospfd point to point support for Ethernet interfaces.
> I successfully tested this against Junos and FastIron.
>
> I first made the key word in the config "point-to-point". But then I
> changed to "type p2p". The later would allow for "type nbma" or "type p2mp"
> should we implement these types.
>
> On Junos it looks like this:
>
> area 0.0.0.0 {
> interface ge-0/0/1.0 {
> interface-type p2p;
> }
> }
>
> On FastIron it's similar to IOS:
>
> interface ethernet 1/2/1
>  ip address 10.10.10.5 255.255.255.0
>  ip ospf area 0
>  ip ospf network point-to-point
>
> Comments, test reports and OKs are welcome.
>
> Remi
>
>
> Index: interface.c
> ===
> RCS file: /cvs/src/usr.sbin/ospfd/interface.c,v
> retrieving revision 1.82
> diff -u -p -r1.82 interface.c
> --- interface.c   11 Mar 2018 13:16:49 -  1.82
> +++ interface.c   23 Jun 2019 11:27:57 -
> @@ -190,6 +190,8 @@ if_new(struct kif *kif, struct kif_addr 
>   if (kif->flags & IFF_BROADCAST &&
>   kif->flags & IFF_MULTICAST)
>   iface->type = IF_TYPE_BROADCAST;
> + if (iface->p2p)
> + iface->type = IF_TYPE_POINTOPOINT;
>   if (kif->flags & IFF_LOOPBACK) {
>   iface->type = IF_TYPE_POINTOPOINT;
>   iface->passive = 1;
> @@ -351,6 +353,9 @@ if_act_start(struct iface *iface)
>   orig_rtr_lsa(iface->area);
>   return (0);
>   }
> +
> + if (iface->p2p)
> + iface->type = IF_TYPE_POINTOPOINT;
>  
>   switch (iface->type) {
>   case IF_TYPE_POINTOPOINT:
> Index: ospfd.c
> ===
> RCS file: /cvs/src/usr.sbin/ospfd/ospfd.c,v
> retrieving revision 1.108
> diff -u -p -r1.108 ospfd.c
> --- ospfd.c   16 May 2019 05:49:22 -  1.108
> +++ ospfd.c   23 Jun 2019 21:06:44 -
> @@ -911,6 +911,22 @@ merge_interfaces(struct area *a, struct 
>   if_fsm(i, IF_EVT_UP);
>   }
>  
> + if (i->p2p != xi->p2p) {
> + /* re-add interface to enable or disable DR election */
> + if (ospfd_process == PROC_OSPF_ENGINE)
> + if_fsm(i, IF_EVT_DOWN);
> + else if (ospfd_process == PROC_RDE_ENGINE)
> + rde_nbr_iface_del(i);
> + LIST_REMOVE(i, entry);
> + if_del(i);
> + LIST_REMOVE(xi, entry);
> + LIST_INSERT_HEAD(>iface_list, xi, entry);
> + xi->area = a;
> + if (ospfd_process == PROC_OSPF_ENGINE)
> + xi->state = IF_STA_NEW;
> + continue;
> + }
> +
>   strlcpy(i->dependon, xi->dependon,
>   sizeof(i->dependon));
>   i->depend_ok = xi->depend_ok;
> Index: ospfd.conf.5
> ===
> RCS file: /cvs/src/usr.sbin/ospfd/ospfd.conf.5,v
> retrieving revision 1.57
> diff -u -p -r1.57 ospfd.conf.5
> --- ospfd.conf.5  10 Jun 2019 06:07:15 -  1.57
> +++ ospfd.conf.5  23 Jun 2019 22:10:32 -
> @@ -419,6 +419,9 @@ Router.
>  .It Ic transmit-delay Ar seconds
>  Set the transmit delay.
>  The default value is 1; valid range is 1\-3600 seconds.
> +.It Ic type p2p
> +Set the interface type to point to point.
> +This disables the election of a DR and BDR for the given interface.
>  .El
>  .Sh FILES
>  .Bl -tag -width "/etc/ospfd.conf" -compact
> Index: ospfd.h
> ===
> RCS file: /cvs/src/usr.sbin/ospfd/ospfd.h,v
> retrieving revision 1.104
> diff -u -p -r1.104 ospfd.h
> --- ospfd.h   16 May 2019 05:49:22 -  1.104
> +++ ospfd.h   23 Jun 2019 11:28:24 -
> @@ -363,6 +363,7 @@ struct iface {
>   u_int8_t linkstate;
>   u_int8_t priority;
>   u_int8_t passive;
> + u_int8_t p2p;
>  };
>  
>  struct ifaddrchange {
> Index: parse.y
> ===
> RCS file: /cvs/src/usr.sbin/ospfd/parse.y,v
> retrieving revision 1.98
> diff -u -p -r1.98 parse.y
> --- parse.y   7 Jun 2019 04:57:45 -   1.98
> +++ parse.y   23 Jun 2019 22:04:22 -
> @@ -129,7 +129,7 @@ typedef struct {
>  %token   AREA INTERFACE ROUTERID FIBPRIORITY FIBUPDATE REDISTRIBUTE 
> RTLABEL
>  %token   RDOMAIN RFC1583COMPAT STUB ROUTER SPFDELAY SPFHOLDTIME EXTTAG
>  %token   AUTHKEY AUTHTYPE AUTHMD AUTHMDKEYID
> -%token   

Re: ospfd: point-to-point on ethernet interfaces

2019-07-03 Thread Gregory Edigarov

Works for me no problem. tested to IOS.

On 03.07.19 00:00, Remi Locherer wrote:

ping

On Mon, Jun 24, 2019 at 12:33:16AM +0200, Remi Locherer wrote:

Diff below adds to ospfd point to point support for Ethernet interfaces.
I successfully tested this against Junos and FastIron.

I first made the key word in the config "point-to-point". But then I
changed to "type p2p". The later would allow for "type nbma" or "type p2mp"
should we implement these types.

On Junos it looks like this:

area 0.0.0.0 {
 interface ge-0/0/1.0 {
 interface-type p2p;
 }
}

On FastIron it's similar to IOS:

interface ethernet 1/2/1
  ip address 10.10.10.5 255.255.255.0
  ip ospf area 0
  ip ospf network point-to-point

Comments, test reports and OKs are welcome.

Remi


Index: interface.c
===
RCS file: /cvs/src/usr.sbin/ospfd/interface.c,v
retrieving revision 1.82
diff -u -p -r1.82 interface.c
--- interface.c 11 Mar 2018 13:16:49 -  1.82
+++ interface.c 23 Jun 2019 11:27:57 -
@@ -190,6 +190,8 @@ if_new(struct kif *kif, struct kif_addr
if (kif->flags & IFF_BROADCAST &&
kif->flags & IFF_MULTICAST)
iface->type = IF_TYPE_BROADCAST;
+   if (iface->p2p)
+   iface->type = IF_TYPE_POINTOPOINT;
if (kif->flags & IFF_LOOPBACK) {
iface->type = IF_TYPE_POINTOPOINT;
iface->passive = 1;
@@ -351,6 +353,9 @@ if_act_start(struct iface *iface)
orig_rtr_lsa(iface->area);
return (0);
}
+
+   if (iface->p2p)
+   iface->type = IF_TYPE_POINTOPOINT;
  
  	switch (iface->type) {

case IF_TYPE_POINTOPOINT:
Index: ospfd.c
===
RCS file: /cvs/src/usr.sbin/ospfd/ospfd.c,v
retrieving revision 1.108
diff -u -p -r1.108 ospfd.c
--- ospfd.c 16 May 2019 05:49:22 -  1.108
+++ ospfd.c 23 Jun 2019 21:06:44 -
@@ -911,6 +911,22 @@ merge_interfaces(struct area *a, struct
if_fsm(i, IF_EVT_UP);
}
  
+		if (i->p2p != xi->p2p) {

+   /* re-add interface to enable or disable DR election */
+   if (ospfd_process == PROC_OSPF_ENGINE)
+   if_fsm(i, IF_EVT_DOWN);
+   else if (ospfd_process == PROC_RDE_ENGINE)
+   rde_nbr_iface_del(i);
+   LIST_REMOVE(i, entry);
+   if_del(i);
+   LIST_REMOVE(xi, entry);
+   LIST_INSERT_HEAD(>iface_list, xi, entry);
+   xi->area = a;
+   if (ospfd_process == PROC_OSPF_ENGINE)
+   xi->state = IF_STA_NEW;
+   continue;
+   }
+
strlcpy(i->dependon, xi->dependon,
sizeof(i->dependon));
i->depend_ok = xi->depend_ok;
Index: ospfd.conf.5
===
RCS file: /cvs/src/usr.sbin/ospfd/ospfd.conf.5,v
retrieving revision 1.57
diff -u -p -r1.57 ospfd.conf.5
--- ospfd.conf.510 Jun 2019 06:07:15 -  1.57
+++ ospfd.conf.523 Jun 2019 22:10:32 -
@@ -419,6 +419,9 @@ Router.
  .It Ic transmit-delay Ar seconds
  Set the transmit delay.
  The default value is 1; valid range is 1\-3600 seconds.
+.It Ic type p2p
+Set the interface type to point to point.
+This disables the election of a DR and BDR for the given interface.
  .El
  .Sh FILES
  .Bl -tag -width "/etc/ospfd.conf" -compact
Index: ospfd.h
===
RCS file: /cvs/src/usr.sbin/ospfd/ospfd.h,v
retrieving revision 1.104
diff -u -p -r1.104 ospfd.h
--- ospfd.h 16 May 2019 05:49:22 -  1.104
+++ ospfd.h 23 Jun 2019 11:28:24 -
@@ -363,6 +363,7 @@ struct iface {
u_int8_t linkstate;
u_int8_t priority;
u_int8_t passive;
+   u_int8_t p2p;
  };
  
  struct ifaddrchange {

Index: parse.y
===
RCS file: /cvs/src/usr.sbin/ospfd/parse.y,v
retrieving revision 1.98
diff -u -p -r1.98 parse.y
--- parse.y 7 Jun 2019 04:57:45 -   1.98
+++ parse.y 23 Jun 2019 22:04:22 -
@@ -129,7 +129,7 @@ typedef struct {
  %tokenAREA INTERFACE ROUTERID FIBPRIORITY FIBUPDATE REDISTRIBUTE 
RTLABEL
  %tokenRDOMAIN RFC1583COMPAT STUB ROUTER SPFDELAY SPFHOLDTIME EXTTAG
  %tokenAUTHKEY AUTHTYPE AUTHMD AUTHMDKEYID
-%token METRIC PASSIVE
+%token METRIC P2P PASSIVE
  %tokenHELLOINTERVAL FASTHELLOINTERVAL TRANSMITDELAY
  %tokenRETRANSMITINTERVAL ROUTERDEADTIME ROUTERPRIORITY
  %tokenSET TYPE
@@ -743,6 +743,7 @@ interfaceopts_l : interfaceopts_l interf
  

Re: ospfd: point-to-point on ethernet interfaces

2019-07-02 Thread Remi Locherer
ping

On Mon, Jun 24, 2019 at 12:33:16AM +0200, Remi Locherer wrote:
> Diff below adds to ospfd point to point support for Ethernet interfaces.
> I successfully tested this against Junos and FastIron.
> 
> I first made the key word in the config "point-to-point". But then I
> changed to "type p2p". The later would allow for "type nbma" or "type p2mp"
> should we implement these types.
> 
> On Junos it looks like this:
> 
> area 0.0.0.0 {
> interface ge-0/0/1.0 {
> interface-type p2p;
> }
> }
> 
> On FastIron it's similar to IOS:
> 
> interface ethernet 1/2/1
>  ip address 10.10.10.5 255.255.255.0
>  ip ospf area 0
>  ip ospf network point-to-point
> 
> Comments, test reports and OKs are welcome.
> 
> Remi
> 
> 
> Index: interface.c
> ===
> RCS file: /cvs/src/usr.sbin/ospfd/interface.c,v
> retrieving revision 1.82
> diff -u -p -r1.82 interface.c
> --- interface.c   11 Mar 2018 13:16:49 -  1.82
> +++ interface.c   23 Jun 2019 11:27:57 -
> @@ -190,6 +190,8 @@ if_new(struct kif *kif, struct kif_addr 
>   if (kif->flags & IFF_BROADCAST &&
>   kif->flags & IFF_MULTICAST)
>   iface->type = IF_TYPE_BROADCAST;
> + if (iface->p2p)
> + iface->type = IF_TYPE_POINTOPOINT;
>   if (kif->flags & IFF_LOOPBACK) {
>   iface->type = IF_TYPE_POINTOPOINT;
>   iface->passive = 1;
> @@ -351,6 +353,9 @@ if_act_start(struct iface *iface)
>   orig_rtr_lsa(iface->area);
>   return (0);
>   }
> +
> + if (iface->p2p)
> + iface->type = IF_TYPE_POINTOPOINT;
>  
>   switch (iface->type) {
>   case IF_TYPE_POINTOPOINT:
> Index: ospfd.c
> ===
> RCS file: /cvs/src/usr.sbin/ospfd/ospfd.c,v
> retrieving revision 1.108
> diff -u -p -r1.108 ospfd.c
> --- ospfd.c   16 May 2019 05:49:22 -  1.108
> +++ ospfd.c   23 Jun 2019 21:06:44 -
> @@ -911,6 +911,22 @@ merge_interfaces(struct area *a, struct 
>   if_fsm(i, IF_EVT_UP);
>   }
>  
> + if (i->p2p != xi->p2p) {
> + /* re-add interface to enable or disable DR election */
> + if (ospfd_process == PROC_OSPF_ENGINE)
> + if_fsm(i, IF_EVT_DOWN);
> + else if (ospfd_process == PROC_RDE_ENGINE)
> + rde_nbr_iface_del(i);
> + LIST_REMOVE(i, entry);
> + if_del(i);
> + LIST_REMOVE(xi, entry);
> + LIST_INSERT_HEAD(>iface_list, xi, entry);
> + xi->area = a;
> + if (ospfd_process == PROC_OSPF_ENGINE)
> + xi->state = IF_STA_NEW;
> + continue;
> + }
> +
>   strlcpy(i->dependon, xi->dependon,
>   sizeof(i->dependon));
>   i->depend_ok = xi->depend_ok;
> Index: ospfd.conf.5
> ===
> RCS file: /cvs/src/usr.sbin/ospfd/ospfd.conf.5,v
> retrieving revision 1.57
> diff -u -p -r1.57 ospfd.conf.5
> --- ospfd.conf.5  10 Jun 2019 06:07:15 -  1.57
> +++ ospfd.conf.5  23 Jun 2019 22:10:32 -
> @@ -419,6 +419,9 @@ Router.
>  .It Ic transmit-delay Ar seconds
>  Set the transmit delay.
>  The default value is 1; valid range is 1\-3600 seconds.
> +.It Ic type p2p
> +Set the interface type to point to point.
> +This disables the election of a DR and BDR for the given interface.
>  .El
>  .Sh FILES
>  .Bl -tag -width "/etc/ospfd.conf" -compact
> Index: ospfd.h
> ===
> RCS file: /cvs/src/usr.sbin/ospfd/ospfd.h,v
> retrieving revision 1.104
> diff -u -p -r1.104 ospfd.h
> --- ospfd.h   16 May 2019 05:49:22 -  1.104
> +++ ospfd.h   23 Jun 2019 11:28:24 -
> @@ -363,6 +363,7 @@ struct iface {
>   u_int8_t linkstate;
>   u_int8_t priority;
>   u_int8_t passive;
> + u_int8_t p2p;
>  };
>  
>  struct ifaddrchange {
> Index: parse.y
> ===
> RCS file: /cvs/src/usr.sbin/ospfd/parse.y,v
> retrieving revision 1.98
> diff -u -p -r1.98 parse.y
> --- parse.y   7 Jun 2019 04:57:45 -   1.98
> +++ parse.y   23 Jun 2019 22:04:22 -
> @@ -129,7 +129,7 @@ typedef struct {
>  %token   AREA INTERFACE ROUTERID FIBPRIORITY FIBUPDATE REDISTRIBUTE 
> RTLABEL
>  %token   RDOMAIN RFC1583COMPAT STUB ROUTER SPFDELAY SPFHOLDTIME EXTTAG
>  %token   AUTHKEY AUTHTYPE AUTHMD AUTHMDKEYID
> -%token   METRIC PASSIVE
> +%token   METRIC P2P PASSIVE
>  %token   HELLOINTERVAL FASTHELLOINTERVAL TRANSMITDELAY
>  %token   RETRANSMITINTERVAL ROUTERDEADTIME ROUTERPRIORITY
> 

ospfd: point-to-point on ethernet interfaces

2019-06-23 Thread Remi Locherer
Diff below adds to ospfd point to point support for Ethernet interfaces.
I successfully tested this against Junos and FastIron.

I first made the key word in the config "point-to-point". But then I
changed to "type p2p". The later would allow for "type nbma" or "type p2mp"
should we implement these types.

On Junos it looks like this:

area 0.0.0.0 {
interface ge-0/0/1.0 {
interface-type p2p;
}
}

On FastIron it's similar to IOS:

interface ethernet 1/2/1
 ip address 10.10.10.5 255.255.255.0
 ip ospf area 0
 ip ospf network point-to-point

Comments, test reports and OKs are welcome.

Remi


Index: interface.c
===
RCS file: /cvs/src/usr.sbin/ospfd/interface.c,v
retrieving revision 1.82
diff -u -p -r1.82 interface.c
--- interface.c 11 Mar 2018 13:16:49 -  1.82
+++ interface.c 23 Jun 2019 11:27:57 -
@@ -190,6 +190,8 @@ if_new(struct kif *kif, struct kif_addr 
if (kif->flags & IFF_BROADCAST &&
kif->flags & IFF_MULTICAST)
iface->type = IF_TYPE_BROADCAST;
+   if (iface->p2p)
+   iface->type = IF_TYPE_POINTOPOINT;
if (kif->flags & IFF_LOOPBACK) {
iface->type = IF_TYPE_POINTOPOINT;
iface->passive = 1;
@@ -351,6 +353,9 @@ if_act_start(struct iface *iface)
orig_rtr_lsa(iface->area);
return (0);
}
+
+   if (iface->p2p)
+   iface->type = IF_TYPE_POINTOPOINT;
 
switch (iface->type) {
case IF_TYPE_POINTOPOINT:
Index: ospfd.c
===
RCS file: /cvs/src/usr.sbin/ospfd/ospfd.c,v
retrieving revision 1.108
diff -u -p -r1.108 ospfd.c
--- ospfd.c 16 May 2019 05:49:22 -  1.108
+++ ospfd.c 23 Jun 2019 21:06:44 -
@@ -911,6 +911,22 @@ merge_interfaces(struct area *a, struct 
if_fsm(i, IF_EVT_UP);
}
 
+   if (i->p2p != xi->p2p) {
+   /* re-add interface to enable or disable DR election */
+   if (ospfd_process == PROC_OSPF_ENGINE)
+   if_fsm(i, IF_EVT_DOWN);
+   else if (ospfd_process == PROC_RDE_ENGINE)
+   rde_nbr_iface_del(i);
+   LIST_REMOVE(i, entry);
+   if_del(i);
+   LIST_REMOVE(xi, entry);
+   LIST_INSERT_HEAD(>iface_list, xi, entry);
+   xi->area = a;
+   if (ospfd_process == PROC_OSPF_ENGINE)
+   xi->state = IF_STA_NEW;
+   continue;
+   }
+
strlcpy(i->dependon, xi->dependon,
sizeof(i->dependon));
i->depend_ok = xi->depend_ok;
Index: ospfd.conf.5
===
RCS file: /cvs/src/usr.sbin/ospfd/ospfd.conf.5,v
retrieving revision 1.57
diff -u -p -r1.57 ospfd.conf.5
--- ospfd.conf.510 Jun 2019 06:07:15 -  1.57
+++ ospfd.conf.523 Jun 2019 22:10:32 -
@@ -419,6 +419,9 @@ Router.
 .It Ic transmit-delay Ar seconds
 Set the transmit delay.
 The default value is 1; valid range is 1\-3600 seconds.
+.It Ic type p2p
+Set the interface type to point to point.
+This disables the election of a DR and BDR for the given interface.
 .El
 .Sh FILES
 .Bl -tag -width "/etc/ospfd.conf" -compact
Index: ospfd.h
===
RCS file: /cvs/src/usr.sbin/ospfd/ospfd.h,v
retrieving revision 1.104
diff -u -p -r1.104 ospfd.h
--- ospfd.h 16 May 2019 05:49:22 -  1.104
+++ ospfd.h 23 Jun 2019 11:28:24 -
@@ -363,6 +363,7 @@ struct iface {
u_int8_t linkstate;
u_int8_t priority;
u_int8_t passive;
+   u_int8_t p2p;
 };
 
 struct ifaddrchange {
Index: parse.y
===
RCS file: /cvs/src/usr.sbin/ospfd/parse.y,v
retrieving revision 1.98
diff -u -p -r1.98 parse.y
--- parse.y 7 Jun 2019 04:57:45 -   1.98
+++ parse.y 23 Jun 2019 22:04:22 -
@@ -129,7 +129,7 @@ typedef struct {
 %token AREA INTERFACE ROUTERID FIBPRIORITY FIBUPDATE REDISTRIBUTE RTLABEL
 %token RDOMAIN RFC1583COMPAT STUB ROUTER SPFDELAY SPFHOLDTIME EXTTAG
 %token AUTHKEY AUTHTYPE AUTHMD AUTHMDKEYID
-%token METRIC PASSIVE
+%token METRIC P2P PASSIVE
 %token HELLOINTERVAL FASTHELLOINTERVAL TRANSMITDELAY
 %token RETRANSMITINTERVAL ROUTERDEADTIME ROUTERPRIORITY
 %token SET TYPE
@@ -743,6 +743,7 @@ interfaceopts_l : interfaceopts_l interf
;
 
 interfaceoptsl : PASSIVE   { iface->passive = 1; }
+   | TYPE P2P  { iface->p2p = 1; }
| DEMOTE STRING {