This commit is to patch for specifying port number of dhcp server when
binding the socket. If there is no port number specified, DHCP packets
have wrong port number and this may cause interoperability problems
during DHCP handshaking with various other platforms.
Change-Id: Ife196fd1a524b2f3b4a0e1157ca28910d47ee8fd
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
/* Bind the socket to a local port. */
addr.sin_family = AF_INET;
- addr.sin_port = 0;
+ addr.sin_port = HTONS(DHCP_SERVER_PORT);
addr.sin_addr.s_addr = g_state.ds_serverip;
ret = bind(sockfd, (struct sockaddr *)&addr, sizeof(struct sockaddr_in));