diff --git a/sys/i386/boot/netboot/main.c b/sys/i386/boot/netboot/main.c index e5d987121936..276d3882f87f 100644 --- a/sys/i386/boot/netboot/main.c +++ b/sys/i386/boot/netboot/main.c @@ -165,7 +165,7 @@ load() } nfsdiskless.swap_saddr.sin_len = sizeof(struct sockaddr_in); nfsdiskless.swap_saddr.sin_family = AF_INET; - nfsdiskless.swap_saddr.sin_port = swap_nfs_port; + nfsdiskless.swap_saddr.sin_port = htons(swap_nfs_port); nfsdiskless.swap_saddr.sin_addr.s_addr = htonl(arptable[ARP_SWAPSERVER].ipaddr); nfsdiskless.swap_args.sotype = SOCK_DGRAM; @@ -191,7 +191,7 @@ load() } nfsdiskless.root_saddr.sin_len = sizeof(struct sockaddr_in); nfsdiskless.root_saddr.sin_family = AF_INET; - nfsdiskless.root_saddr.sin_port = root_nfs_port; + nfsdiskless.root_saddr.sin_port = htons(root_nfs_port); nfsdiskless.root_saddr.sin_addr.s_addr = htonl(arptable[ARP_ROOTSERVER].ipaddr); nfsdiskless.root_args.sotype = SOCK_DGRAM;