summaryrefslogtreecommitdiffstats
path: root/include/net/inet_sock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/inet_sock.h')
-rw-r--r--include/net/inet_sock.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h
index 613cfa401672..83b567fe1941 100644
--- a/include/net/inet_sock.h
+++ b/include/net/inet_sock.h
@@ -249,4 +249,13 @@ static inline __u8 inet_sk_flowi_flags(const struct sock *sk)
return flags;
}
+static inline void inet_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb)
+{
+ struct dst_entry *dst = skb_dst(skb);
+
+ dst_hold(dst);
+ sk->sk_rx_dst = dst;
+ inet_sk(sk)->rx_dst_ifindex = skb->skb_iif;
+}
+
#endif /* _INET_SOCK_H */