mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 13:37:17 +02:00
babeld: check valid babel port
Add checking for port == 6696. Signed-off-by: zmw12306 <zmw12306@gmail.com>
This commit is contained in:
parent
44c4743e08
commit
6f88868f32
|
@ -183,6 +183,10 @@ static void babel_read_protocol(struct event *thread)
|
|||
flog_err_sys(EC_LIB_SOCKET, "recv: %s", safe_strerror(errno));
|
||||
}
|
||||
} else {
|
||||
if(ntohs(sin6.sin6_port) != BABEL_PORT) {
|
||||
return;
|
||||
}
|
||||
|
||||
FOR_ALL_INTERFACES(vrf, ifp) {
|
||||
if(!if_up(ifp))
|
||||
continue;
|
||||
|
|
|
@ -21,6 +21,8 @@ Copyright 2011 by Matthieu Boutier and Juliusz Chroboczek
|
|||
#undef MAX
|
||||
#undef MIN
|
||||
|
||||
#define BABEL_PORT 6696
|
||||
|
||||
#define MAX(x,y) ((x)<=(y)?(y):(x))
|
||||
#define MIN(x,y) ((x)<=(y)?(x):(y))
|
||||
|
||||
|
|
Loading…
Reference in a new issue