patchWeeChat - Patches: patch #7992, Support IPv6 xfers

 
 

patch #7992: Support IPv6 xfers

Submitter:  Andrew Potter <talisein>
Submitted:  Tue 02 Apr 2013 10:15:45 PM UTC
   
 
Category:  xfer plugin Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  flashcode Open/Closed:  Closed
IRC nick:  talisein
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 09 Jan 2014 12:03:53 PM UTC, comment #2: 

Thank you Andrew for the patch!

Sebastien Helleu <flashcode>
Group administrator
Mon 02 Dec 2013 07:17:28 PM UTC, comment #1: 

Updated patch no longer breaks the 80 char rule in struct xfer_t.
Before in the patch it was storing a struct sockaddr_storage for the remote/local_address; now the xfer_t holds a struct sockaddr* instead.

A xfer_set_remote_address() setter function was added to ensure sanity when modifying remote_address.

(file #29758)

Andrew Potter <talisein>
Tue 02 Apr 2013 10:15:45 PM UTC, original submission:  

This patch depends on patch #7974

This patch adds support for IPv6 xfers.

There are two primary changes to weechat_network_connect_to():

  • Because a ulong obviously can't transfer an IPv6 address, struct addrinfo* is used instead, and the port parameter is unused as it would be redundant, ignored, or confusing.
  • Because the proxy may be at an IPv4 address and the target IPv6--or vice versa--the socket() call must be made in network_connect_to() so that it is created in the correct family. So network_connect_to() now returns the socket fd.


I could use some specific feedback in two areas:

  • I've changed remote_address and local_address to (struct addrinfo_storage). It could be (struct addrinfo*) instead, but I'm unsure which most desirable with regard to style.
  • I'd like to introduce a timeout parameter to network_connect_to(), a struct timeval* that select() would use in network_connect(). I don't know if that should be in a separate patch, or if you want all the API change at once.



As the patch is a little lengthy, it might be easier to leave line-by-line comments on github:
https://github.com/talisein/weechat/commit/ea21df8782ed30cde71404a4233bf18f7b2a4bb6

I've tested vanilla sending/receiving via IPv4 and IPv6, but not setting own_ip and using a proxy.

Andrew Potter <talisein>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #29758:  0001-xfer-Support-IPv6-DCC.patch added by talisein (43KiB - text/x-patch - Rebased commit.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by flashcode (Posted a comment)
  • -email is unavailable- added by talisein (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-02-09 flashcode Open/ClosedOpen Closed
    2014-01-09 flashcode StatusNone Done
        Assigned toNone flashcode
    2013-12-02 talisein Attached File- Added 0001-xfer-Support-IPv6-DCC.patch, #29758
    2013-04-02 talisein Attached File- Added 0002-xfer-Support-IPv6-DCC.patch, #27751

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code