]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
xfrm: Mark flowi arg to xfrm_selector_match() const.
authorDavid S. Miller <davem@davemloft.net>
Wed, 23 Feb 2011 02:07:39 +0000 (18:07 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 Feb 2011 02:07:39 +0000 (18:07 -0800)
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/xfrm.h
net/xfrm/xfrm_policy.c

index 2328532f00762341d0894cf2efb5cd7a20e2bc35..b965ad795b60ebcb5c0134c9b599ea65575d0dc9 100644 (file)
@@ -843,7 +843,8 @@ __be16 xfrm_flowi_dport(const struct flowi *fl)
        return port;
 }
 
-extern int xfrm_selector_match(struct xfrm_selector *sel, struct flowi *fl,
+extern int xfrm_selector_match(struct xfrm_selector *sel,
+                              const struct flowi *fl,
                               unsigned short family);
 
 #ifdef CONFIG_SECURITY_NETWORK_XFRM
index ccd47cf1765c6d31c5c4b79092893313c82de355..71e6dc25bc5ce8de41305c5484a938f5b538ae7a 100644 (file)
@@ -58,7 +58,7 @@ static struct xfrm_policy *__xfrm_policy_unlink(struct xfrm_policy *pol,
                                                int dir);
 
 static inline int
-__xfrm4_selector_match(struct xfrm_selector *sel, struct flowi *fl)
+__xfrm4_selector_match(struct xfrm_selector *sel, const struct flowi *fl)
 {
        return  addr_match(&fl->fl4_dst, &sel->daddr, sel->prefixlen_d) &&
                addr_match(&fl->fl4_src, &sel->saddr, sel->prefixlen_s) &&
@@ -69,7 +69,7 @@ __xfrm4_selector_match(struct xfrm_selector *sel, struct flowi *fl)
 }
 
 static inline int
-__xfrm6_selector_match(struct xfrm_selector *sel, struct flowi *fl)
+__xfrm6_selector_match(struct xfrm_selector *sel, const struct flowi *fl)
 {
        return  addr_match(&fl->fl6_dst, &sel->daddr, sel->prefixlen_d) &&
                addr_match(&fl->fl6_src, &sel->saddr, sel->prefixlen_s) &&
@@ -79,8 +79,8 @@ __xfrm6_selector_match(struct xfrm_selector *sel, struct flowi *fl)
                (fl->oif == sel->ifindex || !sel->ifindex);
 }
 
-int xfrm_selector_match(struct xfrm_selector *sel, struct flowi *fl,
-                   unsigned short family)
+int xfrm_selector_match(struct xfrm_selector *sel, const struct flowi *fl,
+                       unsigned short family)
 {
        switch (family) {
        case AF_INET: