diff options
Diffstat (limited to 'include/net/raw.h')
-rw-r--r-- | include/net/raw.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/net/raw.h b/include/net/raw.h index 20ebf0b3dfa8..821ff4887f77 100644 --- a/include/net/raw.h +++ b/include/net/raw.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #ifndef _RAW_H | 17 | #ifndef _RAW_H |
18 | #define _RAW_H | 18 | #define _RAW_H |
19 | 19 | ||
20 | 20 | #include <net/inet_sock.h> | |
21 | #include <net/protocol.h> | 21 | #include <net/protocol.h> |
22 | #include <linux/icmp.h> | 22 | #include <linux/icmp.h> |
23 | 23 | ||
@@ -75,4 +75,15 @@ static inline struct raw_sock *raw_sk(const struct sock *sk) | |||
75 | return (struct raw_sock *)sk; | 75 | return (struct raw_sock *)sk; |
76 | } | 76 | } |
77 | 77 | ||
78 | static inline bool raw_sk_bound_dev_eq(struct net *net, int bound_dev_if, | ||
79 | int dif, int sdif) | ||
80 | { | ||
81 | #if IS_ENABLED(CONFIG_NET_L3_MASTER_DEV) | ||
82 | return inet_bound_dev_eq(!!net->ipv4.sysctl_raw_l3mdev_accept, | ||
83 | bound_dev_if, dif, sdif); | ||
84 | #else | ||
85 | return inet_bound_dev_eq(true, bound_dev_if, dif, sdif); | ||
86 | #endif | ||
87 | } | ||
88 | |||
78 | #endif /* _RAW_H */ | 89 | #endif /* _RAW_H */ |