Parcourir la source

udp_open() takes ports in network-endian order.

tags/v0.9.3
Michael Brown il y a 19 ans
Parent
révision
0768670fd8
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1
    1
      src/net/udp/dhcp.c

+ 1
- 1
src/net/udp/dhcp.c Voir le fichier

@@ -540,7 +540,7 @@ struct async_operation * start_dhcp ( struct dhcp_session *dhcp ) {
540 540
 			       - sizeof ( dhcp->xid ) ), sizeof ( dhcp->xid ));
541 541
 
542 542
 	/* Bind to local port */
543
-	if ( ( rc = udp_open ( &dhcp->udp, BOOTPC_PORT ) ) != 0 ) {
543
+	if ( ( rc = udp_open ( &dhcp->udp, htons ( BOOTPC_PORT ) ) ) != 0 ) {
544 544
 		async_done ( &dhcp->aop, rc );
545 545
 		goto out;
546 546
 	}

Chargement…
Annuler
Enregistrer