lkml.org 
[lkml]   [2023]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] net: mroute6.h: change type of mif6c_pifi to __u32
Date
From a91f11fe060729d0009a3271e3a92cead88e2656 Mon Sep 17 00:00:00 2001
From: "Ganesh Babu" <ganesh.babu@ekinops.com>
Date: Wed, 15 Mar 2023 15:01:39 +0530
Subject: [PATCH] net: mroute6.h: change type of mif6c_pifi to __u32

Increase mif6c_pifi field in mif6ctl struct
from 16 to 32 bits to support 32-bit ifindices.
The field stores the physical interface (ifindex) for a multicast group.
Passing a 32-bit ifindex via MRT6_ADD_MIF socket option
from user space can cause unpredictable behavior in PIM6.
Changing mif6c_pifi to __u32 allows kernel to handle
32-bit ifindex values without issues.

---
 include/uapi/linux/mroute6.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/uapi/linux/mroute6.h b/include/uapi/linux/mroute6.h
index 1d90c21a6251..90e6e771beab 100644
--- a/include/uapi/linux/mroute6.h
+++ b/include/uapi/linux/mroute6.h
@@ -75,7 +75,7 @@ struct mif6ctl {
        mifi_t  mif6c_mifi;             /* Index of MIF */
        unsigned char mif6c_flags;      /* MIFF_ flags */
        unsigned char vifc_threshold;   /* ttl limit */
-       __u16    mif6c_pifi;            /* the index of the physical IF */
+       __u32    mif6c_pifi;            /* the index of the physical IF */
        unsigned int vifc_rate_limit;   /* Rate limiter values (NI) */
 };

--
2.11.0

Signed-off-by: Ganesh Babu <ganesh.babu@ekinops.com>
---

\
 
 \ /
  Last update: 2023-03-28 09:15    [W:0.069 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site