Re: Ulogd - mysql addresses are in network-byte order

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Here, for your review is a patch to
address the issue that I reported.

--- orig.ulogd_raw2packet_BASE.c	2011-12-08 11:55:09.000000000 -0500
+++ ulogd_raw2packet_BASE.c	2012-01-01 23:40:14.000000000 -0500
@@ -717,8 +717,8 @@
 		return ULOGD_IRET_OK;
 	len -= iph->ihl * 4;

-	okey_set_u32(&ret[KEY_IP_SADDR], iph->saddr);
-	okey_set_u32(&ret[KEY_IP_DADDR], iph->daddr);
+	okey_set_u32(&ret[KEY_IP_SADDR], ntohl(iph->saddr));
+	okey_set_u32(&ret[KEY_IP_DADDR], ntohl(iph->daddr));
 	okey_set_u8(&ret[KEY_IP_PROTOCOL], iph->protocol);
 	okey_set_u8(&ret[KEY_IP_TOS], iph->tos);
 	okey_set_u8(&ret[KEY_IP_TTL], iph->ttl);


Marty B.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux