From: Ezra Peisach Date: Fri, 22 Jun 2001 14:31:47 +0000 (+0000) Subject: * network.c (setup_port): Change sin to sin4 to prevent shadowing X-Git-Tag: krb5-1.3-alpha1~1296 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6cdcc51402cfaf4ad9853e41239ce987128dc9ae;p=krb5.git * network.c (setup_port): Change sin to sin4 to prevent shadowing git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13490 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kdc/ChangeLog b/src/kdc/ChangeLog index b09540444..b5c13e54f 100644 --- a/src/kdc/ChangeLog +++ b/src/kdc/ChangeLog @@ -1,3 +1,7 @@ +2001-06-22 Ezra Peisach + + * network.c (setup_port): Change sin to sin4 to prevent shadowing. + 2001-06-21 Ezra Peisach * configure.in: Test for daemon prototype. diff --git a/src/kdc/network.c b/src/kdc/network.c index 7e300ec8e..d96b9be55 100644 --- a/src/kdc/network.c +++ b/src/kdc/network.c @@ -444,30 +444,30 @@ setup_port(void *P_data, struct sockaddr *addr) switch (addr->sa_family) { case AF_INET: { - struct sockaddr_in *sin = (struct sockaddr_in *) addr, psin; + struct sockaddr_in *sin4 = (struct sockaddr_in *) addr, psin; for (i = 0; i < n_udp_ports; i++) { sock = socket (PF_INET, SOCK_DGRAM, 0); if (sock == -1) { data->retval = errno; com_err(data->prog, data->retval, "Cannot create server socket for port %d address %s", - udp_port_nums[i], inet_ntoa (sin->sin_addr)); + udp_port_nums[i], inet_ntoa (sin4->sin_addr)); return 1; } - psin = *sin; + psin = *sin4; psin.sin_port = htons (udp_port_nums[i]); if (bind (sock, (struct sockaddr *)&psin, sizeof (psin)) == -1) { data->retval = errno; com_err(data->prog, data->retval, "Cannot bind server socket to port %d address %s", - udp_port_nums[i], inet_ntoa (sin->sin_addr)); + udp_port_nums[i], inet_ntoa (sin4->sin_addr)); return 1; } FD_SET (sock, &select_fds); if (sock > select_nfds) select_nfds = sock; krb5_klog_syslog (LOG_INFO, "listening on fd %d: %s port %d", sock, - inet_ntoa (sin->sin_addr), udp_port_nums[i]); + inet_ntoa (sin4->sin_addr), udp_port_nums[i]); if (add_fd (data, sock)) return 1; }