Revision 8df02847

View differences:

doc/bird.sgml
1940 1940
				nonbroadcast|nbma|pointomultipoint|ptmp];
1941 1941
			strict nonbroadcast <switch>;
1942 1942
			real broadcast <switch>;
1943
			ptp netmask <switch>;
1943 1944
			check link <switch>;
1944 1945
			ecmp weight <num>;
1945 1946
			authentication [none|simple|cryptographic];
......
2183 2184
	 probably is not interoperable with other OSPF
2184 2185
	 implementations. Default value is no.
2185 2186

  
2187
	<tag>ptp netmask <m/switch/</tag>
2188
	 In <cf/type ptp/ network configurations, OSPFv2
2189
	 implementations should ignore received netmask field in hello
2190
	 packets and should send hello packets with zero netmask field
2191
	 on unnumbered PtP links. But some OSPFv2 implementations
2192
	 perform netmask checking even for PtP links. This option
2193
	 specifies whether real netmask will be used in hello packets
2194
	 on <cf/type ptp/ interfaces. You should ignore this option
2195
	 unless you meet some compatibility problems related to this
2196
	 issue. Default value is no for unnumbered PtP links, yes
2197
	 otherwise.
2198

  
2186 2199
	<tag>check link <M>switch</M></tag>
2187 2200
	 If set, a hardware link state (reported by OS) is taken into
2188 2201
	 consideration. When a link disappears (e.g. an ethernet cable is
proto/ospf/config.Y
131 131
CF_KEYWORDS(ELIGIBLE, POLL, NETWORKS, HIDDEN, VIRTUAL, CHECK, LINK)
132 132
CF_KEYWORDS(RX, BUFFER, LARGE, NORMAL, STUBNET, HIDDEN, SUMMARY, TAG, EXTERNAL)
133 133
CF_KEYWORDS(WAIT, DELAY, LSADB, ECMP, LIMIT, WEIGHT, NSSA, TRANSLATOR, STABILITY)
134
CF_KEYWORDS(GLOBAL, LSID, ROUTER, SELF, INSTANCE, REAL)
134
CF_KEYWORDS(GLOBAL, LSID, ROUTER, SELF, INSTANCE, REAL, NETMASK)
135 135

  
136 136
%type <t> opttext
137 137
%type <ld> lsadb_args
......
290 290
 | TYPE POINTOMULTIPOINT { OSPF_PATT->type = OSPF_IT_PTMP ; }
291 291
 | TYPE PTMP { OSPF_PATT->type = OSPF_IT_PTMP ; }
292 292
 | REAL BROADCAST bool { OSPF_PATT->real_bcast = $3; if (OSPF_VERSION != 2) cf_error("Real broadcast option requires OSPFv2"); }
293
 | PTP NETMASK bool { OSPF_PATT->ptp_netmask = $3; if (OSPF_VERSION != 2) cf_error("Real netmask option requires OSPFv2"); }
293 294
 | TRANSMIT DELAY expr { OSPF_PATT->inftransdelay = $3 ; if (($3<=0) || ($3>65535)) cf_error("Transmit delay must be in range 1-65535"); }
294 295
 | PRIORITY expr { OSPF_PATT->priority = $2 ; if (($2<0) || ($2>255)) cf_error("Priority must be in range 0-255"); }
295 296
 | STRICT NONBROADCAST bool { OSPF_PATT->strictnbma = $3 ; }
......
364 365
  OSPF_PATT->type = OSPF_IT_UNDEF;
365 366
  init_list(&OSPF_PATT->nbma_list);
366 367
  OSPF_PATT->autype = OSPF_AUTH_NONE;
368
  OSPF_PATT->ptp_netmask = 2; /* not specified */
367 369
  reset_passwords();
368 370
 }
369 371
;
proto/ospf/hello.c
253 253
#ifdef OSPFv2
254 254
  pkt->netmask = ipa_mkmask(ifa->addr->pxlen);
255 255
  ipa_hton(pkt->netmask);
256
  if ((ifa->type == OSPF_IT_VLINK) || (ifa->type == OSPF_IT_PTP))
256
  if ((ifa->type == OSPF_IT_VLINK) ||
257
      ((ifa->type == OSPF_IT_PTP) && !ifa->ptp_netmask))
257 258
    pkt->netmask = IPA_NONE;
258 259
#endif
259 260

  
proto/ospf/iface.c
537 537
#ifdef OSPFv2
538 538
  ifa->autype = ip->autype;
539 539
  ifa->passwords = ip->passwords;
540
  ifa->ptp_netmask = !(addr->flags & IA_PEER);
541
  if (ip->ptp_netmask < 2)
542
    ifa->ptp_netmask = ip->ptp_netmask;
540 543
#endif
541 544

  
542 545
#ifdef OSPFv3
proto/ospf/ospf.h
273 273
  u16 rxbuf;			/* Buffer size */
274 274
  u8 check_link;		/* Whether iface link change is used */
275 275
  u8 ecmp_weight;		/* Weight used for ECMP */
276
  u8 ptp_netmask;		/* Send real netmask for P2P */
276 277
};
277 278

  
278 279
struct ospf_md5
......
810 811
  u8 check_link;
811 812
  u8 ecmp_weight;
812 813
  u8 real_bcast;		/* Not really used in OSPFv3 */
814
  u8 ptp_netmask;		/* bool but 2 for unspecified */
813 815

  
814 816
#ifdef OSPFv2
815 817
  list *passwords;

Also available in: Unified diff