diff options
author | remi <remi@cvs.openbsd.org> | 2019-12-26 10:24:19 +0000 |
---|---|---|
committer | remi <remi@cvs.openbsd.org> | 2019-12-26 10:24:19 +0000 |
commit | 96ef905ed6dfa104a22e1bf8226778dbbc5be959 (patch) | |
tree | b539924ab9c0cd84765b82c1c5477ec9d55de080 /usr.sbin/ospf6d | |
parent | 5d3214a44aca57f078a7bf51d57bb9b0e7e5b854 (diff) |
Add point-to-point support for broadcast interfaces.
tested by Kapetanakis Giannis
ok denis@
Diffstat (limited to 'usr.sbin/ospf6d')
-rw-r--r-- | usr.sbin/ospf6d/ospf6d.conf.5 | 7 | ||||
-rw-r--r-- | usr.sbin/ospf6d/ospf6d.h | 3 | ||||
-rw-r--r-- | usr.sbin/ospf6d/parse.y | 9 | ||||
-rw-r--r-- | usr.sbin/ospf6d/printconf.c | 5 |
4 files changed, 18 insertions, 6 deletions
diff --git a/usr.sbin/ospf6d/ospf6d.conf.5 b/usr.sbin/ospf6d/ospf6d.conf.5 index 0a70d025c35..720bfbaa1fa 100644 --- a/usr.sbin/ospf6d/ospf6d.conf.5 +++ b/usr.sbin/ospf6d/ospf6d.conf.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ospf6d.conf.5,v 1.19 2019/05/26 09:27:09 remi Exp $ +.\" $OpenBSD: ospf6d.conf.5,v 1.20 2019/12/26 10:24:18 remi Exp $ .\" .\" Copyright (c) 2005 Esben Norby <norby@openbsd.org> .\" Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org> @@ -17,7 +17,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: May 26 2019 $ +.Dd $Mdocdate: December 26 2019 $ .Dt OSPF6D.CONF 5 .Os .Sh NAME @@ -328,6 +328,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/ospf6d.conf" -compact diff --git a/usr.sbin/ospf6d/ospf6d.h b/usr.sbin/ospf6d/ospf6d.h index f9263fa2f5c..3b115da52ad 100644 --- a/usr.sbin/ospf6d/ospf6d.h +++ b/usr.sbin/ospf6d/ospf6d.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ospf6d.h,v 1.42 2019/12/23 07:33:49 denis Exp $ */ +/* $OpenBSD: ospf6d.h,v 1.43 2019/12/26 10:24:18 remi Exp $ */ /* * Copyright (c) 2004, 2007 Esben Norby <norby@openbsd.org> @@ -329,6 +329,7 @@ struct iface { u_int8_t if_type; u_int8_t linkstate; u_int8_t priority; + u_int8_t p2p; u_int8_t cflags; #define F_IFACE_PASSIVE 0x01 #define F_IFACE_CONFIGURED 0x02 diff --git a/usr.sbin/ospf6d/parse.y b/usr.sbin/ospf6d/parse.y index 2ac7d9b64f6..bfb26d5f17b 100644 --- a/usr.sbin/ospf6d/parse.y +++ b/usr.sbin/ospf6d/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.47 2019/12/23 07:33:49 denis Exp $ */ +/* $OpenBSD: parse.y,v 1.48 2019/12/26 10:24:18 remi Exp $ */ /* * Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org> @@ -126,7 +126,7 @@ typedef struct { %token AREA INTERFACE ROUTERID FIBPRIORITY FIBUPDATE REDISTRIBUTE RTLABEL %token RDOMAIN STUB ROUTER SPFDELAY SPFHOLDTIME EXTTAG -%token METRIC PASSIVE +%token METRIC P2P PASSIVE %token HELLOINTERVAL TRANSMITDELAY %token RETRANSMITINTERVAL ROUTERDEADTIME ROUTERPRIORITY %token SET TYPE @@ -566,6 +566,10 @@ interfaceopts_l : interfaceopts_l interfaceoptsl nl ; interfaceoptsl : PASSIVE { iface->cflags |= F_IFACE_PASSIVE; } + | TYPE P2P { + iface->p2p = 1; + iface->type = IF_TYPE_POINTOPOINT; + } | DEMOTE STRING { if (strlcpy(iface->demote_group, $2, sizeof(iface->demote_group)) >= @@ -645,6 +649,7 @@ lookup(char *s) {"metric", METRIC}, {"no", NO}, {"on", ON}, + {"p2p", P2P}, {"passive", PASSIVE}, {"rdomain", RDOMAIN}, {"redistribute", REDISTRIBUTE}, diff --git a/usr.sbin/ospf6d/printconf.c b/usr.sbin/ospf6d/printconf.c index 5b7951bd1f9..fec50a56865 100644 --- a/usr.sbin/ospf6d/printconf.c +++ b/usr.sbin/ospf6d/printconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: printconf.c,v 1.8 2018/12/29 16:04:31 remi Exp $ */ +/* $OpenBSD: printconf.c,v 1.9 2019/12/26 10:24:18 remi Exp $ */ /* * Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org> @@ -135,6 +135,9 @@ print_iface(struct iface *iface) printf("\t\trouter-priority %d\n", iface->priority); printf("\t\ttransmit-delay %d\n", iface->transmit_delay); + if (iface->p2p) + printf("\t\ttype p2p\n"); + printf("\t}\n"); } |