net: Encapsulate CDP packet identification

Checking for CDP packets should be encapsulated, not copied code.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
diff --git a/net/net.c b/net/net.c
index 4cd5a0a..8624db0 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1099,7 +1099,7 @@
 
 #if defined(CONFIG_CMD_CDP)
 	/* keep track if packet is CDP */
-	iscdp = memcmp(et->et_dest, NetCDPAddr, 6) == 0;
+	iscdp = is_cdp_packet(et->et_dest);
 #endif
 
 	myvlanid = ntohs(NetOurVLAN);