ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/branches/8.2.x/src/s_bsd.c
(Generate patch)

Comparing ircd-hybrid/branches/8.2.x/src/s_bsd.c (file contents):
Revision 4413 by michael, Thu Aug 7 11:30:58 2014 UTC vs.
Revision 4414 by michael, Thu Aug 7 14:06:08 2014 UTC

# Line 63 | Line 63 | static void comm_connect_dns_callback(vo
63   static PF comm_connect_tryconnect;
64  
65  
66 /* check_can_use_v6()
67 *  Check if the system can open AF_INET6 sockets
68 */
69 void
70 check_can_use_v6(void)
71 {
72 #ifdef IPV6
73  int v6;
74
75  if ((v6 = socket(AF_INET6, SOCK_STREAM, 0)) < 0)
76    ConfigServerInfo.can_use_v6 = 0;
77  else
78  {
79    ConfigServerInfo.can_use_v6 = 1;
80    close(v6);
81  }
82 #else
83  ConfigServerInfo.can_use_v6 = 0;
84 #endif
85 }
86
66   /* get_sockerr - get the error value from the socket or the current errno
67   *
68   * Get the *real* error from the socket (well try to anyway..).
# Line 742 | Line 721 | comm_accept(struct Listener *lptr, struc
721    if (newfd < 0)
722      return -1;
723  
745 #ifdef IPV6
724    remove_ipv6_mapping(addr);
747 #else
748  addr->ss_len = addrlen;
749 #endif
725  
726    setup_socket(newfd);
727  
# Line 760 | Line 735 | comm_accept(struct Listener *lptr, struc
735   * AF_INET and AF_INET6 map AF_INET connections inside AF_INET6 structures
736   *
737   */
763 #ifdef IPV6
738   void
739   remove_ipv6_mapping(struct irc_ssaddr *addr)
740   {
# Line 784 | Line 758 | remove_ipv6_mapping(struct irc_ssaddr *a
758    else
759      addr->ss_len = sizeof(struct sockaddr_in);
760   }
787 #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)