From: zmw12306 Date: Sun, 23 Mar 2025 23:02:14 +0000 (-0400) Subject: babeld: Add next hop initialization X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=a031da53db2f10349bb87f2824b16348fed914e9;p=matthieu%2Ffrr.git babeld: Add next hop initialization Initialize v4_nh/v6_nh from source address at the beginning of packet parsing Signed-off-by: zmw12306 --- diff --git a/babeld/message.c b/babeld/message.c index 5a33d5c288..8920bed164 100644 --- a/babeld/message.c +++ b/babeld/message.c @@ -441,6 +441,14 @@ parse_packet(const unsigned char *from, struct interface *ifp, return; } + if (v4mapped(from)) { + memcpy(v4_nh, from, 16); + have_v4_nh = 1; + } else { + memcpy(v6_nh, from, 16); + have_v6_nh = 1; + } + i = 0; while(i < bodylen) { message = packet + 4 + i;