bugWeeChat - Bugs: bug #39119, Relay tries to bind to garbage...


bug #39119: Relay tries to bind to garbage addresses

Submitter:  grawity <grawity>
Submitted:  Wed 29 May 2013 05:41:34 PM UTC
Category:  relay plugin Severity:  3 - Normal
Item Group:  other Status:  Fixed
Privacy:  Public Assigned to:  flashcode
Originator Name:  Open/Closed:  Closed
Release:  * 0.4.1 IRC nick:  grawity
* Mandatory Fields

Add a New Comment Rich Markup

Wed 29 May 2013 05:41:34 PM UTC, original submission:  

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 reside.

Patch attached.

grawity <grawity>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #28206:  0002-relay-warn-about-invalid-bind_address-values.patch added by grawity (2KiB - text/x-patch - Bonus: inform the user when bind_address could not be parsed)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by flashcode (Updated the item)
  • -email is unavailable- added by grawity (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-10-06 flashcode Open/ClosedOpen Closed
    2013-05-30 flashcode Item GroupNone other
        StatusNone Fixed
        Assigned toNone flashcode
        Release3.3-dev 0.4.1
    2013-05-29 grawity Attached File- Added 0002-relay-warn-about-invalid-bind_address-values.patch, #28206
    2013-05-29 grawity Attached File- Added 0001-relay-fix-binding-to-an-IP-address.patch, #28205

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code