Fixed invalid number of hosts when prefix length = 32

Signed-off-by: 20115681 <20115681@student.hut.edu.vn>