Skip to content

Commit

Permalink
refactor: isLoobpackAddress function instead of single loopback address
Browse files Browse the repository at this point in the history
Co-authored-by: aNeutrino <[email protected]>
  • Loading branch information
uristdwarf and aNeutrino authored Nov 12, 2024
1 parent c119656 commit a3d8552
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/mount/mastercomm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@
#include "protocol/SFSCommunication.h"
#include "protocol/packet.h"

const uint32_t localhost = 0x7F000001;
bool isLoopbackAddress(uint32_t ip) {
return ((ip & 0xFF000000) == 0x7F000000); // ip in range (127.0.0.0...127.255.255.255)
}

struct threc {
pthread_t thid;
Expand Down

0 comments on commit a3d8552

Please sign in to comment.