From dabbc22693087fc89aaf9b7ab8b032e859dee434 Mon Sep 17 00:00:00 2001 From: laforge Date: Mon, 13 Jan 2003 13:36:26 +0000 Subject: add typecasts to (struct in_addr) when calling inet_ntoa() --- extensions/ulogd_LOGEMU.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'extensions') diff --git a/extensions/ulogd_LOGEMU.c b/extensions/ulogd_LOGEMU.c index 24f61d9..7b1f640 100644 --- a/extensions/ulogd_LOGEMU.c +++ b/extensions/ulogd_LOGEMU.c @@ -1,4 +1,4 @@ -/* ulogd_LOGEMU.c, Version $Revision: 1.10 $ +/* ulogd_LOGEMU.c, Version $Revision: 1.11 $ * * ulogd output target for syslog logging emulation * @@ -20,7 +20,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: ulogd_LOGEMU.c,v 1.10 2002/12/09 14:42:43 laforge Exp $ + * $Id: ulogd_LOGEMU.c,v 1.11 2002/12/09 15:03:51 laforge Exp $ * */ @@ -143,8 +143,10 @@ int _output_logemu(ulog_iret_t *res) fprintf(of, "MAC=%s ", (GET_FLAGS(3) & ULOGD_RETF_VALID) ? (char *) GET_VALUE(3).ptr : ""); - fprintf(of, "SRC=%s ", inet_ntoa(htonl(GET_VALUE(4).ui32))); - fprintf(of, "DST=%s ", inet_ntoa(htonl(GET_VALUE(5).ui32))); + fprintf(of, "SRC=%s ", inet_ntoa((struct in_addr) + {htonl(GET_VALUE(4).ui32)})); + fprintf(of, "DST=%s ", inet_ntoa((struct in_addr) + {htonl(GET_VALUE(5).ui32)})); fprintf(of, "LEN=%u TOS=%02X PREC=0x%02X TTL=%u ID=%u ", GET_VALUE(6).ui16, GET_VALUE(7).ui8 & IPTOS_TOS_MASK, @@ -225,7 +227,7 @@ int _output_logemu(ulog_iret_t *res) GET_VALUE(31).ui32 >> 24); break; case ICMP_REDIRECT: - fprintf(of, "GATEWAY=%s ", inet_ntoa(htonl(GET_VALUE(31).ui32))); + fprintf(of, "GATEWAY=%s ", inet_ntoa((struct in_addr) {htonl(GET_VALUE(31).ui32)})); break; case ICMP_DEST_UNREACH: if (GET_VALUE(28).ui8 == ICMP_FRAG_NEEDED) -- cgit v1.2.3