- if (IS_DEBUG_OSPF_NSSA)
- if (extlsa->e[0].fwd_addr.s_addr == 0)
- {
- zlog_info ("LSA[Type-7]: Could not build FWD-ADDR");
- ospf_lsa_discard(new2);
- return;
- }
- }
+ /* set P-bit if not ABR */
+ if (! OSPF_IS_ABR)
+ {
+ SET_FLAG(new2->data->options, OSPF_OPTION_NP);
+
+ /* set non-zero FWD ADDR
+
+ draft-ietf-ospf-nssa-update-09.txt
+
+ if the network between the NSSA AS boundary router and the
+ adjacent AS is advertised into OSPF as an internal OSPF route,
+ the forwarding address should be the next op address as is cu
+ currently done with type-5 LSAs. If the intervening network is
+ not adversited into OSPF as an internal OSPF route and the
+ type-7 LSA's P-bit is set a forwarding address should be
+ selected from one of the router's active OSPF inteface addresses
+ which belong to the NSSA. If no such addresses exist, then
+ no type-7 LSA's with the P-bit set should originate from this
+ router. */
+
+ /* not updating lsa anymore, just new2 */
+ extlsa = (struct as_external_lsa *)(new2->data);
+
+ if (extlsa->e[0].fwd_addr.s_addr == 0)
+ /* this NSSA area in ifp */
+ extlsa->e[0].fwd_addr = ospf_get_nssa_ip(area);
+
+ if (IS_DEBUG_OSPF_NSSA)
+ if (extlsa->e[0].fwd_addr.s_addr == 0)
+ {
+ zlog_info ("LSA[Type-7]: Could not build FWD-ADDR");
+ ospf_lsa_discard(new2);
+ return;
+ }
+ }