]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
OSPF: Fix some trace messages
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Thu, 25 Oct 2018 15:22:37 +0000 (17:22 +0200)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Thu, 25 Oct 2018 15:22:37 +0000 (17:22 +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 523c24addb08bbc6ede34a2c510023ee163df485..9e427c4f72dd6942def2d7ea0e0ee74521cbce7b 100644 (file)
@@ -290,7 +290,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 19bcfa15b014608d45626c1e641e76d1c461d115..54a355b6b2ced32d613593a4658b5c9f7c7a33a0 100644 (file)
@@ -1278,7 +1278,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);