2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 <2020> 2021 2022 2023 2024 2025 | Index | 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 <2020> 2021 2022 2023 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Weird CAS hangup on IOC |
From: | Andrew Johnson via Core-talk <core-talk at aps.anl.gov> |
To: | <core-talk at aps.anl.gov> |
Date: | Thu, 6 Feb 2020 17:10:53 -0600 |
My attempt to fix epicsSocketEnableAddressUseForDatagramFanout() on vxWorks (which still needs confirmation) and RTEMS had a side-effect on Linux where it seems that SO_REUSEADDR and SO_REUSEPORT have the same effect, but are not interchangeable.
Sorry.
iocanj> osiSockTest
1..18
ok 1 - osiSockAttach
ok 2 - epicsSocketCreate INET, DGRAM, 0
ok 3 - setsockopt BROADCAST := 1
ok 4 - getsockopt BROADCAST => 1
ok 5 - setsockopt BROADCAST := 0
ok 6 - getsockopt BROADCAST => 0
ok 7 - setsockopt MULTICAST_LOOP := 1
ok 8 - getsockopt MULTICAST_LOOP => 1
ok 9 - setsockopt MULTICAST_LOOP := 0
ok 10 - getsockopt MULTICAST_LOOP => 0
ok 11 - setsockopt IP_MULTICAST_TTL := 1
ok 12 - getsockopt IP_MULTICAST_TTL => 1
ok 13 - setsockopt IP_MULTICAST_TTL := 0
not ok 14 - getsockopt IP_MULTICAST_TTL => 1
# First test if epicsSocketEnableAddressUseForDatagramFanout() is necessary
ok 15 - bind() to port 50463
ok 16 - bind() to 50463 error -1, 48
# Now the real test
ok 17 - bind() to port 50463
not ok 18 - bind() to 50463 error -1, 48
Results
=======
Tests: 18
Passed: 16 = 88.89%
Failed: 2 = 11.11%
iocanj> puts strerror(48)
S_errno_EADDRINUSE
value = 10 = 0xa
-- Complexity comes for free, Simplicity you have to work for.