]> git.puffer.fish Git - matthieu/frr.git/commitdiff
babeld: fix incorrect type assignment in parse_request_subtlv
authorzmw12306 <zmw12306@gmail.com>
Mon, 31 Mar 2025 04:08:38 +0000 (00:08 -0400)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Thu, 10 Apr 2025 14:56:48 +0000 (14:56 +0000)
parse_request_subtlv accesses type using fixed offset instead of current position.

Signed-off-by: zmw12306 <zmw12306@gmail.com>
(cherry picked from commit 1571607c6bcba8f6861bdb90f472fe534df78a80)

babeld/message.c

index 5a33d5c288ac6d6885143720f338ca99ba2f3e71..3e74c64ebbf33e1f7069efdc8438e8e404a323be 100644 (file)
@@ -290,7 +290,7 @@ parse_request_subtlv(int ae, const unsigned char *a, int alen,
     int have_src_prefix = 0;
 
     while(i < alen) {
-        type = a[0];
+        type = a[i];
         if(type == SUBTLV_PAD1) {
             i++;
             continue;