summaryrefslogtreecommitdiff
path: root/ospfd/ospf_packet.c
diff options
context:
space:
mode:
authorajs <ajs>2005-03-29 16:13:49 +0000
committerajs <ajs>2005-03-29 16:13:49 +0000
commit5dcbdf82efdf65313a04ea45f2c8f7307c7ab671 (patch)
treed00d264009efcc9596b673b0e30574394c460a7a /ospfd/ospf_packet.c
parentfd651fa6d5139501af57471109ec15bb688e4bd4 (diff)
2005-03-29 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* ospf_packet.c: (ospf_write_frags) Enhance error message to show MTU. Also make function static. (ospf_write) Enhance error message to show interface name and MTU. Also make function static.
Diffstat (limited to 'ospfd/ospf_packet.c')
-rw-r--r--ospfd/ospf_packet.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c
index 87913361..4f18c04d 100644
--- a/ospfd/ospf_packet.c
+++ b/ospfd/ospf_packet.c
@@ -480,7 +480,7 @@ ospf_ls_ack_timer (struct thread *thread)
}
#ifdef WANT_OSPF_WRITE_FRAGMENT
-void
+static void
ospf_write_frags (int fd, struct ospf_packet *op, struct ip *iph,
struct msghdr *msg, unsigned int maxdatasize,
unsigned int mtu, int flags, u_char type)
@@ -531,12 +531,13 @@ ospf_write_frags (int fd, struct ospf_packet *op, struct ip *iph,
if (ret < 0)
zlog_warn ("*** ospf_write_frags: sendmsg failed to %s,"
- " id %d, off %d, len %d failed with %s",
- inet_ntoa (iph->ip_dst),
- iph->ip_id,
- iph->ip_off,
- iph->ip_len,
- safe_strerror (errno));
+ " id %d, off %d, len %d, mtu %u failed with %s",
+ inet_ntoa (iph->ip_dst),
+ iph->ip_id,
+ iph->ip_off,
+ iph->ip_len,
+ mtu,
+ safe_strerror (errno));
if (IS_DEBUG_OSPF_PACKET (type - 1, SEND))
{
@@ -563,7 +564,7 @@ ospf_write_frags (int fd, struct ospf_packet *op, struct ip *iph,
}
#endif /* WANT_OSPF_WRITE_FRAGMENT */
-int
+static int
ospf_write (struct thread *thread)
{
struct ospf *ospf = THREAD_ARG (thread);
@@ -687,9 +688,9 @@ ospf_write (struct thread *thread)
if (ret < 0)
zlog_warn ("*** sendmsg in ospf_write failed to %s, "
- "id %d, off %d, len %d: %s",
+ "id %d, off %d, len %d, interface %s, mtu %u: %s",
inet_ntoa (iph.ip_dst), iph.ip_id, iph.ip_off, iph.ip_len,
- safe_strerror (errno));
+ oi->ifp->name, oi->ifp->mtu, safe_strerror (errno));
/* Show debug sending packet. */
if (IS_DEBUG_OSPF_PACKET (type - 1, SEND))