Revision 9f1500f5 proto/ospf/dbdes.c

View differences:

proto/ospf/dbdes.c
96 96
    pkt = ospf_tx_buffer(ifa);
97 97
    op = &pkt->ospf_packet;
98 98
    ospf_pkt_fill_hdr(ifa, pkt, DBDES_P);
99
    pkt->iface_mtu = htons(ifa->iface->mtu);
99
    pkt->iface_mtu = (ifa->type == OSPF_IT_VLINK) ? 0 : htons(ifa->iface->mtu);
100 100
    pkt->options = hton_opt(oa->options);
101 101
    pkt->imms = n->myimms;
102 102
    pkt->ddseq = htonl(n->dds);
......
119 119
      op = (struct ospf_packet *) pkt;
120 120

  
121 121
      ospf_pkt_fill_hdr(ifa, pkt, DBDES_P);
122
      pkt->iface_mtu = htons(ifa->iface->mtu);
122
      pkt->iface_mtu = (ifa->type == OSPF_IT_VLINK) ? 0 : htons(ifa->iface->mtu);
123 123
      pkt->ddseq = htonl(n->dds);
124 124
      pkt->options = hton_opt(oa->options);
125 125

  
......
260 260
  struct ospf_dbdes_packet *ps = (void *) ps_i;
261 261
  u32 ps_ddseq = ntohl(ps->ddseq);
262 262
  u32 ps_options = ntoh_opt(ps->options);
263
  u16 ps_iface_mtu = ntohs(ps->iface_mtu);
263 264
  
264 265
  OSPF_PACKET(ospf_dump_dbdes, ps, "DBDES packet received from %I via %s", n->ip, ifa->iface->name);
265 266

  
......
277 278
    if (n->state != NEIGHBOR_EXSTART)
278 279
      return;
279 280
  case NEIGHBOR_EXSTART:
281

  
282
    if ((ps_iface_mtu != ifa->iface->mtu) && (ifa->type != OSPF_IT_VLINK)
283
	&& (ps_iface_mtu != 0) && (ifa->iface->mtu != 0))
284
      log(L_WARN "OSPF: MTU mismatch with neighbour %I on interface %s (remote %d, local %d)",
285
	  n->ip, ifa->iface->name, ps_iface_mtu, ifa->iface->mtu);
286

  
280 287
    if ((ps->imms.bit.m && ps->imms.bit.ms && ps->imms.bit.i)
281 288
	&& (n->rid > po->router_id) && (size == sizeof(struct ospf_dbdes_packet)))
282 289
    {

Also available in: Unified diff