Use syscall.SO_BINDTODEVICE to only bind on specific interface#31
Use syscall.SO_BINDTODEVICE to only bind on specific interface#31fdurand wants to merge 1 commit into
Conversation
krolaw
left a comment
There was a problem hiding this comment.
Great find! Bit busy with other things, but will look at further as soon as I can.
|
Fyi i also added a way to send back raw packet to the client https://github.com/inverse-inc/packetfence/blob/eed0be802f79cc4425011de428a89fc97da30ef2/go/dhcp/rawClient.go the code is not ready and need to be cleaned. |
|
Sorry for the delay. A client would be awesome. But first I'd like to get the bind socket idea working. I tried the building a bound socket that can be passed as a ServeConn for the Serve command. Alas, while I receive packets, my responses fail: No change after I entered the source ip: Thoughts appreciated... |
|
Just fixed the IP binding, but still not working. I suspect, with an IP it doesn't receive the broadcast packets. Yet without, it can't send. Thoughts? |
|
Fixed. Working now after adding broadcast capability to socket. |
|
Hi, sorry for the delay. |
Added a way to bind the broadcast socket to the specific interface instead of all interfaces.