Skip to content

Commit

Permalink
hint
Browse files Browse the repository at this point in the history
  • Loading branch information
zardus committed Feb 24, 2025
1 parent 9b5f760 commit 6e4fd99
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions intercepting-communication/udp-2/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
Though we didn't explore this for TCP, in addition to selecting the destination port, both TCP and UDP can set their _source_ port.
We'll practice that here --- you can set the source port with `s.bind` on the socket, exactly how a server does it to set their listening port.
Read the source code of `/challenge/run` to see what source port you'll need!

----

**NOTE:**
You must set the source port _before_ sending data!
Otherwise, Linux will pick a random source port (the default behavior, when `bind` is not called).

0 comments on commit 6e4fd99

Please sign in to comment.