mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 13:37:17 +02:00
babeld: This commit checks whether it is a valid MULTICAST hello, if not, the code logs a debug message and stops processing the packet.
Signed-off-by: zmw12306 <zmw12306@gmail.com>
This commit is contained in:
parent
9b96394d05
commit
f71846ec12
|
@ -411,6 +411,7 @@ parse_packet(const unsigned char *from, struct interface *ifp,
|
|||
unsigned int timestamp = 0;
|
||||
|
||||
#define BABEL_UNICAST_HELLO 0x8000
|
||||
#define BABEL_MULTICAST_HELLO 0x0000
|
||||
DO_NTOHS(flags, message + 2);
|
||||
|
||||
/*
|
||||
|
@ -425,6 +426,13 @@ parse_packet(const unsigned char *from, struct interface *ifp,
|
|||
goto done;
|
||||
}
|
||||
|
||||
if (!CHECK_FLAG(flags, BABEL_MULTICAST_HELLO)) {
|
||||
debugf(BABEL_DEBUG_COMMON,
|
||||
"Received Hello from %s on %s with Unknown Flags %d",
|
||||
format_address(from), ifp->name, flags);
|
||||
goto done;
|
||||
}
|
||||
|
||||
DO_NTOHS(seqno, message + 4);
|
||||
DO_NTOHS(interval, message + 6);
|
||||
debugf(BABEL_DEBUG_COMMON,
|
||||
|
|
Loading…
Reference in a new issue