diff options
| author | Jafar Al-Gharaibeh <jafar@atcorp.com> | 2025-04-08 22:12:46 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-08 22:12:46 -0500 |
| commit | 999e36893cdc884138c598d4080126e3c696b066 (patch) | |
| tree | 915bebfd8a191be7625a6d8a131a5cdc5e962df9 | |
| parent | 3f30c3e524327be76c7fd4282ea34ea73f8564b7 (diff) | |
| parent | e37268e717efa6c8d365b8dc91a1f253b9a7d8b2 (diff) | |
Merge pull request #18618 from FRRouting/mergify/bp/stable/10.3/pr-18583
babeld: check valid babel port (backport #18583)
| -rw-r--r-- | babeld/babeld.c | 4 | ||||
| -rw-r--r-- | babeld/babeld.h | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/babeld/babeld.c b/babeld/babeld.c index 1d2f60e3ad..2c9c9f031e 100644 --- a/babeld/babeld.c +++ b/babeld/babeld.c @@ -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; diff --git a/babeld/babeld.h b/babeld/babeld.h index 17a0381d2c..f4ee09a761 100644 --- a/babeld/babeld.h +++ b/babeld/babeld.h @@ -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)) |
