[Top][All Lists]

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

[Weechat-dev] [bug #39119] Relay tries to bind to garbage addresses

From: Mantas M.
Subject: [Weechat-dev] [bug #39119] Relay tries to bind to garbage addresses
Date: Wed, 29 May 2013 17:41:35 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36


                 Summary: Relay tries to bind to garbage addresses
                 Project: WeeChat
            Submitted by: grawity
            Submitted on: Wed 29 May 2013 05:41:34 PM GMT
                Category: relay plugin
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 0.4.2-dev
                IRC nick: grawity



As reported on IRC by deese, asking the relay plugin to bind to a specific IP
address will cause strange errors...

20:00 (deese) any clue about this error? 19:01 weechat     =!= relay: cannot
"bind" on port 9001 (ipv4.ssl.weechat): error 97 Address family not supported
by protocol

...since it gives a garbage address to bind():

20:04 (deese) socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 37
20:04 (deese) bind(37, {sa_family=0x20b2 /* AF_??? */, sa_data="6260262
6260��������"}, 16) = -1 EAFNOSUPPORT (Address family not
supported by protocol)

The problem is caused by an inet_pton() call in relay_server_create_socket()
overwriting the beginning of *ptr_addr, where the sa_family and sa_port fields

Patch attached.


File Attachments:

Date: Wed 29 May 2013 05:41:34 PM GMT  Name:
0001-relay-fix-binding-to-an-IP-address.patch  Size: 3kB   By: grawity



Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]