Răsfoiți Sursa

Merge branch 'maint'

* maint:
  * Update docs
  * Use proper protocol lookup for socket when answering
  * Fix --disable-ipv6 compiling

Conflicts:
	doc/UPDATES
Bryan Drewery 15 ani în urmă
părinte
comite
730c47a465
3 a modificat fișierele cu 7 adăugiri și 6 ștergeri
  1. 3 0
      doc/UPDATES
  2. 0 2
      src/match.c
  3. 4 4
      src/net.c

+ 3 - 0
doc/UPDATES

@@ -16,6 +16,9 @@
   * FiSH message support added.
   * FiSH support for DH1080 key-exchange. 'keyx' command added to start from bot, and responds to key-exchanges.
 
+maint
+  * Fix --disable-ipv6 compiling
+
 1.3.2 - http://wraith.botpack.net/milestone/1.3.2
   * Misc bug fixes
   * 'make' on BSD will now redirect to gmake.

+ 0 - 2
src/match.c

@@ -288,9 +288,7 @@ match_cidr(const char *m, const char *a)
   *ip++ = '\0';
 
   int ret = 0;
-#ifdef USE_IPV6
   int aftype = 0;
-#endif
 
   sockname_t ipaddr, maskaddr;
   bzero(&ipaddr, sizeof(ipaddr));

+ 4 - 4
src/net.c

@@ -691,11 +691,11 @@ int open_telnet(const char *ip, port_t port, bool proxy, int identd)
  * 'addr' is ignored if af_def is AF_INET6 -poptix (02/03/03)
  */
 #ifdef USE_IPV6
-int open_address_listen(const char* ip, int af_def, port_t *port)
+int open_address_listen(const char* ip, int af_def, port_t *port) {
 #else
-int open_address_listen(const char* ip, port_t *port)
+int open_address_listen(const char* ip, port_t *port) {
+   int af_def = AF_INET;
 #endif /* USE_IPV6 */
- {
 //  if (firewall[0]) {
 //    /* FIXME: can't do listen port thru firewall yet */
 //    putlog(LOG_MISC, "*", "!! Cant open a listen port (you are using a firewall)");
@@ -864,8 +864,8 @@ int answer(int sock, char *caller, in_addr_t *ip, port_t *port, int binary)
   int new_sock;
   socklen_t addrlen;
   struct sockaddr_in from;
-#ifdef USE_IPV6
   int af_ty = sockprotocol(sock);
+#ifdef USE_IPV6
   struct sockaddr_in6 from6;
 
   bzero(&from6, sizeof(struct sockaddr_in6));