aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/icmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/icmp.c')
-rw-r--r--net/ipv6/icmp.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index 12c0b85d6c46..cff74127ea32 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -777,6 +777,22 @@ drop_no_count:
777 return 0; 777 return 0;
778} 778}
779 779
780void icmpv6_flow_init(struct sock *sk, struct flowi *fl,
781 u8 type,
782 const struct in6_addr *saddr,
783 const struct in6_addr *daddr,
784 int oif)
785{
786 memset(fl, 0, sizeof(*fl));
787 ipv6_addr_copy(&fl->fl6_src, saddr);
788 ipv6_addr_copy(&fl->fl6_dst, daddr);
789 fl->proto = IPPROTO_ICMPV6;
790 fl->fl_icmp_type = type;
791 fl->fl_icmp_code = 0;
792 fl->oif = oif;
793 security_sk_classify_flow(sk, fl);
794}
795
780/* 796/*
781 * Special lock-class for __icmpv6_sk: 797 * Special lock-class for __icmpv6_sk:
782 */ 798 */