summaryrefslogtreecommitdiff
path: root/zebra/irdp_packet.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/irdp_packet.c')
-rw-r--r--zebra/irdp_packet.c47
1 files changed, 25 insertions, 22 deletions
diff --git a/zebra/irdp_packet.c b/zebra/irdp_packet.c
index b0dde96cce..c36c958973 100644
--- a/zebra/irdp_packet.c
+++ b/zebra/irdp_packet.c
@@ -28,39 +28,39 @@
*/
/*
- * Thanks to Jens Låås at Swedish University of Agricultural Sciences
+ * Thanks to Jens Laas at Swedish University of Agricultural Sciences
* for reviewing and tests.
*/
#include <zebra.h>
+#include <netinet/ip_icmp.h>
-
-#include "if.h"
-#include "vty.h"
-#include "sockunion.h"
-#include "prefix.h"
+#include "checksum.h"
#include "command.h"
-#include "memory.h"
-#include "zebra_memory.h"
-#include "stream.h"
-#include "ioctl.h"
#include "connected.h"
+#include "if.h"
+#include "ioctl.h"
#include "log.h"
-#include "zclient.h"
+#include "log.h"
+#include "memory.h"
+#include "prefix.h"
+#include "sockopt.h"
+#include "sockunion.h"
+#include "sockunion.h"
+#include "stream.h"
#include "thread.h"
+#include "vty.h"
+#include "zclient.h"
+
+#include "zebra_memory.h"
#include "zebra/interface.h"
#include "zebra/rtadv.h"
#include "zebra/rib.h"
#include "zebra/zserv.h"
#include "zebra/redistribute.h"
#include "zebra/irdp.h"
-#include <netinet/ip_icmp.h>
-#include "if.h"
-#include "checksum.h"
-#include "sockunion.h"
-#include "log.h"
-#include "sockopt.h"
+#include "zebra/zebra_errors.h"
/* GLOBAL VARS */
@@ -95,13 +95,15 @@ static void parse_irdp_packet(char *p, int len, struct interface *ifp)
src = ip->ip_src;
if (len != iplen) {
- zlog_err("IRDP: RX length doesnt match IP length");
+ flog_err(ZEBRA_ERR_IRDP_LEN_MISMATCH,
+ "IRDP: RX length doesnt match IP length");
return;
}
if (iplen < ICMP_MINLEN) {
- zlog_err("IRDP: RX ICMP packet too short from %s\n",
- inet_ntoa(src));
+ flog_err(ZEBRA_ERR_IRDP_LEN_MISMATCH,
+ "IRDP: RX ICMP packet too short from %s\n",
+ inet_ntoa(src));
return;
}
@@ -110,8 +112,9 @@ static void parse_irdp_packet(char *p, int len, struct interface *ifp)
+
len of IP-header) 14+20 */
if (iplen > IRDP_RX_BUF - 34) {
- zlog_err("IRDP: RX ICMP packet too long from %s\n",
- inet_ntoa(src));
+ flog_err(ZEBRA_ERR_IRDP_LEN_MISMATCH,
+ "IRDP: RX ICMP packet too long from %s\n",
+ inet_ntoa(src));
return;
}