]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
OSPF: Fix some trace messages
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Thu, 25 Oct 2018 15:21:06 +0000 (17:21 +0200)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Thu, 25 Oct 2018 15:21:06 +0000 (17:21 +0200)
Missing argument in MTU change trace message can crash bird when MTU
change happens and trace messages are active.

Thanks to Alexander Velkov for the bugreport.

proto/ospf/hello.c
proto/ospf/iface.c

index e00487dc6d40ce39e5f28646d45d6610a7c52b98..7f14b6361144384287b3d095b3d42f62af5d2602 100644 (file)
@@ -283,7 +283,7 @@ ospf_receive_hello(struct ospf_packet *pkt, struct ospf_iface *ifa,
       if (!ipa_equal(faddr, n->ip))
       {
        OSPF_TRACE(D_EVENTS, "Neighbor %R on %s changed IP address to %I",
-                  n->rid, ifa->ifname, n->ip, faddr);
+                  n->rid, ifa->ifname, faddr);
        n->ip = faddr;
       }
     }
index 1795ec2203f189f727965cc7a79c566f6ada1fad..6e3a48b3a81a1b6129be0dd659490fd0e693d82f 100644 (file)
@@ -1256,7 +1256,8 @@ ospf_iface_change_mtu(struct ospf_proto *p, struct ospf_iface *ifa)
 {
   /* ifa is not vlink */
 
-  OSPF_TRACE(D_EVENTS, "Interface %s changed MTU to %d", ifa->iface->mtu);
+  OSPF_TRACE(D_EVENTS, "Interface %s changed MTU to %d",
+            ifa->ifname, ifa->iface->mtu);
 
   ifa->tx_length = ifa_tx_length(ifa);