coova / coova-chilli

CoovaChilli is an open-source software access controller for captive portal hotspots.
Other
518 stars 260 forks source link

setsockopt failed after last commit #368

Open goldnetengineeringgroup opened 7 years ago

goldnetengineeringgroup commented 7 years ago

last week I get last code and compile it, it works fine. but yesterday when I get last code, I got this

chilli[1412]: removing ip address from eth1 chilli[1412]: 92 setsockopt(s=5, level=6, optname=1, optlen=4) failed chilli[1412]: Failed to create dhcp listener on eth1

when I saw the last commit from 6 days ago and commit about setsockopt, I checked the previous commit it works fine but the last commit has the problem.

jobezic commented 7 years ago

What about your environment?

goldnetengineeringgroup commented 7 years ago

armbian/debian8/ubuntu 16.4/ubuntu 17 on my pc / virtual box/ orangepi nano These days I change OS and test until I found the problem

gbaligh commented 7 years ago

Try the pull request I just pulled : #370

pihomeserver commented 7 years ago

Bug confirmed on a fresh install of Raspbian Jessie Lite for Raspberry Pi But @gbaligh you saved my day your pull request works like a charm !

goldnetengineeringgroup commented 7 years ago

@gbaligh it works fine 👍

gbaligh commented 7 years ago

I have a feeling that this is not the good solution :( In fact using this patch, the TCP_NODELAY is never set ! We must investigate more into this problem ...

xOneca commented 7 years ago

So, why not just remove setsockopt() call?

xOneca commented 7 years ago

The socket is always created as SOCK_RAW, and the only (commented-out) alternative is SOCK_DGRAM. Neither can have TCP_NODELAY aplied, if I'm not wrong...