Revision 023f5e86

View differences:

proto/ospf/lsack.c
17 17
  sock *sk=n->ifa->ip_sk;
18 18
  u16 len;
19 19

  
20
  DBG("Sending direct ACK to %I\n",n->rid);
21

  
20 22
  pk=(struct ospf_lsack_packet *)sk->tbuf;
21 23
  op=(struct ospf_packet *)sk->tbuf;
22 24

  
......
38 40
  no=mb_alloc(p->pool,sizeof(struct lsah_n));
39 41
  memcpy(&no->lsa,h,sizeof(struct ospf_lsa_header));
40 42
  add_tail(&n->ackl, NODE no);
41

  
43
  DBG("Adding delay ack for %I\n",n->rid);
42 44
}
43 45

  
44 46
void
......
59 61
  struct lsah_n *no;
60 62
  struct ospf_iface *ifa=n->ifa;
61 63

  
64
  DBG("Sending delay ack to %I\n", n->rid);
65

  
62 66
  if(ifa->type==OSPF_IT_BCAST)
63 67
  {
64 68
    sk=ifa->hello_sk;
......
79 83
    no=(struct lsah_n *)HEAD(n->ackl);
80 84
    memcpy(h+i,&no->lsa, sizeof(struct ospf_lsa_header));
81 85
    i++;
82
    rem_node(NODE n);
83
    if((i*sizeof(struct ospf_lsa_header)+sizeof(struct ospf_lsack_packet)-SIPH)>
86
    DBG("Iter %u ID: %I, RT: %I, Type: %u\n",i, ntohl((h+i)->id),
87
      ntohl((h+i)->rt),(h+i)->type);
88
    rem_node(NODE no);
89
    if((i*sizeof(struct ospf_lsa_header)+sizeof(struct ospf_lsack_packet)+SIPH)>
84 90
      n->ifa->iface->mtu)
85 91
    {
86 92
      if(!EMPTY_LIST(n->ackl))
......
88 94
        len=sizeof(struct ospf_lsack_packet)+i*sizeof(struct ospf_lsa_header);
89 95
	op->length=htons(len);
90 96
	ospf_pkt_finalize(n->ifa, op);
97
	DBG("Sending! Len=%u\n",len);
91 98
        if(ifa->type==OSPF_IT_BCAST)
92 99
	{
93 100
          if((ifa->state==OSPF_IS_DR)||(ifa->state==OSPF_IS_BACKUP))
......
103 110
	{
104 111
          sk_send_to_agt(sk, len, ifa, NEIGHBOR_EXCHANGE);
105 112
	}
106

  
107 113
	fill_ospf_pkt_hdr(n->ifa, pk, LSUPD);
108
	h=(struct ospf_lsa_header *)(pk+1);
109 114
	i=0;
110 115
      }
111 116
    }
......
114 119
  len=sizeof(struct ospf_lsack_packet)+i*sizeof(struct ospf_lsa_header);
115 120
  op->length=htons(len);
116 121
  ospf_pkt_finalize(n->ifa, op);
122
  DBG("Sending! Len=%u\n",len);
117 123
  if(ifa->type==OSPF_IT_BCAST)
118 124
  {
119 125
    if((ifa->state==OSPF_IS_DR)||(ifa->state==OSPF_IS_BACKUP))

Also available in: Unified diff