This patch allows you to set expectfn which is specifically used by the NAT side of most of the existing conntrack helpers. I have added a symbol map that uses a string as key to look up for the function that is attached to the expectation object. This is the best solution I came out with to solve this issue.
Showing the changes to include/linux/netfilter (1 of 7 files). Show all
Unified · Split
| @@ -175,6 +175,7 @@ enum ctattr_expect { · 174 unmodified lines | ||
| 175 | 175 | CTA_EXPECT_FLAGS, |
| 176 | 176 | CTA_EXPECT_CLASS, |
| 177 | 177 | CTA_EXPECT_NAT, |
| 178 | + CTA_EXPECT_FN, | |
| 178 | 179 | __CTA_EXPECT_MAX |
| 179 | 180 | }; |
| 180 | 181 | #define CTA_EXPECT_MAX (__CTA_EXPECT_MAX - 1) |