summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2015-10-01 12:40:52 -0400
committerPaul Jakma <paul@quagga.net>2015-10-27 10:53:22 +0000
commit4edf1c6aea8fd93e8fdeb2a651bf34bb24329611 (patch)
treecbf121cedeeb4eebf442b5f147f06587e02e00a1
parentdea43dee04e22d69ed57f4c85498e248a6074435 (diff)
downloadquagga-4edf1c6aea8fd93e8fdeb2a651bf34bb24329611.tar.bz2
quagga-4edf1c6aea8fd93e8fdeb2a651bf34bb24329611.tar.xz
pimd: Notice when we receive a packet type we can't handle yet
There are PIM packet types that have not been implemented yet. Notice when we get one of those and safely do nothing. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
-rw-r--r--pimd/pim_pim.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/pimd/pim_pim.c b/pimd/pim_pim.c
index cd8a2903..66fc59be 100644
--- a/pimd/pim_pim.c
+++ b/pimd/pim_pim.c
@@ -206,6 +206,20 @@ int pim_pim_packet(struct interface *ifp, uint8_t *buf, size_t len)
pim_version, pim_type, pim_msg_len, checksum);
}
+ if (pim_type == PIM_MSG_TYPE_REGISTER ||
+ pim_type == PIM_MSG_TYPE_REG_STOP ||
+ pim_type == PIM_MSG_TYPE_BOOTSTRAP ||
+ pim_type == PIM_MSG_TYPE_GRAFT ||
+ pim_type == PIM_MSG_TYPE_GRAFT_ACK ||
+ pim_type == PIM_MSG_TYPE_CANDIDATE)
+ {
+ if (PIM_DEBUG_PIM_PACKETS) {
+ zlog_debug("Recv PIM packet type %d which is not currently understood",
+ pim_type);
+ }
+ return -1;
+ }
+
if (pim_type == PIM_MSG_TYPE_HELLO) {
int result = pim_hello_recv(ifp,
ip_hdr->ip_src,