Apparently another small change is needed to compile the module with 3.3 onwards. This patch is a little bit special since I do not have the infrastructure available to even compile time test it. So just drop me a line if it compiles or not.
As usual you can get it here.
Discussion
Thank you for that patch I use since a long time!
Ever thought about pushing it (gently) to mainstream kernel?
It could benefit long time support from the community...
Fab
Yes apparently I tried to do this twice but dod not succeed. I think the main problem is that I do not know enough about RTSP code to put this in proper shape (see the known bugs).
Maybe they wouldn't trust you enough to stay on a long term basis...
Was there ever an RTSP conntrack patch for 2.6.18?
In the POM repository perhaps?
Cheers,
-arif
There was a version for 2.6.18 in the original netfilter repository AFAIR but this one is no longer available/online.
I have used this module for a long time now. It have been very useful, so thanks a lot for your work!
I don't know if you noticed but it looks like since kernel 3.3, the module doesn't build anymore.
Any ideas anyone? :)
Fab
-------
/dev/shm/rtsp-linux-v2.6/nf_nat_rtsp.c: In function ‘expected’:
/dev/shm/rtsp-linux-v2.6/nf_nat_rtsp.c:433: error: storage size of ‘mr’ isn’t known
/dev/shm/rtsp-linux-v2.6/nf_nat_rtsp.c:449: error: ‘IP_NAT_RANGE_MAP_IPS’ undeclared (first use in this function)
/dev/shm/rtsp-linux-v2.6/nf_nat_rtsp.c:449: error: (Each undeclared identifier is reported only once
/dev/shm/rtsp-linux-v2.6/nf_nat_rtsp.c:449: error: for each function it appears in.)
/dev/shm/rtsp-linux-v2.6/nf_nat_rtsp.c:452: error: ‘IP_NAT_MANIP_DST’ undeclared (first use in this function)
/dev/shm/rtsp-linux-v2.6/nf_nat_rtsp.c:433: warning: unused variable ‘mr’
I have no machine to test this right now but just changing this to NF_NAT_RANGE_MAPS_IPS and NF_NAT_MANIP_DST should do the trick.
Thanks for the tip! I also had to change nf_nat_multi_range_compat to nf_nat_ipv4_multi_range_compat...
The built went ok, but I didn't boot the kernel yet.
I'll let you guys know.
Fab
Please tell me if it works, I'll then update the patch accordingly. I do not want to put a patch online without at least some testing.
I tested it this morning, and I didn't notice any problem yet! I think you can update the code.
I also have a patch to include this within the kernel (like old times) if you are interested.
Thanks again
Fab
inspiré de https://dev.openwrt.org/browser/packages/net/xtables-addons/patches/101-rtsp-linux-3.6-compat.patch?rev=34391 car je suis une bille en C.
--- nf_conntrack_rtsp.c.orig 2012-04-22 19:33:24.000000000 +0200
+++ nf_conntrack_rtsp.c 2012-12-13 17:13:36.906381203 +0100
@@ -28,6 +28,7 @@
* - Port to new NF API
*/
+#include <linux/version.h>
#include <linux/module.h>
#include <linux/netfilter.h>
#include <linux/ip.h>
@@ -496,8 +497,11 @@
} else {
sprintf(tmpname, "rtsp-%d", i);
}
- hlpr->name = tmpname;
-
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
+ strncpy(hlpr->name, tmpname, sizeof(hlpr->name));
+ #else
+ hlpr->name = tmpname;
+ #endif
pr_debug("port #%d: %d\n", i, ports[i]);
ret = nf_conntrack_helper_register(hlpr);