This introduces a helper function to be called only by network drivers that wraps calls to icmp[v6]_send in a conntrack transformation, in case NAT has been used. We don't want to pollute the non-driver path, though, so we introduce this as a helper to be called by places that actually make use of this, as suggested by Florian.
Showing the changes to include/linux (1 of 4 files). Show all
Unified · Split
| @@ -31,6 +31,12 @@ static inline void icmpv6_send(struct sk_buff *skb, · 30 unmodified lines | ||
| 31 | 31 | } |
| 32 | 32 | #endif |
| 33 | 33 | |
| 34 | +#if IS_ENABLED(CONFIG_NF_NAT) | |
| 35 | +void icmpv6_ndo_send(struct sk_buff *skb_in, u8 type, u8 code, __u32 info); | |
| 36 | +#else | |
| 37 | +#define icmpv6_ndo_send icmpv6_send | |
| 38 | +#endif | |
| 39 | + | |
| 34 | 40 | extern int icmpv6_init(void); |
| 35 | 41 | extern int icmpv6_err_convert(u8 type, u8 code, |
| 36 | 42 | int *err); |