[quagga-dev 11077] Re: [quagga-dev, 8684] ospfd: Fix DST address in retransmission of LSU pkgs

Feng Lu lu.feng at 6wind.com
Fri Mar 7 02:59:39 GMT 2014


On 01/-9/-28163 03:59 AM, Joakim Tjernlund wrote:
>     if (listcount (oi->ls_ack_direct.ls_ack) == 0)
> -    oi->ls_ack_direct.dst = nbr->address.u.prefix4;
> -
> +    if (oi->type == OSPF_IFTYPE_POINTOPOINT)
> +      oi->ls_ack_direct.dst.s_addr = htonl (OSPF_ALLSPFROUTERS);
> +    else if (oi->type == OSPF_IFTYPE_VIRTUALLINK)
> +      oi->ls_ack_direct.dst = oi->vl_data->peer_addr;
> +    else
> +      oi->ls_ack_direct.dst = nbr->address.u.prefix4;
> +
Hi,

There seems a mess of "if...else...". I think it should be:

    if (listcount (oi->ls_ack_direct.ls_ack) == 0)
-    oi->ls_ack_direct.dst = nbr->address.u.prefix4;
-
+    {
+      if (oi->type == OSPF_IFTYPE_POINTOPOINT)
+        oi->ls_ack_direct.dst.s_addr = htonl (OSPF_ALLSPFROUTERS);
+      else if (oi->type == OSPF_IFTYPE_VIRTUALLINK)
+        oi->ls_ack_direct.dst = oi->vl_data->peer_addr;
+      else
+        oi->ls_ack_direct.dst = nbr->address.u.prefix4;
+    }
+

Best regards,
Feng Lu




More information about the Quagga-dev mailing list