[ 
https://issues.apache.org/jira/browse/CXF-6795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15157236#comment-15157236
 ] 

ASF GitHub Bot commented on CXF-6795:
-------------------------------------

GitHub user nwbirnie opened a pull request:

    https://github.com/apache/cxf/pull/113

    CXF-6795 WS-Discovery add support for discovery on localhost

    This addresses the feature request to add loopback support for UDP 
transport and hence WS-Discovery.
    
    https://issues.apache.org/jira/browse/CXF-6795
    
    There was some code which was attempting to guess which network interface 
to use for multicast purposes. I have left the ability to configure a specific 
interface to use, but I removed the code which tried to guess a default 
interface since this is best handled by the operating system's routing table. 
The algorithm was essentially making an arbitrary choice from the available 
network interfaces, except the loopbacks. However, it is still possible and in 
many circumstances desirable to run multicast on the loopback adapter. This 
requires the MulticastSocket to be configured with the setLoopbackMode(false) 
and setReuseAddress(true) options in order to receive packets which were sent 
from the local machine.
    
    In some circumstances, this will not be required, but it shouldn't cause a 
major issue since the WS-D packets are so small. Perhaps someone can comment on 
impact outside of WS-D for other user of UDPTransport's multicast capability?

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/nwbirnie/cxf cxf6795

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cxf/pull/113.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #113
    
----
commit 908086aaa5715175150cebe2848dff13f9f7e8cd
Author: Nick Birnie <nick.bir...@seebyte.com>
Date:   2016-02-16T17:15:03Z

    [CXF-6768] Add ws-addr schema to catalog for offline support

commit ee322e2aac644bdfb6756990b844a87d1c15395d
Author: Nick Birnie <nick.bir...@seebyte.com>
Date:   2016-02-22T16:19:47Z

    [CXF-6795] Remove guess at multicast network interface. Leave this for the 
operating system routing table to decide.

----


> WS-Discovery add support for discovery on localhost
> ---------------------------------------------------
>
>                 Key: CXF-6795
>                 URL: https://issues.apache.org/jira/browse/CXF-6795
>             Project: CXF
>          Issue Type: Bug
>          Components: WS-* Components
>    Affects Versions: 3.1.5
>            Reporter: Nick Birnie
>
> The current WS-Discovery implementation could use support for discovering 
> services which are provided on localhost. This is currently not the case due 
> to an obscure detail of multicast communications where, when a multicast 
> packet is sent, by default it is not echoed back to the host that sent it.
> For more info, see: http://www.tldp.org/HOWTO/Multicast-HOWTO-6.html
> This should be an easy fix by setting the appropriate options on the 
> MulticastSocket used by WSDiscoveryClient (which I believe is implemented by 
> UDPConduit in UDPTransport).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to