Fix issue between prefix and netmask syncing. Reformat code.

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