net: Encapsulate CDP packet identification

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

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
Joe Hershberger
2012-05-23 07:58:00 +00:00
parent f575ae1f7d
commit 1735188329
3 changed files with 12 additions and 4 deletions

View File

@@ -1099,7 +1099,7 @@ NetReceive(uchar *inpkt, int len)
#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);