diff --git a/proto/ospf/dbdes.c b/proto/ospf/dbdes.c index 8cd7c8b..687eaa9 100644 --- a/proto/ospf/dbdes.c +++ b/proto/ospf/dbdes.c @@ -286,6 +286,10 @@ ospf_dbdes_receive(struct ospf_packet *ps_i, struct ospf_iface *ifa, n->options = ps_options; n->myimms.bit.ms = 0; n->imms.byte = ps->imms.byte; + if ((ps->iface_mtu != ifa->iface->mtu) && ((ifa->type != OSPF_IT_VLINK) || + ((ps->iface_mtu != 0) && (ifa->iface->mtu != 0)))) + log(L_WARN "MTU mismatch with neighbour %I on interface %s (remote %d, our %d)", + n->ip, ifa->iface->name, ps->iface_mtu, ifa->iface->mtu); OSPF_TRACE(D_PACKETS, "I'm slave to %I.", n->ip); ospf_neigh_sm(n, INM_NEGDONE); ospf_dbdes_send(n, 1); @@ -299,6 +303,10 @@ ospf_dbdes_receive(struct ospf_packet *ps_i, struct ospf_iface *ifa, n->options = ps_options; n->ddr = ps_ddseq - 1; /* It will be set corectly a few lines down */ n->imms.byte = ps->imms.byte; + if ((ps->iface_mtu != ifa->iface->mtu) && ((ifa->type != OSPF_IT_VLINK) || + ((ps->iface_mtu != 0) && (ifa->iface->mtu != 0)))) + log(L_WARN "MTU mismatch with neighbour %I on interface %s (remote %d, our %d)", + n->ip, ifa->iface->name, ps->iface_mtu, ifa->iface->mtu); OSPF_TRACE(D_PACKETS, "I'm master to %I.", n->ip); ospf_neigh_sm(n, INM_NEGDONE); } diff --git a/proto/ospf/iface.c b/proto/ospf/iface.c index cced710..0a6a782 100644 --- a/proto/ospf/iface.c +++ b/proto/ospf/iface.c @@ -86,6 +86,7 @@ ospf_sk_open(struct ospf_iface *ifa) sk->tbsize = rxbufsize(ifa); sk->data = (void *) ifa; sk->flags = SKF_LADDR_RX; + sk->ttl = 1; if (sk_open(sk) != 0) goto err;