diff --git a/src/Makefile b/src/Makefile index aaa736d..f3b8293 100644 --- a/src/Makefile +++ b/src/Makefile @@ -65,7 +65,7 @@ hone_notify-defsyms := obj-$(CONFIG_HONEEVENT) += honeevent.o honeevent-y := honeevent_imp.o mmutil.o pcapng.o ringbuf.o \ $(call COMBINE,HONE_NOTIFY,$(hone_notify-y)) -honeevent-defsyms := uts_sem socket_file_ops get_files_struct put_files_struct +honeevent-defsyms := uts_sem socket_file_ops get_files_struct put_files_struct getboottime # Handle all the *-defsyms magic. include $(src)/defsyms.mk diff --git a/src/mmutil.c b/src/mmutil.c index e7896dc..d9e7099 100644 --- a/src/mmutil.c +++ b/src/mmutil.c @@ -16,12 +16,8 @@ #include #include -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) - #define D_PATH(mnt, dentry, buf, size) \ - ({ struct path _p = {(mnt), (dentry)}; d_path(&_p, (buf), (size)); }) -#else - #define D_PATH d_path -#endif +#define D_PATH(dentry, mnt, buf, size) \ + ({ struct path _p = {(mnt), (dentry)}; d_path(&_p, (buf), (size)); }) #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0) #define __get_exe_file(mm) ((mm)->exe_file) @@ -51,7 +47,7 @@ static char *__exe_path(struct mm_struct *mm, char *buf, int buflen) dentry = dget(exe_file->f_path.dentry); if (mnt && dentry) { - path = D_PATH(mnt, dentry, buf, buflen); + path = D_PATH(dentry, mnt, buf, buflen); dput(dentry); mntput(mnt); } diff --git a/src/rhel6.patch b/src/rhel6.patch index bd31e08..76941b4 100644 --- a/src/rhel6.patch +++ b/src/rhel6.patch @@ -1,6 +1,6 @@ --- a/src/defsyms.mk +++ b/src/defsyms.mk -@@ -62,6 +62,7 @@ KBUILD_EXTRA_SYMBOLS += $(obj)/defsyms.symvers +@@ -56,6 +56,7 @@ KBUILD_EXTRA_SYMBOLS += $(obj)/defsyms.symvers LDFLAGS_MODULE += $(DEFSYMS_LDFLAGS_$(notdir $@)) $(foreach N,$(defsyms-names),$(eval DEFSYMS_LDFLAGS_$(N).ko = -T $(obj)/$(N).defsyms)) @@ -8,20 +8,9 @@ $(defsyms-lds): $(obj)/%.defsyms: $(obj)/.System.map.md5 $(call cmd,defsyms) ---- a/src/socket_lookup.h -+++ b/src/socket_lookup.h -@@ -368,7 +368,7 @@ int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset, - return nexthdr; - } - --# if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37) -+# if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32) - extern struct sock *__udp6_lib_lookup(struct net *net, - struct in6_addr *saddr, __be16 sport, - struct in6_addr *daddr, __be16 dport, --- a/src/socket_notify.c +++ b/src/socket_notify.c -@@ -31,7 +31,7 @@ +@@ -26,7 +26,7 @@ #warning Hone will not provide IPv6 packet/process correlation. #endif diff --git a/src/socket_lookup.h b/src/socket_lookup.h index 45515ab..3014d4b 100644 --- a/src/socket_lookup.h +++ b/src/socket_lookup.h @@ -279,7 +279,8 @@ int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset, } #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0) */ -# if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37) +#if defined(CONFIG_IPV6) extern struct sock *__udp6_lib_lookup(struct net *net, struct in6_addr *saddr, __be16 sport, struct in6_addr *daddr, __be16 dport, @@ -288,7 +289,11 @@ extern struct sock *__udp6_lib_lookup(struct net *net, #define udp6_lib_lookup(net, saddr, sport, daddr, dport, dif) \ __udp6_lib_lookup((net), (struct in6_addr *) (saddr), (sport), \ (struct in6_addr *) (daddr), (dport), (dif), &udp_table) -# endif +#else +#define udp6_lib_lookup(net, saddr, sport, daddr, dport, dif) \ + NULL +#endif +#endif static struct sock *lookup_v6_sock(const struct sk_buff *skb, const struct net_device *indev)